LCOV - code coverage report
Current view: top level - src/runtime - runtime-date.cc (source / functions) Hit Total Coverage
Test: app.info Lines: 10 10 100.0 %
Date: 2017-10-20 Functions: 3 6 50.0 %

          Line data    Source code
       1             : // Copyright 2014 the V8 project authors. All rights reserved.
       2             : // Use of this source code is governed by a BSD-style license that can be
       3             : // found in the LICENSE file.
       4             : 
       5             : #include "src/runtime/runtime-utils.h"
       6             : 
       7             : #include "src/arguments.h"
       8             : #include "src/conversions-inl.h"
       9             : #include "src/date.h"
      10             : #include "src/factory.h"
      11             : #include "src/isolate-inl.h"
      12             : #include "src/messages.h"
      13             : 
      14             : namespace v8 {
      15             : namespace internal {
      16             : 
      17        8262 : RUNTIME_FUNCTION(Runtime_IsDate) {
      18             :   SealHandleScope shs(isolate);
      19             :   DCHECK_EQ(1, args.length());
      20        4131 :   CONVERT_ARG_CHECKED(Object, obj, 0);
      21        4131 :   return isolate->heap()->ToBoolean(obj->IsJSDate());
      22             : }
      23             : 
      24             : 
      25        7000 : RUNTIME_FUNCTION(Runtime_ThrowNotDateError) {
      26        3500 :   HandleScope scope(isolate);
      27             :   DCHECK_EQ(0, args.length());
      28        7000 :   THROW_NEW_ERROR_RETURN_FAILURE(isolate,
      29        3500 :                                  NewTypeError(MessageTemplate::kNotDateObject));
      30             : }
      31             : 
      32             : 
      33         106 : RUNTIME_FUNCTION(Runtime_DateCurrentTime) {
      34          53 :   HandleScope scope(isolate);
      35             :   DCHECK_EQ(0, args.length());
      36         106 :   return *isolate->factory()->NewNumber(JSDate::CurrentTimeValue(isolate));
      37             : }
      38             : 
      39             : }  // namespace internal
      40             : }  // namespace v8

Generated by: LCOV version 1.10