Index: src/compiler/ast-graph-builder.cc |
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc |
index 88dc44e3427f89b3ae00d2a1b0f670ce05c4728e..12e121b5069474590509ccf22eea2773f1715fbd 100644 |
--- a/src/compiler/ast-graph-builder.cc |
+++ b/src/compiler/ast-graph-builder.cc |
@@ -1985,10 +1985,8 @@ void AstGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) { |
if (subexpr->IsSpread()) { |
VisitForValue(subexpr->AsSpread()->expression()); |
Node* iterable = environment()->Pop(); |
- Node* builtins = BuildLoadBuiltinsObject(); |
- Node* function = BuildLoadObjectField( |
- builtins, JSBuiltinsObject::OffsetOfFunctionWithId( |
- Builtins::CONCAT_ITERABLE_TO_ARRAY)); |
+ Node* function = BuildLoadNativeContextField( |
+ Context::CONCAT_ITERABLE_TO_ARRAY_BUILTIN_INDEX); |
result = NewNode(javascript()->CallFunction(3, NO_CALL_FUNCTION_FLAGS, |
language_mode()), |
function, array, iterable); |
@@ -2541,12 +2539,7 @@ void AstGraphBuilder::VisitCallJSRuntime(CallRuntime* expr) { |
// The callee and the receiver both have to be pushed onto the operand stack |
// before arguments are being evaluated. |
CallFunctionFlags flags = NO_CALL_FUNCTION_FLAGS; |
- Node* global = BuildLoadGlobalObject(); |
- Node* native_context = |
- BuildLoadObjectField(global, GlobalObject::kNativeContextOffset); |
- Node* callee_value = |
- NewNode(javascript()->LoadContext(0, expr->context_index(), true), |
- native_context); |
+ Node* callee_value = BuildLoadNativeContextField(expr->context_index()); |
Node* receiver_value = jsgraph()->UndefinedConstant(); |
environment()->Push(callee_value); |
@@ -3759,6 +3752,14 @@ Node* AstGraphBuilder::BuildLoadGlobalObject() { |
} |
+Node* AstGraphBuilder::BuildLoadNativeContextField(int index) { |
+ Node* global = BuildLoadGlobalObject(); |
+ Node* native_context = |
+ BuildLoadObjectField(global, GlobalObject::kNativeContextOffset); |
+ return NewNode(javascript()->LoadContext(0, index, true), native_context); |
+} |
+ |
+ |
Node* AstGraphBuilder::BuildLoadGlobalProxy() { |
Node* global = BuildLoadGlobalObject(); |
Node* proxy = |