runtime-date.cc 682 Bytes
Newer Older
1 2 3 4
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
#include "src/runtime/runtime-utils.h"
6

Yang Guo's avatar
Yang Guo committed
7
#include "src/date/date.h"
8 9
#include "src/execution/arguments.h"
#include "src/execution/isolate-inl.h"
10
#include "src/heap/factory.h"
11
#include "src/logging/counters.h"
12
#include "src/numbers/conversions-inl.h"
13 14 15 16 17 18

namespace v8 {
namespace internal {

RUNTIME_FUNCTION(Runtime_DateCurrentTime) {
  HandleScope scope(isolate);
19 20
  DCHECK_EQ(0, args.length());
  return *isolate->factory()->NewNumber(JSDate::CurrentTimeValue(isolate));
21 22
}

23 24
}  // namespace internal
}  // namespace v8