Index: src/crankshaft/hydrogen.cc |
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc |
index f74b18297d5eb9f5ed14e505be2752d0d1020bad..2bf85f87c2a04592828fbff1f3068582266ed442 100644 |
--- a/src/crankshaft/hydrogen.cc |
+++ b/src/crankshaft/hydrogen.cc |
@@ -12463,6 +12463,25 @@ |
} |
+void HOptimizedGraphBuilder::GenerateThrowNotDateError(CallRuntime* call) { |
+ DCHECK_EQ(0, call->arguments()->length()); |
+ Add<HDeoptimize>(Deoptimizer::kNotADateObject, Deoptimizer::EAGER); |
+ Add<HSimulate>(call->id(), FIXED_SIMULATE); |
+ return ast_context()->ReturnValue(graph()->GetConstantUndefined()); |
+} |
+ |
+ |
+void HOptimizedGraphBuilder::GenerateDateField(CallRuntime* call) { |
+ DCHECK(call->arguments()->length() == 2); |
+ DCHECK_NOT_NULL(call->arguments()->at(1)->AsLiteral()); |
+ Smi* index = Smi::cast(*(call->arguments()->at(1)->AsLiteral()->value())); |
+ CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
+ HValue* date = Pop(); |
+ HDateField* result = New<HDateField>(date, index); |
+ return ast_context()->ReturnInstruction(result, call->id()); |
+} |
+ |
+ |
void HOptimizedGraphBuilder::GenerateOneByteSeqStringSetChar( |
CallRuntime* call) { |
DCHECK(call->arguments()->length() == 3); |