Index: src/compiler/js-builtin-reducer.cc |
diff --git a/src/compiler/js-builtin-reducer.cc b/src/compiler/js-builtin-reducer.cc |
index 08703a5fab7e0ab43c67e35b946246c6b71420a3..e3e0c78189b4783733bab4d97b7390205b22adda 100644 |
--- a/src/compiler/js-builtin-reducer.cc |
+++ b/src/compiler/js-builtin-reducer.cc |
@@ -950,6 +950,14 @@ bool HasInstanceTypeWitness(Node* receiver, Node* effect, |
} // namespace |
+// ES6 section 20.3.3.1 Date.now ( ) |
+Reduction JSBuiltinReducer::ReduceDateNow(Node* node) { |
+ NodeProperties::RemoveValueInputs(node); |
+ NodeProperties::ChangeOp( |
+ node, javascript()->CallRuntime(Runtime::kDateCurrentTime)); |
+ return Changed(node); |
+} |
+ |
// ES6 section 20.3.4.10 Date.prototype.getTime ( ) |
Reduction JSBuiltinReducer::ReduceDateGetTime(Node* node) { |
Node* receiver = NodeProperties::GetValueInput(node, 1); |
@@ -1858,6 +1866,8 @@ Reduction JSBuiltinReducer::Reduce(Node* node) { |
return ReduceArrayPop(node); |
case kArrayPush: |
return ReduceArrayPush(node); |
+ case kDateNow: |
+ return ReduceDateNow(node); |
case kDateGetTime: |
return ReduceDateGetTime(node); |
case kGlobalIsFinite: |