Commit 84ea200a authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Remove obsolete eval call bailout ids.

Calls that are potential eval calls are funneled through bytecode and
hence no longer use the {AstGraphBuilder} by now. Associated bailout
points can be removed.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2549113002
Cr-Commit-Position: refs/heads/master@{#41489}
parent f5fb2da6
......@@ -1848,11 +1848,9 @@ class Call final : public Expression {
allocation_site_ = site;
}
static int num_ids() { return parent_num_ids() + 4; }
static int num_ids() { return parent_num_ids() + 2; }
BailoutId ReturnId() const { return BailoutId(local_id(0)); }
BailoutId EvalId() const { return BailoutId(local_id(1)); }
BailoutId LookupId() const { return BailoutId(local_id(2)); }
BailoutId CallId() const { return BailoutId(local_id(3)); }
BailoutId CallId() const { return BailoutId(local_id(1)); }
bool is_uninitialized() const {
return IsUninitializedField::decode(bit_field_);
......
......@@ -1815,41 +1815,13 @@ void AstGraphBuilder::VisitCall(Call* expr) {
ZoneList<Expression*>* args = expr->arguments();
VisitForValues(args);
// Resolve callee for a potential direct eval call. This block will mutate the
// callee value pushed onto the environment.
if (expr->is_possibly_eval() && args->length() > 0) {
int arg_count = args->length();
// Extract callee and source string from the environment.
Node* callee = environment()->Peek(arg_count + 1);
Node* source = environment()->Peek(arg_count - 1);
// Create node to ask for help resolving potential eval call. This will
// provide a fully resolved callee to patch into the environment.
Node* function = GetFunctionClosure();
Node* language = jsgraph()->Constant(language_mode());
Node* eval_scope_position =
jsgraph()->Constant(current_scope()->start_position());
Node* eval_position = jsgraph()->Constant(expr->position());
const Operator* op =
javascript()->CallRuntime(Runtime::kResolvePossiblyDirectEval);
Node* new_callee = NewNode(op, callee, source, function, language,
eval_scope_position, eval_position);
PrepareFrameState(new_callee, expr->EvalId(),
OutputFrameStateCombine::PokeAt(arg_count + 1));
// Patch callee on the environment.
environment()->Poke(arg_count + 1, new_callee);
}
// Create node to perform the function call.
float const frequency = ComputeCallFrequency(expr->CallFeedbackICSlot());
VectorSlotPair feedback = CreateVectorSlotPair(expr->CallFeedbackICSlot());
const Operator* call =
javascript()->CallFunction(args->length() + 2, frequency, feedback,
receiver_hint, expr->tail_call_mode());
PrepareEagerCheckpoint(expr->is_possibly_eval() ? expr->EvalId()
: expr->CallId());
PrepareEagerCheckpoint(expr->CallId());
Node* value = ProcessArguments(call, args->length() + 2);
// The callee passed to the call, we just need to push something here to
// satisfy the bailout location contract. The fullcodegen code will not
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment