| Index: src/compiler/ast-graph-builder.cc
|
| diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
|
| index 11dc456e3dba721637e06a9283906a6db530255c..9ac1aa2e4f80dce17a9668a2800607a7ed1abb38 100644
|
| --- a/src/compiler/ast-graph-builder.cc
|
| +++ b/src/compiler/ast-graph-builder.cc
|
| @@ -2538,20 +2538,18 @@ void AstGraphBuilder::VisitCallNew(CallNew* expr) {
|
|
|
|
|
| void AstGraphBuilder::VisitCallJSRuntime(CallRuntime* expr) {
|
| - Handle<String> name = expr->name();
|
| -
|
| // 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* receiver_value = BuildLoadBuiltinsObject();
|
| - VectorSlotPair pair = CreateVectorSlotPair(expr->CallRuntimeFeedbackSlot());
|
| - // TODO(jarin): bailout ids for runtime calls.
|
| - FrameStateBeforeAndAfter states(this, BailoutId::None());
|
| - Node* callee_value = BuildNamedLoad(receiver_value, name, pair);
|
| - states.AddToNode(callee_value, BailoutId::None(),
|
| - OutputFrameStateCombine::Push());
|
| + Node* global = BuildLoadGlobalObject();
|
| + Node* native_context =
|
| + BuildLoadObjectField(global, GlobalObject::kNativeContextOffset);
|
| + Node* callee_value =
|
| + NewNode(javascript()->LoadContext(0, expr->function()->index, true),
|
| + native_context);
|
| +
|
| environment()->Push(callee_value);
|
| - environment()->Push(receiver_value);
|
| + environment()->Push(jsgraph()->UndefinedConstant());
|
|
|
| // Evaluate all arguments to the JS runtime call.
|
| ZoneList<Expression*>* args = expr->arguments();
|
| @@ -2572,7 +2570,6 @@ void AstGraphBuilder::VisitCallRuntime(CallRuntime* expr) {
|
| // Handle calls to runtime functions implemented in JavaScript separately as
|
| // the call follows JavaScript ABI and the callee is statically unknown.
|
| if (expr->is_jsruntime()) {
|
| - DCHECK(function == NULL && expr->name()->length() > 0);
|
| return VisitCallJSRuntime(expr);
|
| }
|
|
|
|
|