Commit bc717ae8 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[ast] Remove BailoutId and TypeFeedbackId from AST.

This removes both {BailoutId} as well as {TypeFeedbackId} numbers from
almost all AST nodes. The only exception are {IterationStatement} nodes
which still require an ID for on-stack replacement support.

R=verwaest@chromium.org
BUG=v8:6409

Change-Id: I5f7b7673ae5797b9cbc9741144d304f0d31d4446
Reviewed-on: https://chromium-review.googlesource.com/538792
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45991}
parent f626d5df
......@@ -1513,8 +1513,6 @@ v8_source_set("v8_base") {
"src/crankshaft/lithium-inl.h",
"src/crankshaft/lithium.cc",
"src/crankshaft/lithium.h",
"src/crankshaft/typing.cc",
"src/crankshaft/typing.h",
"src/crankshaft/unique.h",
"src/date.cc",
"src/date.h",
......
......@@ -148,14 +148,12 @@ void AstNumberingVisitor::VisitNativeFunctionLiteral(
NativeFunctionLiteral* node) {
IncrementNodeCount();
DisableOptimization(kNativeFunctionLiteral);
node->set_base_id(ReserveIdRange(NativeFunctionLiteral::num_ids()));
ReserveFeedbackSlots(node);
}
void AstNumberingVisitor::VisitDoExpression(DoExpression* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(DoExpression::num_ids()));
Visit(node->block());
Visit(node->result());
}
......@@ -163,13 +161,11 @@ void AstNumberingVisitor::VisitDoExpression(DoExpression* node) {
void AstNumberingVisitor::VisitLiteral(Literal* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(Literal::num_ids()));
}
void AstNumberingVisitor::VisitRegExpLiteral(RegExpLiteral* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(RegExpLiteral::num_ids()));
ReserveFeedbackSlots(node);
}
......@@ -187,7 +183,6 @@ void AstNumberingVisitor::VisitVariableProxyReference(VariableProxy* node) {
default:
break;
}
node->set_base_id(ReserveIdRange(VariableProxy::num_ids()));
}
void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node,
......@@ -203,7 +198,6 @@ void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) {
void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(ThisFunction::num_ids()));
}
......@@ -211,7 +205,6 @@ void AstNumberingVisitor::VisitSuperPropertyReference(
SuperPropertyReference* node) {
IncrementNodeCount();
DisableFullCodegenAndCrankshaft(kSuperReference);
node->set_base_id(ReserveIdRange(SuperPropertyReference::num_ids()));
Visit(node->this_var());
Visit(node->home_object());
}
......@@ -220,7 +213,6 @@ void AstNumberingVisitor::VisitSuperPropertyReference(
void AstNumberingVisitor::VisitSuperCallReference(SuperCallReference* node) {
IncrementNodeCount();
DisableFullCodegenAndCrankshaft(kSuperReference);
node->set_base_id(ReserveIdRange(SuperCallReference::num_ids()));
Visit(node->this_var());
Visit(node->new_target_var());
Visit(node->this_function_var());
......@@ -245,21 +237,18 @@ void AstNumberingVisitor::VisitSuspend(Suspend* node) {
node->set_suspend_id(suspend_count_);
suspend_count_++;
IncrementNodeCount();
node->set_base_id(ReserveIdRange(Suspend::num_ids()));
Visit(node->expression());
}
void AstNumberingVisitor::VisitThrow(Throw* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(Throw::num_ids()));
Visit(node->exception());
}
void AstNumberingVisitor::VisitUnaryOperation(UnaryOperation* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(UnaryOperation::num_ids()));
if ((node->op() == Token::TYPEOF) && node->expression()->IsVariableProxy()) {
VariableProxy* proxy = node->expression()->AsVariableProxy();
VisitVariableProxy(proxy, INSIDE_TYPEOF);
......@@ -271,7 +260,6 @@ void AstNumberingVisitor::VisitUnaryOperation(UnaryOperation* node) {
void AstNumberingVisitor::VisitCountOperation(CountOperation* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(CountOperation::num_ids()));
Visit(node->expression());
ReserveFeedbackSlots(node);
}
......@@ -279,7 +267,6 @@ void AstNumberingVisitor::VisitCountOperation(CountOperation* node) {
void AstNumberingVisitor::VisitBlock(Block* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(Block::num_ids()));
Scope* scope = node->scope();
if (scope != nullptr) {
LanguageModeScope language_mode_scope(this, scope->language_mode());
......@@ -305,7 +292,6 @@ void AstNumberingVisitor::VisitFunctionDeclaration(FunctionDeclaration* node) {
void AstNumberingVisitor::VisitCallRuntime(CallRuntime* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(CallRuntime::num_ids()));
VisitArguments(node->arguments());
// To support catch prediction within async/await:
//
......@@ -401,7 +387,6 @@ void AstNumberingVisitor::VisitTryFinallyStatement(TryFinallyStatement* node) {
void AstNumberingVisitor::VisitPropertyReference(Property* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(Property::num_ids()));
Visit(node->key());
Visit(node->obj());
}
......@@ -425,7 +410,6 @@ void AstNumberingVisitor::VisitProperty(Property* node) {
void AstNumberingVisitor::VisitAssignment(Assignment* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(Assignment::num_ids()));
if (node->is_compound()) VisitBinaryOperation(node->binary_operation());
VisitReference(node->target());
......@@ -436,7 +420,6 @@ void AstNumberingVisitor::VisitAssignment(Assignment* node) {
void AstNumberingVisitor::VisitBinaryOperation(BinaryOperation* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(BinaryOperation::num_ids()));
Visit(node->left());
Visit(node->right());
ReserveFeedbackSlots(node);
......@@ -445,7 +428,6 @@ void AstNumberingVisitor::VisitBinaryOperation(BinaryOperation* node) {
void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(CompareOperation::num_ids()));
Visit(node->left());
Visit(node->right());
ReserveFeedbackSlots(node);
......@@ -455,7 +437,6 @@ void AstNumberingVisitor::VisitSpread(Spread* node) {
IncrementNodeCount();
// We can only get here from spread calls currently.
DisableFullCodegenAndCrankshaft(kSpreadCall);
node->set_base_id(ReserveIdRange(Spread::num_ids()));
Visit(node->expression());
}
......@@ -466,7 +447,6 @@ void AstNumberingVisitor::VisitEmptyParentheses(EmptyParentheses* node) {
void AstNumberingVisitor::VisitGetIterator(GetIterator* node) {
IncrementNodeCount();
DisableFullCodegenAndCrankshaft(kGetIterator);
node->set_base_id(ReserveIdRange(GetIterator::num_ids()));
Visit(node->iterable());
ReserveFeedbackSlots(node);
}
......@@ -507,7 +487,6 @@ void AstNumberingVisitor::VisitForOfStatement(ForOfStatement* node) {
void AstNumberingVisitor::VisitConditional(Conditional* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(Conditional::num_ids()));
Visit(node->condition());
Visit(node->then_expression());
Visit(node->else_expression());
......@@ -516,7 +495,6 @@ void AstNumberingVisitor::VisitConditional(Conditional* node) {
void AstNumberingVisitor::VisitIfStatement(IfStatement* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(IfStatement::num_ids()));
Visit(node->condition());
Visit(node->then_statement());
if (node->HasElseStatement()) {
......@@ -527,7 +505,6 @@ void AstNumberingVisitor::VisitIfStatement(IfStatement* node) {
void AstNumberingVisitor::VisitSwitchStatement(SwitchStatement* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(SwitchStatement::num_ids()));
Visit(node->tag());
ZoneList<CaseClause*>* cases = node->cases();
for (int i = 0; i < cases->length(); i++) {
......@@ -538,7 +515,6 @@ void AstNumberingVisitor::VisitSwitchStatement(SwitchStatement* node) {
void AstNumberingVisitor::VisitCaseClause(CaseClause* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(CaseClause::num_ids()));
if (!node->is_default()) Visit(node->label());
VisitStatements(node->statements());
ReserveFeedbackSlots(node);
......@@ -561,7 +537,6 @@ void AstNumberingVisitor::VisitForStatement(ForStatement* node) {
void AstNumberingVisitor::VisitClassLiteral(ClassLiteral* node) {
IncrementNodeCount();
DisableFullCodegenAndCrankshaft(kClassLiteral);
node->set_base_id(ReserveIdRange(ClassLiteral::num_ids()));
LanguageModeScope language_mode_scope(this, STRICT);
if (node->extends()) Visit(node->extends());
if (node->constructor()) Visit(node->constructor());
......@@ -577,7 +552,6 @@ void AstNumberingVisitor::VisitClassLiteral(ClassLiteral* node) {
void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(node->num_ids()));
for (int i = 0; i < node->properties()->length(); i++) {
VisitLiteralProperty(node->properties()->at(i));
}
......@@ -598,7 +572,6 @@ void AstNumberingVisitor::VisitLiteralProperty(LiteralProperty* node) {
void AstNumberingVisitor::VisitArrayLiteral(ArrayLiteral* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(node->num_ids()));
for (int i = 0; i < node->values()->length(); i++) {
Visit(node->values()->at(i));
}
......@@ -613,7 +586,6 @@ void AstNumberingVisitor::VisitCall(Call* node) {
}
IncrementNodeCount();
ReserveFeedbackSlots(node);
node->set_base_id(ReserveIdRange(Call::num_ids()));
Visit(node->expression());
VisitArguments(node->arguments());
}
......@@ -622,7 +594,6 @@ void AstNumberingVisitor::VisitCall(Call* node) {
void AstNumberingVisitor::VisitCallNew(CallNew* node) {
IncrementNodeCount();
ReserveFeedbackSlots(node);
node->set_base_id(ReserveIdRange(CallNew::num_ids()));
Visit(node->expression());
VisitArguments(node->arguments());
}
......@@ -650,7 +621,6 @@ void AstNumberingVisitor::VisitArguments(ZoneList<Expression*>* arguments) {
void AstNumberingVisitor::VisitFunctionLiteral(FunctionLiteral* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(FunctionLiteral::num_ids()));
if (node->ShouldEagerCompile()) {
if (eager_literals_) {
eager_literals_->Add(new (zone())
......@@ -671,7 +641,6 @@ void AstNumberingVisitor::VisitFunctionLiteral(FunctionLiteral* node) {
void AstNumberingVisitor::VisitRewritableExpression(
RewritableExpression* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(RewritableExpression::num_ids()));
Visit(node->expression());
}
......
......@@ -851,26 +851,6 @@ void MaterializedLiteral::BuildConstants(Isolate* isolate) {
DCHECK(IsRegExpLiteral());
}
void UnaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
// TODO(olivf) If this Operation is used in a test context, then the
// expression has a ToBoolean stub and we want to collect the type
// information. However the GraphBuilder expects it to be on the instruction
// corresponding to the TestContext, therefore we have to store it here and
// not on the operand.
set_to_boolean_types(oracle->ToBooleanTypes(expression()->test_id()));
}
void BinaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
// TODO(olivf) If this Operation is used in a test context, then the right
// hand side has a ToBoolean stub and we want to collect the type information.
// However the GraphBuilder expects it to be on the instruction corresponding
// to the TestContext, therefore we have to store it here and not on the
// right hand operand.
set_to_boolean_types(oracle->ToBooleanTypes(right()->test_id()));
}
void BinaryOperation::AssignFeedbackSlots(FeedbackVectorSpec* spec,
LanguageMode language_mode,
FeedbackSlotCache* cache) {
......@@ -1004,19 +984,6 @@ bool CompareOperation::IsLiteralCompareNull(Expression** expr) {
// ----------------------------------------------------------------------------
// Recording of type feedback
// TODO(rossberg): all RecordTypeFeedback functions should disappear
// once we use the common type field in the AST consistently.
void Expression::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
if (IsUnaryOperation()) {
AsUnaryOperation()->RecordToBooleanTypeFeedback(oracle);
} else if (IsBinaryOperation()) {
AsBinaryOperation()->RecordToBooleanTypeFeedback(oracle);
} else {
set_to_boolean_types(oracle->ToBooleanTypes(test_id()));
}
}
void SmallMapList::AddMapIfMissing(Handle<Map> map, Zone* zone) {
if (!Map::TryUpdate(map).ToHandle(&map)) return;
for (int i = 0; i < length(); ++i) {
......@@ -1123,10 +1090,7 @@ Call::CallType Call::GetCallType() const {
CaseClause::CaseClause(Expression* label, ZoneList<Statement*>* statements,
int pos)
: Expression(pos, kCaseClause),
label_(label),
statements_(statements),
compare_type_(AstType::None()) {}
: Expression(pos, kCaseClause), label_(label), statements_(statements) {}
void CaseClause::AssignFeedbackSlots(FeedbackVectorSpec* spec,
LanguageMode language_mode,
......
This diff is collapsed.
This diff is collapsed.
......@@ -210,18 +210,6 @@ class AstGraphBuilder : public AstVisitor<AstGraphBuilder> {
// Helper to indicate a node exits the function body.
void UpdateControlDependencyToLeaveFunction(Node* exit);
// Prepare information for lazy deoptimization. This information is attached
// to the given node and the output value produced by the node is combined.
// Conceptually this frame state is "after" a given operation.
void PrepareFrameState(Node* node, BailoutId ast_id,
OutputFrameStateCombine framestate_combine =
OutputFrameStateCombine::Ignore());
// Prepare information for eager deoptimization. This information is carried
// by dedicated {Checkpoint} nodes that are wired into the effect chain.
// Conceptually this frame state is "before" a given operation.
void PrepareEagerCheckpoint(BailoutId ast_id);
BitVector* GetVariablesAssignedInLoop(IterationStatement* stmt);
// Check if the given statement is an OSR entry.
......@@ -252,15 +240,9 @@ class AstGraphBuilder : public AstVisitor<AstGraphBuilder> {
// Builders for variable load and assignment.
Node* BuildVariableAssignment(Variable* variable, Node* value,
Token::Value op, const VectorSlotPair& slot,
BailoutId bailout_id,
OutputFrameStateCombine framestate_combine =
OutputFrameStateCombine::Ignore());
Node* BuildVariableDelete(Variable* variable, BailoutId bailout_id,
OutputFrameStateCombine framestate_combine);
Node* BuildVariableLoad(Variable* variable, BailoutId bailout_id,
const VectorSlotPair& feedback,
OutputFrameStateCombine framestate_combine,
Token::Value op, const VectorSlotPair& slot);
Node* BuildVariableDelete(Variable* variable);
Node* BuildVariableLoad(Variable* variable, const VectorSlotPair& feedback,
TypeofMode typeof_mode = NOT_INSIDE_TYPEOF);
// Builders for property loads and stores.
......@@ -286,8 +268,8 @@ class AstGraphBuilder : public AstVisitor<AstGraphBuilder> {
Node* BuildLoadNativeContextField(int index);
// Builders for automatic type conversion.
Node* BuildToBoolean(Node* input, TypeFeedbackId feedback_id);
Node* BuildToObject(Node* input, BailoutId bailout_id);
Node* BuildToBoolean(Node* input);
Node* BuildToObject(Node* input);
// Builder for adding the [[HomeObject]] to a value if the value came from a
// function literal and needs a home object. Do nothing otherwise.
......@@ -295,23 +277,20 @@ class AstGraphBuilder : public AstVisitor<AstGraphBuilder> {
LiteralProperty* property, int slot_number = 0);
// Builders for error reporting at runtime.
Node* BuildThrowError(Node* exception, BailoutId bailout_id);
Node* BuildThrowReferenceError(Variable* var, BailoutId bailout_id);
Node* BuildThrowConstAssignError(BailoutId bailout_id);
Node* BuildThrowError(Node* exception);
Node* BuildThrowReferenceError(Variable* var);
Node* BuildThrowConstAssignError();
// Builders for dynamic hole-checks at runtime.
Node* BuildHoleCheckThenThrow(Node* value, Variable* var, Node* not_hole,
BailoutId bailout_id);
Node* BuildHoleCheckElseThrow(Node* value, Variable* var, Node* for_hole,
BailoutId bailout_id);
Node* BuildHoleCheckThenThrow(Node* value, Variable* var, Node* not_hole);
Node* BuildHoleCheckElseThrow(Node* value, Variable* var, Node* for_hole);
// Builders for non-local control flow.
Node* BuildReturn(Node* return_value);
Node* BuildThrow(Node* exception_value);
// Builders for binary operations.
Node* BuildBinaryOp(Node* left, Node* right, Token::Value op,
TypeFeedbackId feedback_id);
Node* BuildBinaryOp(Node* left, Node* right, Token::Value op);
// Process arguments to a call by popping {arity} elements off the operand
// stack and build a call node using the given call operator.
......@@ -349,8 +328,7 @@ class AstGraphBuilder : public AstVisitor<AstGraphBuilder> {
void VisitForValues(ZoneList<Expression*>* exprs);
// Common for all IterationStatement bodies.
void VisitIterationBody(IterationStatement* stmt, LoopBuilder* loop,
BailoutId stack_check_id);
void VisitIterationBody(IterationStatement* stmt, LoopBuilder* loop);
// Dispatched from VisitCall.
void VisitCallSuper(Call* expr);
......@@ -460,12 +438,6 @@ class AstGraphBuilder::Environment : public ZoneObject {
values()->erase(values()->end() - depth, values()->end());
}
// Preserve a checkpoint of the environment for the IR graph. Any
// further mutation of the environment will not affect checkpoints.
Node* Checkpoint(BailoutId ast_id, OutputFrameStateCombine combine =
OutputFrameStateCombine::Ignore(),
bool node_has_exception = false);
// Inserts a loop exit control node and renames the environment.
// This is useful for loop peeling to insert phis at loop exits.
void PrepareForLoopExit(Node* loop, BitVector* assigned_variables);
......
......@@ -32,7 +32,6 @@
#include "src/crankshaft/hydrogen-store-elimination.h"
#include "src/crankshaft/hydrogen-uint32-analysis.h"
#include "src/crankshaft/lithium-allocator.h"
#include "src/crankshaft/typing.h"
#include "src/field-type.h"
#include "src/full-codegen/full-codegen.h"
#include "src/globals.h"
......@@ -270,24 +269,6 @@ int HBasicBlock::LoopNestingDepth() const {
}
void HBasicBlock::PostProcessLoopHeader(IterationStatement* stmt) {
DCHECK(IsLoopHeader());
SetJoinId(stmt->EntryId());
if (predecessors()->length() == 1) {
// This is a degenerated loop.
DetachLoopInformation();
return;
}
// Only the first entry into the loop is from outside the loop. All other
// entries must be back edges.
for (int i = 1; i < predecessors()->length(); ++i) {
loop_information()->RegisterBackEdge(predecessors()->at(i));
}
}
void HBasicBlock::MarkSuccEdgeUnreachable(int succ) {
DCHECK(IsFinished());
HBasicBlock* succ_block = end()->SuccessorAt(succ);
......
......@@ -85,7 +85,6 @@ class HBasicBlock final : public ZoneObject {
void DetachLoopInformation();
bool IsLoopHeader() const { return loop_information() != NULL; }
bool IsStartBlock() const { return block_id() == 0; }
void PostProcessLoopHeader(IterationStatement* stmt);
bool IsFinished() const { return end_ != NULL; }
void AddPhi(HPhi* phi);
......
This diff is collapsed.
// Copyright 2013 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_CRANKSHAFT_TYPING_H_
#define V8_CRANKSHAFT_TYPING_H_
#include "src/allocation.h"
#include "src/ast/ast-type-bounds.h"
#include "src/ast/ast-types.h"
#include "src/ast/ast.h"
#include "src/ast/variables.h"
#include "src/effects.h"
#include "src/type-info.h"
#include "src/zone/zone.h"
namespace v8 {
namespace internal {
class DeclarationScope;
class Isolate;
class FunctionLiteral;
class AstTyper final : public AstVisitor<AstTyper> {
public:
AstTyper(Isolate* isolate, Zone* zone, Handle<JSFunction> closure,
DeclarationScope* scope, BailoutId osr_ast_id, FunctionLiteral* root,
AstTypeBounds* bounds);
void Run();
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
private:
Effect ObservedOnStack(Object* value);
void ObserveTypesAtOsrEntry(IterationStatement* stmt);
static const int kNoVar = INT_MIN;
typedef v8::internal::Effects<int, kNoVar> Effects;
typedef v8::internal::NestedEffects<int, kNoVar> Store;
Isolate* isolate_;
Zone* zone_;
Handle<JSFunction> closure_;
DeclarationScope* scope_;
BailoutId osr_ast_id_;
FunctionLiteral* root_;
TypeFeedbackOracle oracle_;
Store store_;
AstTypeBounds* bounds_;
Zone* zone() const { return zone_; }
TypeFeedbackOracle* oracle() { return &oracle_; }
void NarrowType(Expression* e, AstBounds b) {
bounds_->set(e, AstBounds::Both(bounds_->get(e), b, zone()));
}
void NarrowLowerType(Expression* e, AstType* t) {
bounds_->set(e, AstBounds::NarrowLower(bounds_->get(e), t, zone()));
}
Effects EnterEffects() {
store_ = store_.Push();
return store_.Top();
}
void ExitEffects() { store_ = store_.Pop(); }
int parameter_index(int index) { return -index - 2; }
int stack_local_index(int index) { return index; }
int variable_index(Variable* var);
void VisitDeclarations(Declaration::List* declarations);
void VisitStatements(ZoneList<Statement*>* statements);
#define DECLARE_VISIT(type) void Visit##type(type* node);
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT
DISALLOW_COPY_AND_ASSIGN(AstTyper);
};
} // namespace internal
} // namespace v8
#endif // V8_CRANKSHAFT_TYPING_H_
......@@ -619,7 +619,7 @@ void FullCodeGenerator::DoTest(Expression* condition,
Label* if_false,
Label* fall_through) {
Handle<Code> ic = ToBooleanICStub::GetUninitialized(isolate());
CallIC(ic, condition->test_id());
CallIC(ic);
__ CompareRoot(result_register(), Heap::kTrueValueRootIndex);
Split(eq, if_true, if_false, fall_through);
}
......@@ -870,7 +870,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
SetExpressionPosition(clause);
Handle<Code> ic =
CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code();
CallIC(ic, clause->CompareId());
CallIC(ic);
patch_site.EmitPatchInfo();
Label skip;
......@@ -1244,14 +1244,12 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->getter = property;
}
break;
case ObjectLiteral::Property::SETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->setter = property;
}
break;
......@@ -1508,7 +1506,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ bind(&stub_call);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ jmp(&done);
......@@ -1582,7 +1580,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
PopOperand(r1);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
context()->Plug(r0);
}
......@@ -2358,7 +2356,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
SetExpressionPosition(expr);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code();
CallIC(code, expr->CountBinOpFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ bind(&done);
......@@ -2543,7 +2541,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
}
Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
CallIC(ic, expr->CompareOperationFeedbackId());
CallIC(ic);
patch_site.EmitPatchInfo();
__ cmp(r0, Operand::Zero());
Split(cond, if_true, if_false, fall_through);
......
......@@ -608,7 +608,7 @@ void FullCodeGenerator::DoTest(Expression* condition,
Label* if_false,
Label* fall_through) {
Handle<Code> ic = ToBooleanICStub::GetUninitialized(isolate());
CallIC(ic, condition->test_id());
CallIC(ic);
__ CompareRoot(result_register(), Heap::kTrueValueRootIndex);
Split(eq, if_true, if_false, fall_through);
}
......@@ -863,7 +863,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
SetExpressionPosition(clause);
Handle<Code> ic =
CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code();
CallIC(ic, clause->CompareId());
CallIC(ic);
patch_site.EmitPatchInfo();
}
......@@ -1225,14 +1225,12 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->getter = property;
}
break;
case ObjectLiteral::Property::SETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->setter = property;
}
break;
......@@ -1439,7 +1437,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ Bind(&stub_call);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ B(&done);
......@@ -1523,7 +1521,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
JumpPatchSite patch_site(masm_); // Unbound, signals no inlined smi code.
{
Assembler::BlockPoolsScope scope(masm_);
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
}
context()->Plug(x0);
......@@ -2323,7 +2321,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
SetExpressionPosition(expr);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code();
CallIC(code, expr->CountBinOpFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ Bind(&done);
......@@ -2519,7 +2517,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
}
Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
CallIC(ic, expr->CompareOperationFeedbackId());
CallIC(ic);
patch_site.EmitPatchInfo();
__ CompareAndSplit(x0, 0, cond, if_true, if_false, fall_through);
}
......
......@@ -829,8 +829,7 @@ void FullCodeGenerator::VisitBlock(Block* stmt) {
NestedBlock nested_block(this, stmt);
{
EnterBlockScopeIfNeeded block_scope_state(
this, stmt->scope(), stmt->EntryId(), stmt->DeclsId(), stmt->ExitId());
EnterBlockScopeIfNeeded block_scope_state(this, stmt->scope());
VisitStatements(stmt->statements());
__ bind(nested_block.break_label());
}
......@@ -1456,11 +1455,9 @@ bool BackEdgeTable::Verify(Isolate* isolate, Code* unoptimized) {
}
#endif // DEBUG
FullCodeGenerator::EnterBlockScopeIfNeeded::EnterBlockScopeIfNeeded(
FullCodeGenerator* codegen, Scope* scope, BailoutId entry_id,
BailoutId declarations_id, BailoutId exit_id)
: codegen_(codegen), exit_id_(exit_id) {
FullCodeGenerator* codegen, Scope* scope)
: codegen_(codegen) {
saved_scope_ = codegen_->scope();
if (scope == NULL) {
......
......@@ -757,9 +757,7 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
class EnterBlockScopeIfNeeded {
public:
EnterBlockScopeIfNeeded(FullCodeGenerator* codegen, Scope* scope,
BailoutId entry_id, BailoutId declarations_id,
BailoutId exit_id);
EnterBlockScopeIfNeeded(FullCodeGenerator* codegen, Scope* scope);
~EnterBlockScopeIfNeeded();
private:
......@@ -767,7 +765,6 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
FullCodeGenerator* codegen_;
Scope* saved_scope_;
BailoutId exit_id_;
bool needs_block_context_;
};
......
......@@ -565,7 +565,7 @@ void FullCodeGenerator::DoTest(Expression* condition,
Label* if_false,
Label* fall_through) {
Handle<Code> ic = ToBooleanICStub::GetUninitialized(isolate());
CallIC(ic, condition->test_id());
CallIC(ic);
__ CompareRoot(result_register(), Heap::kTrueValueRootIndex);
Split(equal, if_true, if_false, fall_through);
}
......@@ -810,7 +810,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
SetExpressionPosition(clause);
Handle<Code> ic =
CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code();
CallIC(ic, clause->CompareId());
CallIC(ic);
patch_site.EmitPatchInfo();
Label skip;
......@@ -1162,14 +1162,12 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->getter = property;
}
break;
case ObjectLiteral::Property::SETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->setter = property;
}
break;
......@@ -1421,7 +1419,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ bind(&stub_call);
__ mov(eax, ecx);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ jmp(&done, Label::kNear);
......@@ -1502,7 +1500,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
PopOperand(edx);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
context()->Plug(eax);
}
......@@ -2286,7 +2284,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
__ mov(eax, Immediate(Smi::FromInt(1)));
Handle<Code> code =
CodeFactory::BinaryOpIC(isolate(), expr->binary_op()).code();
CallIC(code, expr->CountBinOpFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ bind(&done);
......@@ -2473,7 +2471,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
}
Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
CallIC(ic, expr->CompareOperationFeedbackId());
CallIC(ic);
patch_site.EmitPatchInfo();
__ test(eax, eax);
......
......@@ -607,7 +607,7 @@ void FullCodeGenerator::DoTest(Expression* condition,
Label* fall_through) {
__ mov(a0, result_register());
Handle<Code> ic = ToBooleanICStub::GetUninitialized(isolate());
CallIC(ic, condition->test_id());
CallIC(ic);
__ LoadRoot(at, Heap::kTrueValueRootIndex);
Split(eq, result_register(), Operand(at), if_true, if_false, fall_through);
}
......@@ -862,7 +862,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
SetExpressionPosition(clause);
Handle<Code> ic =
CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code();
CallIC(ic, clause->CompareId());
CallIC(ic);
patch_site.EmitPatchInfo();
Label skip;
......@@ -1235,14 +1235,12 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->getter = property;
}
break;
case ObjectLiteral::Property::SETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->setter = property;
}
break;
......@@ -1516,7 +1514,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ bind(&stub_call);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ jmp(&done);
......@@ -1587,7 +1585,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
PopOperand(a1);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
context()->Plug(v0);
}
......@@ -2374,7 +2372,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
SetExpressionPosition(expr);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code();
CallIC(code, expr->CountBinOpFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ bind(&done);
......@@ -2562,7 +2560,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
}
Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
CallIC(ic, expr->CompareOperationFeedbackId());
CallIC(ic);
patch_site.EmitPatchInfo();
Split(cc, v0, Operand(zero_reg), if_true, if_false, fall_through);
}
......
......@@ -607,7 +607,7 @@ void FullCodeGenerator::DoTest(Expression* condition,
Label* fall_through) {
__ mov(a0, result_register());
Handle<Code> ic = ToBooleanICStub::GetUninitialized(isolate());
CallIC(ic, condition->test_id());
CallIC(ic);
__ LoadRoot(at, Heap::kTrueValueRootIndex);
Split(eq, result_register(), Operand(at), if_true, if_false, fall_through);
}
......@@ -862,7 +862,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
SetExpressionPosition(clause);
Handle<Code> ic =
CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code();
CallIC(ic, clause->CompareId());
CallIC(ic);
patch_site.EmitPatchInfo();
Label skip;
......@@ -1237,14 +1237,12 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->getter = property;
}
break;
case ObjectLiteral::Property::SETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->setter = property;
}
break;
......@@ -1518,7 +1516,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ bind(&stub_call);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ jmp(&done);
......@@ -1588,7 +1586,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
PopOperand(a1);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
context()->Plug(v0);
}
......@@ -2375,7 +2373,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
SetExpressionPosition(expr);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code();
CallIC(code, expr->CountBinOpFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ bind(&done);
......@@ -2563,7 +2561,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
}
Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
CallIC(ic, expr->CompareOperationFeedbackId());
CallIC(ic);
patch_site.EmitPatchInfo();
Split(cc, v0, Operand(zero_reg), if_true, if_false, fall_through);
}
......
......@@ -591,7 +591,7 @@ void FullCodeGenerator::TestContext::Plug(bool flag) const {
void FullCodeGenerator::DoTest(Expression* condition, Label* if_true,
Label* if_false, Label* fall_through) {
Handle<Code> ic = ToBooleanICStub::GetUninitialized(isolate());
CallIC(ic, condition->test_id());
CallIC(ic);
__ CompareRoot(result_register(), Heap::kTrueValueRootIndex);
Split(eq, if_true, if_false, fall_through);
}
......@@ -830,7 +830,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
SetExpressionPosition(clause);
Handle<Code> ic =
CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code();
CallIC(ic, clause->CompareId());
CallIC(ic);
patch_site.EmitPatchInfo();
Label skip;
......@@ -1210,14 +1210,12 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->getter = property;
}
break;
case ObjectLiteral::Property::SETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->setter = property;
}
break;
......@@ -1485,7 +1483,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ bind(&stub_call);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ b(&done);
......@@ -1591,7 +1589,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
PopOperand(r4);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
context()->Plug(r3);
}
......@@ -2365,7 +2363,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
SetExpressionPosition(expr);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code();
CallIC(code, expr->CountBinOpFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ bind(&done);
......@@ -2553,7 +2551,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
}
Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
CallIC(ic, expr->CompareOperationFeedbackId());
CallIC(ic);
patch_site.EmitPatchInfo();
__ cmpi(r3, Operand::Zero());
Split(cond, if_true, if_false, fall_through);
......
......@@ -573,7 +573,7 @@ void FullCodeGenerator::TestContext::Plug(bool flag) const {
void FullCodeGenerator::DoTest(Expression* condition, Label* if_true,
Label* if_false, Label* fall_through) {
Handle<Code> ic = ToBooleanICStub::GetUninitialized(isolate());
CallIC(ic, condition->test_id());
CallIC(ic);
__ CompareRoot(result_register(), Heap::kTrueValueRootIndex);
Split(eq, if_true, if_false, fall_through);
}
......@@ -802,7 +802,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
SetExpressionPosition(clause);
Handle<Code> ic =
CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code();
CallIC(ic, clause->CompareId());
CallIC(ic);
patch_site.EmitPatchInfo();
Label skip;
......@@ -1177,14 +1177,12 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->getter = property;
}
break;
case ObjectLiteral::Property::SETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->setter = property;
}
break;
......@@ -1449,7 +1447,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ bind(&stub_call);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ b(&done);
......@@ -1567,7 +1565,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
PopOperand(r3);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
context()->Plug(r2);
}
......@@ -2325,7 +2323,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
SetExpressionPosition(expr);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code();
CallIC(code, expr->CountBinOpFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ bind(&done);
......@@ -2509,7 +2507,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
}
Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
CallIC(ic, expr->CompareOperationFeedbackId());
CallIC(ic);
patch_site.EmitPatchInfo();
__ CmpP(r2, Operand::Zero());
Split(cond, if_true, if_false, fall_through);
......
......@@ -576,7 +576,7 @@ void FullCodeGenerator::DoTest(Expression* condition,
Label* if_false,
Label* fall_through) {
Handle<Code> ic = ToBooleanICStub::GetUninitialized(isolate());
CallIC(ic, condition->test_id());
CallIC(ic);
__ CompareRoot(result_register(), Heap::kTrueValueRootIndex);
Split(equal, if_true, if_false, fall_through);
}
......@@ -823,7 +823,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
SetExpressionPosition(clause);
Handle<Code> ic =
CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code();
CallIC(ic, clause->CompareId());
CallIC(ic);
patch_site.EmitPatchInfo();
Label skip;
......@@ -1189,14 +1189,12 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->getter = property;
}
break;
case ObjectLiteral::Property::SETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->setter = property;
}
break;
......@@ -1444,7 +1442,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ bind(&stub_call);
__ movp(rax, rcx);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ jmp(&done, Label::kNear);
......@@ -1491,7 +1489,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
PopOperand(rdx);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
context()->Plug(rax);
}
......@@ -2268,7 +2266,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
__ Move(rax, Smi::FromInt(1));
Handle<Code> code =
CodeFactory::BinaryOpIC(isolate(), expr->binary_op()).code();
CallIC(code, expr->CountBinOpFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ bind(&done);
......@@ -2455,7 +2453,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
}
Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
CallIC(ic, expr->CompareOperationFeedbackId());
CallIC(ic);
patch_site.EmitPatchInfo();
__ testp(rax, rax);
......
......@@ -560,7 +560,7 @@ void FullCodeGenerator::DoTest(Expression* condition,
Label* if_false,
Label* fall_through) {
Handle<Code> ic = ToBooleanICStub::GetUninitialized(isolate());
CallIC(ic, condition->test_id());
CallIC(ic);
__ CompareRoot(result_register(), Heap::kTrueValueRootIndex);
Split(equal, if_true, if_false, fall_through);
}
......@@ -800,7 +800,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
SetExpressionPosition(clause);
Handle<Code> ic =
CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code();
CallIC(ic, clause->CompareId());
CallIC(ic);
patch_site.EmitPatchInfo();
Label skip;
......@@ -1152,14 +1152,12 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->getter = property;
}
break;
case ObjectLiteral::Property::SETTER:
if (property->emit_store()) {
AccessorTable::Iterator it = accessor_table.lookup(key);
it->second->bailout_id = expr->GetIdForPropertySet(i);
it->second->setter = property;
}
break;
......@@ -1411,7 +1409,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ bind(&stub_call);
__ mov(eax, ecx);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ jmp(&done, Label::kNear);
......@@ -1492,7 +1490,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
PopOperand(edx);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
CallIC(code, expr->BinaryOperationFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
context()->Plug(eax);
}
......@@ -2276,7 +2274,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
__ mov(eax, Immediate(Smi::FromInt(1)));
Handle<Code> code =
CodeFactory::BinaryOpIC(isolate(), expr->binary_op()).code();
CallIC(code, expr->CountBinOpFeedbackId());
CallIC(code);
patch_site.EmitPatchInfo();
__ bind(&done);
......@@ -2463,7 +2461,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
}
Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
CallIC(ic, expr->CompareOperationFeedbackId());
CallIC(ic);
patch_site.EmitPatchInfo();
__ test(eax, eax);
......
......@@ -970,8 +970,6 @@
'crankshaft/lithium.cc',
'crankshaft/lithium.h',
'crankshaft/lithium-inl.h',
'crankshaft/typing.cc',
'crankshaft/typing.h',
'crankshaft/unique.h',
'date.cc',
'date.h',
......
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