Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index fba3c66dac1a447bd32c31b508b791a3be125ee4..995f05fbd9ac00429cc861acae838d76c29896c8 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -11719,6 +11719,17 @@ void HOptimizedGraphBuilder::GenerateValueOf(CallRuntime* call) { |
} |
+void HOptimizedGraphBuilder::GenerateJSValueGetValue(CallRuntime* call) { |
+ DCHECK(call->arguments()->length() == 1); |
+ CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
+ HValue* value = Pop(); |
+ HInstruction* result = Add<HLoadNamedField>( |
+ value, nullptr, |
+ HObjectAccess::ForObservableJSObjectOffset(JSValue::kValueOffset)); |
+ return ast_context()->ReturnInstruction(result, call->id()); |
+} |
+ |
+ |
void HOptimizedGraphBuilder::GenerateDateField(CallRuntime* call) { |
DCHECK(call->arguments()->length() == 2); |
DCHECK_NOT_NULL(call->arguments()->at(1)->AsLiteral()); |
@@ -11880,6 +11891,15 @@ void HOptimizedGraphBuilder::GenerateStringCompare(CallRuntime* call) { |
} |
+void HOptimizedGraphBuilder::GenerateStringGetLength(CallRuntime* call) { |
+ DCHECK(call->arguments()->length() == 1); |
+ CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
+ HValue* string = Pop(); |
+ HInstruction* result = AddLoadStringLength(string); |
+ return ast_context()->ReturnInstruction(result, call->id()); |
+} |
+ |
+ |
// Support for direct calls from JavaScript to native RegExp code. |
void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) { |
DCHECK_EQ(4, call->arguments()->length()); |