| Index: src/compiler/ast-graph-builder.cc
|
| diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
|
| index 255e231f661e4c1fb4ef7404582f506e70fec386..fca0388327547a05bee59ccafba59e97cc2b7ad9 100644
|
| --- a/src/compiler/ast-graph-builder.cc
|
| +++ b/src/compiler/ast-graph-builder.cc
|
| @@ -2538,18 +2538,17 @@ 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->context_index(), true),
|
| + native_context);
|
| + Node* receiver_value = jsgraph()->UndefinedConstant();
|
| +
|
| environment()->Push(callee_value);
|
| environment()->Push(receiver_value);
|
|
|
| @@ -2567,15 +2566,14 @@ void AstGraphBuilder::VisitCallJSRuntime(CallRuntime* expr) {
|
|
|
|
|
| void AstGraphBuilder::VisitCallRuntime(CallRuntime* expr) {
|
| - const Runtime::Function* function = expr->function();
|
| -
|
| // 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);
|
| }
|
|
|
| + const Runtime::Function* function = expr->function();
|
| +
|
| // TODO(mstarzinger): This bailout is a gigantic hack, the owner is ashamed.
|
| if (function->function_id == Runtime::kInlineGeneratorNext ||
|
| function->function_id == Runtime::kInlineGeneratorThrow) {
|
|
|