Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 5916860f766ba0f2adac6145d801db1a5d0848af..f99fa35b0f0714e79dd42a02c654305ad1578d37 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -11928,6 +11928,17 @@ void HOptimizedGraphBuilder::GenerateJSValueGetValue(CallRuntime* call) { |
} |
+void HOptimizedGraphBuilder::GenerateThrowIfNotADate(CallRuntime* call) { |
+ DCHECK_EQ(1, call->arguments()->length()); |
+ CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
+ HValue* obj = Pop(); |
+ BuildCheckHeapObject(obj); |
+ HCheckInstanceType* check = |
+ New<HCheckInstanceType>(obj, HCheckInstanceType::IS_JS_DATE); |
+ return ast_context()->ReturnInstruction(check, call->id()); |
+} |
+ |
+ |
void HOptimizedGraphBuilder::GenerateDateField(CallRuntime* call) { |
DCHECK(call->arguments()->length() == 2); |
DCHECK_NOT_NULL(call->arguments()->at(1)->AsLiteral()); |