Index: src/full-codegen/arm/full-codegen-arm.cc |
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc |
index a485f16781149d0bd99024e28401d8256d159455..e4141db5a7634d027d562ef34654530ae7f668c6 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -176,7 +176,8 @@ void FullCodeGenerator::Generate() { |
__ push(r1); |
__ Push(info->scope()->GetScopeInfo(info->isolate())); |
__ CallRuntime(Runtime::kNewScriptContext); |
- PrepareForBailoutForId(BailoutId::ScriptContext(), TOS_REG); |
+ PrepareForBailoutForId(BailoutId::ScriptContext(), |
+ BailoutState::TOS_REGISTER); |
// The new target value is not used, clobbering is safe. |
DCHECK_NULL(info->scope()->new_target_var()); |
} else { |
@@ -232,7 +233,8 @@ void FullCodeGenerator::Generate() { |
// Register holding this function and new target are both trashed in case we |
// bailout here. But since that can happen only when new target is not used |
// and we allocate a context, the value of |function_in_register| is correct. |
- PrepareForBailoutForId(BailoutId::FunctionContext(), NO_REGISTERS); |
+ PrepareForBailoutForId(BailoutId::FunctionContext(), |
+ BailoutState::NO_REGISTERS); |
// Possibly set up a local binding to the this function which is used in |
// derived constructors with super calls. |
@@ -294,7 +296,8 @@ void FullCodeGenerator::Generate() { |
} |
// Visit the declarations and body. |
- PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); |
+ PrepareForBailoutForId(BailoutId::FunctionEntry(), |
+ BailoutState::NO_REGISTERS); |
{ |
Comment cmnt(masm_, "[ Declarations"); |
VisitDeclarations(scope()->declarations()); |
@@ -307,7 +310,8 @@ void FullCodeGenerator::Generate() { |
{ |
Comment cmnt(masm_, "[ Stack check"); |
- PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); |
+ PrepareForBailoutForId(BailoutId::Declarations(), |
+ BailoutState::NO_REGISTERS); |
Label ok; |
__ LoadRoot(ip, Heap::kStackLimitRootIndex); |
__ cmp(sp, Operand(ip)); |
@@ -405,11 +409,11 @@ void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt, |
EmitProfilingCounterReset(); |
__ bind(&ok); |
- PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); |
+ PrepareForBailoutForId(stmt->EntryId(), BailoutState::NO_REGISTERS); |
// Record a mapping of the OSR id to this PC. This is used if the OSR |
// entry becomes the target of a bailout. We don't expect it to be, but |
// we want it to work if it is. |
- PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS); |
+ PrepareForBailoutForId(stmt->OsrEntryId(), BailoutState::NO_REGISTERS); |
} |
void FullCodeGenerator::EmitProfilingCounterHandlingForReturnSequence( |
@@ -731,7 +735,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, |
Label skip; |
if (should_normalize) __ b(&skip); |
- PrepareForBailout(expr, TOS_REG); |
+ PrepareForBailout(expr, BailoutState::TOS_REGISTER); |
if (should_normalize) { |
__ LoadRoot(ip, Heap::kTrueValueRootIndex); |
__ cmp(r0, ip); |
@@ -789,7 +793,7 @@ void FullCodeGenerator::VisitVariableDeclaration( |
__ LoadRoot(r0, Heap::kTheHoleValueRootIndex); |
__ str(r0, ContextMemOperand(cp, variable->index())); |
// No write barrier since the_hole_value is in old space. |
- PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
+ PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
} |
break; |
@@ -810,7 +814,7 @@ void FullCodeGenerator::VisitVariableDeclaration( |
__ Push(r2, r0); |
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
__ CallRuntime(Runtime::kDeclareLookupSlot); |
- PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
+ PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
break; |
} |
} |
@@ -856,7 +860,7 @@ void FullCodeGenerator::VisitFunctionDeclaration( |
kDontSaveFPRegs, |
EMIT_REMEMBERED_SET, |
OMIT_SMI_CHECK); |
- PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
+ PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
break; |
} |
@@ -868,7 +872,7 @@ void FullCodeGenerator::VisitFunctionDeclaration( |
VisitForStackValue(declaration->fun()); |
PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); |
- PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
+ PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
break; |
} |
} |
@@ -900,7 +904,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { |
// Keep the switch value on the stack until a case matches. |
VisitForStackValue(stmt->tag()); |
- PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); |
+ PrepareForBailoutForId(stmt->EntryId(), BailoutState::NO_REGISTERS); |
ZoneList<CaseClause*>* clauses = stmt->cases(); |
CaseClause* default_clause = NULL; // Can occur anywhere in the list. |
@@ -949,7 +953,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { |
Label skip; |
__ b(&skip); |
- PrepareForBailout(clause, TOS_REG); |
+ PrepareForBailout(clause, BailoutState::TOS_REGISTER); |
__ LoadRoot(ip, Heap::kTrueValueRootIndex); |
__ cmp(r0, ip); |
__ b(ne, &next_test); |
@@ -978,12 +982,12 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { |
Comment cmnt(masm_, "[ Case body"); |
CaseClause* clause = clauses->at(i); |
__ bind(clause->body_target()); |
- PrepareForBailoutForId(clause->EntryId(), NO_REGISTERS); |
+ PrepareForBailoutForId(clause->EntryId(), BailoutState::NO_REGISTERS); |
VisitStatements(clause->statements()); |
} |
__ bind(nested_statement.break_label()); |
- PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS); |
+ PrepareForBailoutForId(stmt->ExitId(), BailoutState::NO_REGISTERS); |
} |
@@ -1016,7 +1020,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
ToObjectStub stub(isolate()); |
__ CallStub(&stub); |
__ bind(&done_convert); |
- PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); |
+ PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); |
__ push(r0); |
// Check cache validity in generated code. If we cannot guarantee cache |
@@ -1036,7 +1040,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
__ bind(&call_runtime); |
__ push(r0); // Duplicate the enumerable object on the stack. |
__ CallRuntime(Runtime::kForInEnumerate); |
- PrepareForBailoutForId(stmt->EnumId(), TOS_REG); |
+ PrepareForBailoutForId(stmt->EnumId(), BailoutState::TOS_REGISTER); |
// If we got a map from the runtime call, we can do a fast |
// modification check. Otherwise, we got a fixed array, and we have |
@@ -1077,7 +1081,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
__ Push(r1, r0); // Smi and array |
__ ldr(r1, FieldMemOperand(r0, FixedArray::kLengthOffset)); |
__ Push(r1); // Fixed array length (as smi). |
- PrepareForBailoutForId(stmt->PrepareId(), NO_REGISTERS); |
+ PrepareForBailoutForId(stmt->PrepareId(), BailoutState::NO_REGISTERS); |
__ mov(r0, Operand(Smi::FromInt(0))); |
__ Push(r0); // Initial index. |
@@ -1119,7 +1123,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
__ push(r1); // Enumerable. |
__ push(r3); // Current entry. |
__ CallRuntime(Runtime::kForInFilter); |
- PrepareForBailoutForId(stmt->FilterId(), TOS_REG); |
+ PrepareForBailoutForId(stmt->FilterId(), BailoutState::TOS_REGISTER); |
__ mov(r3, Operand(r0)); |
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex); |
__ cmp(r0, ip); |
@@ -1132,11 +1136,11 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
// Perform the assignment as if via '='. |
{ EffectContext context(this); |
EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); |
- PrepareForBailoutForId(stmt->AssignmentId(), NO_REGISTERS); |
+ PrepareForBailoutForId(stmt->AssignmentId(), BailoutState::NO_REGISTERS); |
} |
// Both Crankshaft and Turbofan expect BodyId to be right before stmt->body(). |
- PrepareForBailoutForId(stmt->BodyId(), NO_REGISTERS); |
+ PrepareForBailoutForId(stmt->BodyId(), BailoutState::NO_REGISTERS); |
// Generate code for the body of the loop. |
Visit(stmt->body()); |
@@ -1155,7 +1159,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
DropOperands(5); |
// Exit and decrement the loop depth. |
- PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS); |
+ PrepareForBailoutForId(stmt->ExitId(), BailoutState::NO_REGISTERS); |
__ bind(&exit); |
decrement_loop_depth(); |
} |
@@ -1314,7 +1318,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
TypeofMode typeof_mode) { |
// Record position before possible IC call. |
SetExpressionPosition(proxy); |
- PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS); |
+ PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); |
Variable* var = proxy->var(); |
// Three cases: global variables, lookup variables, and all other types of |
@@ -1421,7 +1425,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
__ CallStub(&stub); |
RestoreContext(); |
} |
- PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
+ PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); |
// If result_saved is true the result is on top of the stack. If |
// result_saved is false the result is in r0. |
@@ -1457,7 +1461,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
__ ldr(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
EmitLoadStoreICSlot(property->GetSlot(0)); |
CallStoreIC(); |
- PrepareForBailoutForId(key->id(), NO_REGISTERS); |
+ PrepareForBailoutForId(key->id(), BailoutState::NO_REGISTERS); |
if (NeedsHomeObject(value)) { |
EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1)); |
@@ -1491,7 +1495,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
DCHECK(property->emit_store()); |
CallRuntimeWithOperands(Runtime::kInternalSetPrototype); |
PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), |
- NO_REGISTERS); |
+ BailoutState::NO_REGISTERS); |
break; |
case ObjectLiteral::Property::GETTER: |
@@ -1549,7 +1553,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
DCHECK(property->emit_store()); |
CallRuntimeWithOperands(Runtime::kInternalSetPrototype); |
PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), |
- NO_REGISTERS); |
+ BailoutState::NO_REGISTERS); |
} else { |
EmitPropertyKey(property, expr->GetIdForPropertyName(property_index)); |
VisitForStackValue(value); |
@@ -1622,7 +1626,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
__ CallStub(&stub); |
} |
- PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
+ PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); |
bool result_saved = false; // Is the result saved to the stack? |
ZoneList<Expression*>* subexprs = expr->values(); |
@@ -1652,7 +1656,8 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
CallIC(ic); |
- PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS); |
+ PrepareForBailoutForId(expr->GetIdForElement(array_index), |
+ BailoutState::NO_REGISTERS); |
} |
// In case the array literal contains spread expressions it has two parts. The |
@@ -1672,7 +1677,8 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
VisitForStackValue(subexpr); |
CallRuntimeWithOperands(Runtime::kAppendElement); |
- PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS); |
+ PrepareForBailoutForId(expr->GetIdForElement(array_index), |
+ BailoutState::NO_REGISTERS); |
} |
if (result_saved) { |
@@ -1755,23 +1761,27 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
switch (assign_type) { |
case VARIABLE: |
EmitVariableLoad(expr->target()->AsVariableProxy()); |
- PrepareForBailout(expr->target(), TOS_REG); |
+ PrepareForBailout(expr->target(), BailoutState::TOS_REGISTER); |
break; |
case NAMED_PROPERTY: |
EmitNamedPropertyLoad(property); |
- PrepareForBailoutForId(property->LoadId(), TOS_REG); |
+ PrepareForBailoutForId(property->LoadId(), |
+ BailoutState::TOS_REGISTER); |
break; |
case NAMED_SUPER_PROPERTY: |
EmitNamedSuperPropertyLoad(property); |
- PrepareForBailoutForId(property->LoadId(), TOS_REG); |
+ PrepareForBailoutForId(property->LoadId(), |
+ BailoutState::TOS_REGISTER); |
break; |
case KEYED_SUPER_PROPERTY: |
EmitKeyedSuperPropertyLoad(property); |
- PrepareForBailoutForId(property->LoadId(), TOS_REG); |
+ PrepareForBailoutForId(property->LoadId(), |
+ BailoutState::TOS_REGISTER); |
break; |
case KEYED_PROPERTY: |
EmitKeyedPropertyLoad(property); |
- PrepareForBailoutForId(property->LoadId(), TOS_REG); |
+ PrepareForBailoutForId(property->LoadId(), |
+ BailoutState::TOS_REGISTER); |
break; |
} |
} |
@@ -1791,7 +1801,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
} |
// Deoptimization point in case the binary operation may have side effects. |
- PrepareForBailout(expr->binary_operation(), TOS_REG); |
+ PrepareForBailout(expr->binary_operation(), BailoutState::TOS_REGISTER); |
} else { |
VisitForAccumulatorValue(expr->value()); |
} |
@@ -1803,7 +1813,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
case VARIABLE: |
EmitVariableAssignment(expr->target()->AsVariableProxy()->var(), |
expr->op(), expr->AssignmentSlot()); |
- PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
+ PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); |
context()->Plug(r0); |
break; |
case NAMED_PROPERTY: |
@@ -2271,7 +2281,7 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
EmitLoadStoreICSlot(expr->AssignmentSlot()); |
CallStoreIC(); |
- PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
+ PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); |
context()->Plug(r0); |
} |
@@ -2316,7 +2326,7 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
EmitLoadStoreICSlot(expr->AssignmentSlot()); |
CallIC(ic); |
- PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
+ PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); |
context()->Plug(r0); |
} |
@@ -2340,7 +2350,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { |
if (callee->IsVariableProxy()) { |
{ StackValueContext context(this); |
EmitVariableLoad(callee->AsVariableProxy()); |
- PrepareForBailout(callee, NO_REGISTERS); |
+ PrepareForBailout(callee, BailoutState::NO_REGISTERS); |
} |
// Push undefined as receiver. This is patched in the method prologue if it |
// is a sloppy mode method. |
@@ -2353,7 +2363,8 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { |
DCHECK(!callee->AsProperty()->IsSuperAccess()); |
__ ldr(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0)); |
EmitNamedPropertyLoad(callee->AsProperty()); |
- PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); |
+ PrepareForBailoutForId(callee->AsProperty()->LoadId(), |
+ BailoutState::TOS_REGISTER); |
// Push the target function under the receiver. |
__ ldr(ip, MemOperand(sp, 0)); |
PushOperand(ip); |
@@ -2392,7 +2403,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) { |
// - home_object |
// - key |
CallRuntimeWithOperands(Runtime::kLoadFromSuper); |
- PrepareForBailoutForId(prop->LoadId(), TOS_REG); |
+ PrepareForBailoutForId(prop->LoadId(), BailoutState::TOS_REGISTER); |
// Replace home_object with target function. |
__ str(r0, MemOperand(sp, kPointerSize)); |
@@ -2417,7 +2428,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, |
__ ldr(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0)); |
__ Move(LoadDescriptor::NameRegister(), r0); |
EmitKeyedPropertyLoad(callee->AsProperty()); |
- PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); |
+ PrepareForBailoutForId(callee->AsProperty()->LoadId(), |
+ BailoutState::TOS_REGISTER); |
// Push the target function under the receiver. |
__ ldr(ip, MemOperand(sp, 0)); |
@@ -2453,7 +2465,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) { |
// - home_object |
// - key |
CallRuntimeWithOperands(Runtime::kLoadKeyedFromSuper); |
- PrepareForBailoutForId(prop->LoadId(), TOS_REG); |
+ PrepareForBailoutForId(prop->LoadId(), BailoutState::TOS_REGISTER); |
// Replace home_object with target function. |
__ str(r0, MemOperand(sp, kPointerSize)); |
@@ -2473,7 +2485,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { |
VisitForStackValue(args->at(i)); |
} |
- PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
+ PrepareForBailoutForId(expr->CallId(), BailoutState::NO_REGISTERS); |
SetCallPosition(expr, expr->tail_call_mode()); |
if (expr->tail_call_mode() == TailCallMode::kAllow) { |
if (FLAG_trace) { |
@@ -2541,7 +2553,7 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) { |
__ Push(callee->name()); |
__ CallRuntime(Runtime::kLoadLookupSlotForCall); |
PushOperands(r0, r1); // Function, receiver. |
- PrepareForBailoutForId(expr->LookupId(), NO_REGISTERS); |
+ PrepareForBailoutForId(expr->LookupId(), BailoutState::NO_REGISTERS); |
// If fast case code has been generated, emit code to push the |
// function and receiver and have the slow path jump around this |
@@ -2590,7 +2602,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) { |
// Touch up the stack with the resolved function. |
__ str(r0, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
- PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS); |
+ PrepareForBailoutForId(expr->EvalId(), BailoutState::NO_REGISTERS); |
// Record source position for debugger. |
SetCallPosition(expr); |
@@ -2640,7 +2652,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
CallConstructStub stub(isolate()); |
__ Call(stub.GetCode(), RelocInfo::CODE_TARGET); |
OperandStackDepthDecrement(arg_count + 1); |
- PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
+ PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER); |
RestoreContext(); |
context()->Plug(r0); |
} |
@@ -3072,7 +3084,7 @@ void FullCodeGenerator::EmitCall(CallRuntime* expr) { |
for (Expression* const arg : *args) { |
VisitForStackValue(arg); |
} |
- PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
+ PrepareForBailoutForId(expr->CallId(), BailoutState::NO_REGISTERS); |
// Move target to r1. |
int const argc = args->length() - 2; |
__ ldr(r1, MemOperand(sp, (argc + 1) * kPointerSize)); |
@@ -3282,12 +3294,14 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
&materialize_true); |
if (!context()->IsAccumulatorValue()) OperandStackDepthIncrement(1); |
__ bind(&materialize_true); |
- PrepareForBailoutForId(expr->MaterializeTrueId(), NO_REGISTERS); |
+ PrepareForBailoutForId(expr->MaterializeTrueId(), |
+ BailoutState::NO_REGISTERS); |
__ LoadRoot(r0, Heap::kTrueValueRootIndex); |
if (context()->IsStackValue()) __ push(r0); |
__ jmp(&done); |
__ bind(&materialize_false); |
- PrepareForBailoutForId(expr->MaterializeFalseId(), NO_REGISTERS); |
+ PrepareForBailoutForId(expr->MaterializeFalseId(), |
+ BailoutState::NO_REGISTERS); |
__ LoadRoot(r0, Heap::kFalseValueRootIndex); |
if (context()->IsStackValue()) __ push(r0); |
__ bind(&done); |
@@ -3389,9 +3403,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
// We need a second deoptimization point after loading the value |
// in case evaluating the property load my have a side effect. |
if (assign_type == VARIABLE) { |
- PrepareForBailout(expr->expression(), TOS_REG); |
+ PrepareForBailout(expr->expression(), BailoutState::TOS_REGISTER); |
} else { |
- PrepareForBailoutForId(prop->LoadId(), TOS_REG); |
+ PrepareForBailoutForId(prop->LoadId(), BailoutState::TOS_REGISTER); |
} |
// Inline smi case if we are in a loop. |
@@ -3440,7 +3454,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
// Convert old value into a number. |
ToNumberStub convert_stub(isolate()); |
__ CallStub(&convert_stub); |
- PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
+ PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); |
// Save result for postfix expressions. |
if (expr->is_postfix()) { |
@@ -3487,7 +3501,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
{ EffectContext context(this); |
EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
Token::ASSIGN, expr->CountSlot()); |
- PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
+ PrepareForBailoutForId(expr->AssignmentId(), |
+ BailoutState::TOS_REGISTER); |
context.Plug(r0); |
} |
// For all contexts except EffectConstant We have the result on |
@@ -3498,7 +3513,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
} else { |
EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
Token::ASSIGN, expr->CountSlot()); |
- PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
+ PrepareForBailoutForId(expr->AssignmentId(), |
+ BailoutState::TOS_REGISTER); |
context()->Plug(r0); |
} |
break; |
@@ -3508,7 +3524,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
PopOperand(StoreDescriptor::ReceiverRegister()); |
EmitLoadStoreICSlot(expr->CountSlot()); |
CallStoreIC(); |
- PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
+ PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); |
if (expr->is_postfix()) { |
if (!context()->IsEffect()) { |
context()->PlugTOS(); |
@@ -3547,7 +3563,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
EmitLoadStoreICSlot(expr->CountSlot()); |
CallIC(ic); |
- PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
+ PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); |
if (expr->is_postfix()) { |
if (!context()->IsEffect()) { |
context()->PlugTOS(); |