diff options
Diffstat (limited to 'deps/v8/src/full-codegen/mips/full-codegen-mips.cc')
-rw-r--r-- | deps/v8/src/full-codegen/mips/full-codegen-mips.cc | 937 |
1 files changed, 80 insertions, 857 deletions
diff --git a/deps/v8/src/full-codegen/mips/full-codegen-mips.cc b/deps/v8/src/full-codegen/mips/full-codegen-mips.cc index 10cdb54b40..4599439c81 100644 --- a/deps/v8/src/full-codegen/mips/full-codegen-mips.cc +++ b/deps/v8/src/full-codegen/mips/full-codegen-mips.cc @@ -12,15 +12,16 @@ // places where we have to move a previous result in v0 to a0 for the // next call: mov(a0, v0). This is not needed on the other architectures. -#include "src/full-codegen/full-codegen.h" #include "src/ast/compile-time-value.h" #include "src/ast/scopes.h" +#include "src/builtins/builtins-constructor.h" #include "src/code-factory.h" #include "src/code-stubs.h" #include "src/codegen.h" #include "src/compilation-info.h" #include "src/compiler.h" #include "src/debug/debug.h" +#include "src/full-codegen/full-codegen.h" #include "src/ic/ic.h" #include "src/mips/code-stubs-mips.h" @@ -153,8 +154,6 @@ void FullCodeGenerator::Generate() { { Comment cmnt(masm_, "[ Allocate locals"); int locals_count = info->scope()->num_stack_slots(); - // Generators allocate locals, if any, in context slots. - DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); OperandStackDepthIncrement(locals_count); if (locals_count > 0) { if (locals_count >= 128) { @@ -210,15 +209,18 @@ void FullCodeGenerator::Generate() { if (info->scope()->new_target_var() != nullptr) { __ push(a3); // Preserve new target. } - if (slots <= FastNewFunctionContextStub::kMaximumSlots) { - FastNewFunctionContextStub stub(isolate()); + if (slots <= + ConstructorBuiltinsAssembler::MaximumFunctionContextSlots()) { + Callable callable = CodeFactory::FastNewFunctionContext( + isolate(), info->scope()->scope_type()); __ li(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); - __ CallStub(&stub); - // Result of FastNewFunctionContextStub is always in new space. + __ Call(callable.code(), RelocInfo::CODE_TARGET); + // Result of the FastNewFunctionContext builtin is always in new space. need_write_barrier = false; } else { __ push(a1); + __ Push(Smi::FromInt(info->scope()->scope_type())); __ CallRuntime(Runtime::kNewFunctionContext); } if (info->scope()->new_target_var() != nullptr) { @@ -265,37 +267,10 @@ void FullCodeGenerator::Generate() { 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. - Variable* this_function_var = info->scope()->this_function_var(); - if (this_function_var != nullptr) { - Comment cmnt(masm_, "[ This function"); - if (!function_in_register_a1) { - __ lw(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); - // The write barrier clobbers register again, keep it marked as such. - } - SetVar(this_function_var, a1, a0, a2); - } - - // Possibly set up a local binding to the new target value. - Variable* new_target_var = info->scope()->new_target_var(); - if (new_target_var != nullptr) { - Comment cmnt(masm_, "[ new.target"); - SetVar(new_target_var, a3, a0, a2); - } - - // Possibly allocate RestParameters - Variable* rest_param = info->scope()->rest_parameter(); - if (rest_param != nullptr) { - Comment cmnt(masm_, "[ Allocate rest parameter array"); - if (!function_in_register_a1) { - __ lw(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); - } - FastNewRestParameterStub stub(isolate()); - __ CallStub(&stub); - function_in_register_a1 = false; - SetVar(rest_param, v0, a1, a2); - } + // We don't support new.target and rest parameters here. + DCHECK_NULL(info->scope()->new_target_var()); + DCHECK_NULL(info->scope()->rest_parameter()); + DCHECK_NULL(info->scope()->this_function_var()); Variable* arguments = info->scope()->arguments(); if (arguments != NULL) { @@ -547,10 +522,8 @@ void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { true, true_label_, false_label_); - DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || - !lit->IsUndetectable()); - if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) || - lit->IsFalse(isolate())) { + DCHECK(lit->IsNullOrUndefined(isolate()) || !lit->IsUndetectable()); + if (lit->IsNullOrUndefined(isolate()) || lit->IsFalse(isolate())) { if (false_label_ != fall_through_) __ Branch(false_label_); } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { if (true_label_ != fall_through_) __ Branch(true_label_); @@ -782,6 +755,7 @@ void FullCodeGenerator::VisitVariableDeclaration( switch (variable->location()) { case VariableLocation::UNALLOCATED: { DCHECK(!variable->binding_needs_init()); + globals_->Add(variable->name(), zone()); FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); DCHECK(!slot.IsInvalid()); globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); @@ -808,17 +782,7 @@ void FullCodeGenerator::VisitVariableDeclaration( } break; - case VariableLocation::LOOKUP: { - Comment cmnt(masm_, "[ VariableDeclaration"); - DCHECK_EQ(VAR, variable->mode()); - DCHECK(!variable->binding_needs_init()); - __ li(a2, Operand(variable->name())); - __ Push(a2); - __ CallRuntime(Runtime::kDeclareEvalVar); - PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); - break; - } - + case VariableLocation::LOOKUP: case VariableLocation::MODULE: UNREACHABLE(); } @@ -831,6 +795,7 @@ void FullCodeGenerator::VisitFunctionDeclaration( Variable* variable = proxy->var(); switch (variable->location()) { case VariableLocation::UNALLOCATED: { + globals_->Add(variable->name(), zone()); FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); DCHECK(!slot.IsInvalid()); globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); @@ -869,17 +834,7 @@ void FullCodeGenerator::VisitFunctionDeclaration( break; } - case VariableLocation::LOOKUP: { - Comment cmnt(masm_, "[ FunctionDeclaration"); - __ li(a2, Operand(variable->name())); - PushOperand(a2); - // Push initial value for function declaration. - VisitForStackValue(declaration->fun()); - CallRuntimeWithOperands(Runtime::kDeclareEvalFunction); - PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); - break; - } - + case VariableLocation::LOOKUP: case VariableLocation::MODULE: UNREACHABLE(); } @@ -1183,93 +1138,6 @@ void FullCodeGenerator::EmitSetHomeObjectAccumulator(Expression* initializer, CallStoreIC(slot, isolate()->factory()->home_object_symbol()); } - -void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, - TypeofMode typeof_mode, - Label* slow) { - Register current = cp; - Register next = a1; - Register temp = a2; - - int to_check = scope()->ContextChainLengthUntilOutermostSloppyEval(); - for (Scope* s = scope(); to_check > 0; s = s->outer_scope()) { - if (!s->NeedsContext()) continue; - if (s->calls_sloppy_eval()) { - // Check that extension is "the hole". - __ lw(temp, ContextMemOperand(current, Context::EXTENSION_INDEX)); - __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); - } - // Load next context in chain. - __ lw(next, ContextMemOperand(current, Context::PREVIOUS_INDEX)); - // Walk the rest of the chain without clobbering cp. - current = next; - to_check--; - } - - // All extension objects were empty and it is safe to use a normal global - // load machinery. - EmitGlobalVariableLoad(proxy, typeof_mode); -} - - -MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, - Label* slow) { - DCHECK(var->IsContextSlot()); - Register context = cp; - Register next = a3; - Register temp = t0; - - for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { - if (s->NeedsContext()) { - if (s->calls_sloppy_eval()) { - // Check that extension is "the hole". - __ lw(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); - __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); - } - __ lw(next, ContextMemOperand(context, Context::PREVIOUS_INDEX)); - // Walk the rest of the chain without clobbering cp. - context = next; - } - } - // Check that last extension is "the hole". - __ lw(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); - __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); - - // This function is used only for loads, not stores, so it's safe to - // return an cp-based operand (the write barrier cannot be allowed to - // destroy the cp register). - return ContextMemOperand(context, var->index()); -} - - -void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy, - TypeofMode typeof_mode, - Label* slow, Label* done) { - // Generate fast-case code for variables that might be shadowed by - // eval-introduced variables. Eval is used a lot without - // introducing variables. In those cases, we do not want to - // perform a runtime call for all variables in the scope - // containing the eval. - Variable* var = proxy->var(); - if (var->mode() == DYNAMIC_GLOBAL) { - EmitLoadGlobalCheckExtensions(proxy, typeof_mode, slow); - __ Branch(done); - } else if (var->mode() == DYNAMIC_LOCAL) { - Variable* local = var->local_if_not_shadowed(); - __ lw(v0, ContextSlotOperandCheckExtensions(local, slow)); - if (local->binding_needs_init()) { - __ LoadRoot(at, Heap::kTheHoleValueRootIndex); - __ subu(at, v0, at); // Sub as compare: at == 0 on eq. - __ Branch(done, ne, at, Operand(zero_reg)); - __ li(a0, Operand(var->name())); - __ push(a0); - __ CallRuntime(Runtime::kThrowReferenceError); - } else { - __ Branch(done); - } - } -} - void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, TypeofMode typeof_mode) { // Record position before possible IC call. @@ -1277,8 +1145,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); Variable* var = proxy->var(); - // Three cases: global variables, lookup variables, and all other types of - // variables. + // Two cases: global variables and all other types of variables. switch (var->location()) { case VariableLocation::UNALLOCATED: { Comment cmnt(masm_, "[ Global variable"); @@ -1312,24 +1179,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, break; } - case VariableLocation::LOOKUP: { - Comment cmnt(masm_, "[ Lookup variable"); - Label done, slow; - // Generate code for loading from variables potentially shadowed - // by eval-introduced variables. - EmitDynamicLookupFastCase(proxy, typeof_mode, &slow, &done); - __ bind(&slow); - __ Push(var->name()); - Runtime::FunctionId function_id = - typeof_mode == NOT_INSIDE_TYPEOF - ? Runtime::kLoadLookupSlot - : Runtime::kLoadLookupSlotInsideTypeof; - __ CallRuntime(function_id); - __ bind(&done); - context()->Plug(v0); - break; - } - + case VariableLocation::LOOKUP: case VariableLocation::MODULE: UNREACHABLE(); } @@ -1356,7 +1206,8 @@ void FullCodeGenerator::EmitAccessor(ObjectLiteralProperty* property) { void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { Comment cmnt(masm_, "[ ObjectLiteral"); - Handle<FixedArray> constant_properties = expr->constant_properties(); + Handle<FixedArray> constant_properties = + expr->GetOrBuildConstantProperties(isolate()); __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); __ li(a1, Operand(constant_properties)); @@ -1365,8 +1216,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { __ Push(a3, a2, a1, a0); __ CallRuntime(Runtime::kCreateObjectLiteral); } else { - FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); - __ CallStub(&stub); + Callable callable = CodeFactory::FastCloneShallowObject( + isolate(), expr->properties_count()); + __ Call(callable.code(), RelocInfo::CODE_TARGET); RestoreContext(); } PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); @@ -1376,10 +1228,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { bool result_saved = false; AccessorTable accessor_table(zone()); - int property_index = 0; - for (; property_index < expr->properties()->length(); property_index++) { - ObjectLiteral::Property* property = expr->properties()->at(property_index); - if (property->is_computed_name()) break; + for (int i = 0; i < expr->properties()->length(); i++) { + ObjectLiteral::Property* property = expr->properties()->at(i); + DCHECK(!property->is_computed_name()); if (property->IsCompileTimeValue()) continue; Literal* key = property->key()->AsLiteral(); @@ -1389,6 +1240,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { result_saved = true; } switch (property->kind()) { + case ObjectLiteral::Property::SPREAD: case ObjectLiteral::Property::CONSTANT: UNREACHABLE(); case ObjectLiteral::Property::MATERIALIZED_LITERAL: @@ -1438,20 +1290,20 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { VisitForStackValue(value); DCHECK(property->emit_store()); CallRuntimeWithOperands(Runtime::kInternalSetPrototype); - PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), + PrepareForBailoutForId(expr->GetIdForPropertySet(i), BailoutState::NO_REGISTERS); break; case ObjectLiteral::Property::GETTER: if (property->emit_store()) { AccessorTable::Iterator it = accessor_table.lookup(key); - it->second->bailout_id = expr->GetIdForPropertySet(property_index); + 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(property_index); + it->second->bailout_id = expr->GetIdForPropertySet(i); it->second->setter = property; } break; @@ -1474,73 +1326,6 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { PrepareForBailoutForId(it->second->bailout_id, BailoutState::NO_REGISTERS); } - // Object literals have two parts. The "static" part on the left contains no - // computed property names, and so we can compute its map ahead of time; see - // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part - // starts with the first computed property name, and continues with all - // properties to its right. All the code from above initializes the static - // component of the object literal, and arranges for the map of the result to - // reflect the static order in which the keys appear. For the dynamic - // properties, we compile them into a series of "SetOwnProperty" runtime - // calls. This will preserve insertion order. - for (; property_index < expr->properties()->length(); property_index++) { - ObjectLiteral::Property* property = expr->properties()->at(property_index); - - Expression* value = property->value(); - if (!result_saved) { - PushOperand(v0); // Save result on the stack - result_saved = true; - } - - __ lw(a0, MemOperand(sp)); // Duplicate receiver. - PushOperand(a0); - - if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { - DCHECK(!property->is_computed_name()); - VisitForStackValue(value); - DCHECK(property->emit_store()); - CallRuntimeWithOperands(Runtime::kInternalSetPrototype); - PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), - BailoutState::NO_REGISTERS); - } else { - EmitPropertyKey(property, expr->GetIdForPropertyName(property_index)); - VisitForStackValue(value); - if (NeedsHomeObject(value)) { - EmitSetHomeObject(value, 2, property->GetSlot()); - } - - switch (property->kind()) { - case ObjectLiteral::Property::CONSTANT: - case ObjectLiteral::Property::MATERIALIZED_LITERAL: - case ObjectLiteral::Property::COMPUTED: - if (property->emit_store()) { - PushOperand(Smi::FromInt(NONE)); - PushOperand(Smi::FromInt(property->NeedsSetFunctionName())); - CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral); - PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), - BailoutState::NO_REGISTERS); - } else { - DropOperands(3); - } - break; - - case ObjectLiteral::Property::PROTOTYPE: - UNREACHABLE(); - break; - - case ObjectLiteral::Property::GETTER: - PushOperand(Smi::FromInt(NONE)); - CallRuntimeWithOperands(Runtime::kDefineGetterPropertyUnchecked); - break; - - case ObjectLiteral::Property::SETTER: - PushOperand(Smi::FromInt(NONE)); - CallRuntimeWithOperands(Runtime::kDefineSetterPropertyUnchecked); - break; - } - } - } - if (result_saved) { context()->PlugTOS(); } else { @@ -1552,7 +1337,8 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { Comment cmnt(masm_, "[ ArrayLiteral"); - Handle<FixedArray> constant_elements = expr->constant_elements(); + Handle<ConstantElementsPair> constant_elements = + expr->GetOrBuildConstantElements(isolate()); bool has_fast_elements = IsFastObjectElementsKind(expr->constant_elements_kind()); @@ -1572,8 +1358,9 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { __ Push(a3, a2, a1, a0); __ CallRuntime(Runtime::kCreateArrayLiteral); } else { - FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); - __ CallStub(&stub); + Callable callable = + CodeFactory::FastCloneShallowArray(isolate(), allocation_site_mode); + __ Call(callable.code(), RelocInfo::CODE_TARGET); RestoreContext(); } PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); @@ -1638,34 +1425,6 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { VisitForStackValue(property->obj()); } break; - case NAMED_SUPER_PROPERTY: - VisitForStackValue( - property->obj()->AsSuperPropertyReference()->this_var()); - VisitForAccumulatorValue( - property->obj()->AsSuperPropertyReference()->home_object()); - PushOperand(result_register()); - if (expr->is_compound()) { - const Register scratch = a1; - __ lw(scratch, MemOperand(sp, kPointerSize)); - PushOperands(scratch, result_register()); - } - break; - case KEYED_SUPER_PROPERTY: { - VisitForStackValue( - property->obj()->AsSuperPropertyReference()->this_var()); - VisitForStackValue( - property->obj()->AsSuperPropertyReference()->home_object()); - VisitForAccumulatorValue(property->key()); - PushOperand(result_register()); - if (expr->is_compound()) { - const Register scratch1 = t0; - const Register scratch2 = a1; - __ lw(scratch1, MemOperand(sp, 2 * kPointerSize)); - __ lw(scratch2, MemOperand(sp, 1 * kPointerSize)); - PushOperands(scratch1, scratch2, result_register()); - } - break; - } case KEYED_PROPERTY: // We need the key and receiver on both the stack and in v0 and a1. if (expr->is_compound()) { @@ -1679,6 +1438,10 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { VisitForStackValue(property->key()); } break; + case NAMED_SUPER_PROPERTY: + case KEYED_SUPER_PROPERTY: + UNREACHABLE(); + break; } // For compound assignments we need another deoptimization point after the @@ -1695,21 +1458,15 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { PrepareForBailoutForId(property->LoadId(), BailoutState::TOS_REGISTER); break; - case NAMED_SUPER_PROPERTY: - EmitNamedSuperPropertyLoad(property); - PrepareForBailoutForId(property->LoadId(), - BailoutState::TOS_REGISTER); - break; - case KEYED_SUPER_PROPERTY: - EmitKeyedSuperPropertyLoad(property); - PrepareForBailoutForId(property->LoadId(), - BailoutState::TOS_REGISTER); - break; case KEYED_PROPERTY: EmitKeyedPropertyLoad(property); PrepareForBailoutForId(property->LoadId(), BailoutState::TOS_REGISTER); break; + case NAMED_SUPER_PROPERTY: + case KEYED_SUPER_PROPERTY: + UNREACHABLE(); + break; } } @@ -1748,69 +1505,20 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { case NAMED_PROPERTY: EmitNamedPropertyAssignment(expr); break; - case NAMED_SUPER_PROPERTY: - EmitNamedSuperPropertyStore(property); - context()->Plug(v0); - break; - case KEYED_SUPER_PROPERTY: - EmitKeyedSuperPropertyStore(property); - context()->Plug(v0); - break; case KEYED_PROPERTY: EmitKeyedPropertyAssignment(expr); break; + case NAMED_SUPER_PROPERTY: + case KEYED_SUPER_PROPERTY: + UNREACHABLE(); + break; } } void FullCodeGenerator::VisitYield(Yield* expr) { - Comment cmnt(masm_, "[ Yield"); - SetExpressionPosition(expr); - - // Evaluate yielded value first; the initial iterator definition depends on - // this. It stays on the stack while we update the iterator. - VisitForStackValue(expr->expression()); - - Label suspend, continuation, post_runtime, resume, exception; - - __ jmp(&suspend); - __ bind(&continuation); - // When we arrive here, v0 holds the generator object. - __ RecordGeneratorContinuation(); - __ lw(a1, FieldMemOperand(v0, JSGeneratorObject::kResumeModeOffset)); - __ lw(v0, FieldMemOperand(v0, JSGeneratorObject::kInputOrDebugPosOffset)); - __ Branch(&resume, eq, a1, Operand(Smi::FromInt(JSGeneratorObject::kNext))); - __ Push(result_register()); - __ Branch(&exception, eq, a1, - Operand(Smi::FromInt(JSGeneratorObject::kThrow))); - EmitCreateIteratorResult(true); - EmitUnwindAndReturn(); - - __ bind(&exception); - __ CallRuntime(expr->rethrow_on_exception() ? Runtime::kReThrow - : Runtime::kThrow); - - __ bind(&suspend); - OperandStackDepthIncrement(1); // Not popped on this path. - VisitForAccumulatorValue(expr->generator_object()); - DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos())); - __ li(a1, Operand(Smi::FromInt(continuation.pos()))); - __ sw(a1, FieldMemOperand(v0, JSGeneratorObject::kContinuationOffset)); - __ sw(cp, FieldMemOperand(v0, JSGeneratorObject::kContextOffset)); - __ mov(a1, cp); - __ RecordWriteField(v0, JSGeneratorObject::kContextOffset, a1, a2, - kRAHasBeenSaved, kDontSaveFPRegs); - __ Addu(a1, fp, Operand(StandardFrameConstants::kExpressionsOffset)); - __ Branch(&post_runtime, eq, sp, Operand(a1)); - __ push(v0); // generator object - __ CallRuntime(Runtime::kSuspendJSGeneratorObject, 1); - RestoreContext(); - __ bind(&post_runtime); - PopOperand(result_register()); - EmitReturnSequence(); - - __ bind(&resume); - context()->Plug(result_register()); + // Resumable functions are not supported. + UNREACHABLE(); } void FullCodeGenerator::PushOperands(Register reg1, Register reg2) { @@ -1959,60 +1667,6 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, context()->Plug(v0); } - -void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) { - for (int i = 0; i < lit->properties()->length(); i++) { - ClassLiteral::Property* property = lit->properties()->at(i); - Expression* value = property->value(); - - Register scratch = a1; - if (property->is_static()) { - __ lw(scratch, MemOperand(sp, kPointerSize)); // constructor - } else { - __ lw(scratch, MemOperand(sp, 0)); // prototype - } - PushOperand(scratch); - EmitPropertyKey(property, lit->GetIdForProperty(i)); - - // The static prototype property is read only. We handle the non computed - // property name case in the parser. Since this is the only case where we - // need to check for an own read only property we special case this so we do - // not need to do this for every property. - if (property->is_static() && property->is_computed_name()) { - __ CallRuntime(Runtime::kThrowIfStaticPrototype); - __ push(v0); - } - - VisitForStackValue(value); - if (NeedsHomeObject(value)) { - EmitSetHomeObject(value, 2, property->GetSlot()); - } - - switch (property->kind()) { - case ClassLiteral::Property::METHOD: - PushOperand(Smi::FromInt(DONT_ENUM)); - PushOperand(Smi::FromInt(property->NeedsSetFunctionName())); - CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral); - break; - - case ClassLiteral::Property::GETTER: - PushOperand(Smi::FromInt(DONT_ENUM)); - CallRuntimeWithOperands(Runtime::kDefineGetterPropertyUnchecked); - break; - - case ClassLiteral::Property::SETTER: - PushOperand(Smi::FromInt(DONT_ENUM)); - CallRuntimeWithOperands(Runtime::kDefineSetterPropertyUnchecked); - break; - - case ClassLiteral::Property::FIELD: - default: - UNREACHABLE(); - } - } -} - - void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { __ mov(a0, result_register()); PopOperand(a1); @@ -2047,43 +1701,6 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, CallStoreIC(slot, prop->key()->AsLiteral()->value()); break; } - case NAMED_SUPER_PROPERTY: { - PushOperand(v0); - VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); - VisitForAccumulatorValue( - prop->obj()->AsSuperPropertyReference()->home_object()); - // stack: value, this; v0: home_object - Register scratch = a2; - Register scratch2 = a3; - __ mov(scratch, result_register()); // home_object - __ lw(v0, MemOperand(sp, kPointerSize)); // value - __ lw(scratch2, MemOperand(sp, 0)); // this - __ sw(scratch2, MemOperand(sp, kPointerSize)); // this - __ sw(scratch, MemOperand(sp, 0)); // home_object - // stack: this, home_object; v0: value - EmitNamedSuperPropertyStore(prop); - break; - } - case KEYED_SUPER_PROPERTY: { - PushOperand(v0); - VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); - VisitForStackValue( - prop->obj()->AsSuperPropertyReference()->home_object()); - VisitForAccumulatorValue(prop->key()); - Register scratch = a2; - Register scratch2 = a3; - __ lw(scratch2, MemOperand(sp, 2 * kPointerSize)); // value - // stack: value, this, home_object; v0: key, a3: value - __ lw(scratch, MemOperand(sp, kPointerSize)); // this - __ sw(scratch, MemOperand(sp, 2 * kPointerSize)); - __ lw(scratch, MemOperand(sp, 0)); // home_object - __ sw(scratch, MemOperand(sp, kPointerSize)); - __ sw(v0, MemOperand(sp, 0)); - __ Move(v0, scratch2); - // stack: this, home_object, key; v0: value. - EmitKeyedSuperPropertyStore(prop); - break; - } case KEYED_PROPERTY: { PushOperand(result_register()); // Preserve value. VisitForStackValue(prop->obj()); @@ -2094,6 +1711,10 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, CallKeyedStoreIC(slot); break; } + case NAMED_SUPER_PROPERTY: + case KEYED_SUPER_PROPERTY: + UNREACHABLE(); + break; } context()->Plug(v0); } @@ -2156,26 +1777,18 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, } else { DCHECK(var->mode() != CONST || op == Token::INIT); - if (var->IsLookupSlot()) { - // Assignment to var. - __ Push(var->name()); - __ Push(v0); - __ CallRuntime(is_strict(language_mode()) - ? Runtime::kStoreLookupSlot_Strict - : Runtime::kStoreLookupSlot_Sloppy); - } else { - // Assignment to var or initializing assignment to let/const in harmony - // mode. - DCHECK((var->IsStackAllocated() || var->IsContextSlot())); - MemOperand location = VarOperand(var, a1); - if (FLAG_debug_code && var->mode() == LET && op == Token::INIT) { - // Check for an uninitialized let binding. - __ lw(a2, location); - __ LoadRoot(t0, Heap::kTheHoleValueRootIndex); - __ Check(eq, kLetBindingReInitialization, a2, Operand(t0)); - } - EmitStoreToStackLocalOrContextSlot(var, location); + DCHECK((var->IsStackAllocated() || var->IsContextSlot())); + DCHECK(!var->IsLookupSlot()); + // Assignment to var or initializing assignment to let/const in harmony + // mode. + MemOperand location = VarOperand(var, a1); + if (FLAG_debug_code && var->mode() == LET && op == Token::INIT) { + // Check for an uninitialized let binding. + __ lw(a2, location); + __ LoadRoot(t0, Heap::kTheHoleValueRootIndex); + __ Check(eq, kLetBindingReInitialization, a2, Operand(t0)); } + EmitStoreToStackLocalOrContextSlot(var, location); } } @@ -2195,35 +1808,6 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { } -void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { - // Assignment to named property of super. - // v0 : value - // stack : receiver ('this'), home_object - DCHECK(prop != NULL); - Literal* key = prop->key()->AsLiteral(); - DCHECK(key != NULL); - - PushOperand(key->value()); - PushOperand(v0); - CallRuntimeWithOperands(is_strict(language_mode()) - ? Runtime::kStoreToSuper_Strict - : Runtime::kStoreToSuper_Sloppy); -} - - -void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { - // Assignment to named property of super. - // v0 : value - // stack : receiver ('this'), home_object, key - DCHECK(prop != NULL); - - PushOperand(v0); - CallRuntimeWithOperands(is_strict(language_mode()) - ? Runtime::kStoreKeyedToSuper_Strict - : Runtime::kStoreKeyedToSuper_Sloppy); -} - - void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { // Assignment to a property, using a keyed store IC. // Call keyed store IC. @@ -2277,43 +1861,6 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { } -void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) { - SetExpressionPosition(expr); - Expression* callee = expr->expression(); - DCHECK(callee->IsProperty()); - Property* prop = callee->AsProperty(); - DCHECK(prop->IsSuperAccess()); - - Literal* key = prop->key()->AsLiteral(); - DCHECK(!key->value()->IsSmi()); - // Load the function from the receiver. - const Register scratch = a1; - SuperPropertyReference* super_ref = prop->obj()->AsSuperPropertyReference(); - VisitForAccumulatorValue(super_ref->home_object()); - __ mov(scratch, v0); - VisitForAccumulatorValue(super_ref->this_var()); - PushOperands(scratch, v0, v0, scratch); - PushOperand(key->value()); - - // Stack here: - // - home_object - // - this (receiver) - // - this (receiver) <-- LoadFromSuper will pop here and below. - // - home_object - // - key - CallRuntimeWithOperands(Runtime::kLoadFromSuper); - PrepareForBailoutForId(prop->LoadId(), BailoutState::TOS_REGISTER); - - // Replace home_object with target function. - __ sw(v0, MemOperand(sp, kPointerSize)); - - // Stack here: - // - target function - // - this (receiver) - EmitCall(expr); -} - - // Code common for calls using the IC. void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, Expression* key) { @@ -2339,41 +1886,6 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, } -void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) { - Expression* callee = expr->expression(); - DCHECK(callee->IsProperty()); - Property* prop = callee->AsProperty(); - DCHECK(prop->IsSuperAccess()); - - SetExpressionPosition(prop); - // Load the function from the receiver. - const Register scratch = a1; - SuperPropertyReference* super_ref = prop->obj()->AsSuperPropertyReference(); - VisitForAccumulatorValue(super_ref->home_object()); - __ Move(scratch, v0); - VisitForAccumulatorValue(super_ref->this_var()); - PushOperands(scratch, v0, v0, scratch); - VisitForStackValue(prop->key()); - - // Stack here: - // - home_object - // - this (receiver) - // - this (receiver) <-- LoadKeyedFromSuper will pop here and below. - // - home_object - // - key - CallRuntimeWithOperands(Runtime::kLoadKeyedFromSuper); - PrepareForBailoutForId(prop->LoadId(), BailoutState::TOS_REGISTER); - - // Replace home_object with target function. - __ sw(v0, MemOperand(sp, kPointerSize)); - - // Stack here: - // - target function - // - this (receiver) - EmitCall(expr); -} - - void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { // Load the arguments. ZoneList<Expression*>* args = expr->arguments(); @@ -2406,115 +1918,6 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { context()->DropAndPlug(1, v0); } -void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { - int arg_count = expr->arguments()->length(); - // t4: copy of the first argument or undefined if it doesn't exist. - if (arg_count > 0) { - __ lw(t4, MemOperand(sp, arg_count * kPointerSize)); - } else { - __ LoadRoot(t4, Heap::kUndefinedValueRootIndex); - } - - // t3: the receiver of the enclosing function. - __ lw(t3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); - - // t2: the language mode. - __ li(t2, Operand(Smi::FromInt(language_mode()))); - - // t1: the start position of the scope the calls resides in. - __ li(t1, Operand(Smi::FromInt(scope()->start_position()))); - - // t0: the source position of the eval call. - __ li(t0, Operand(Smi::FromInt(expr->position()))); - - // Do the runtime call. - __ Push(t4, t3, t2, t1, t0); - __ CallRuntime(Runtime::kResolvePossiblyDirectEval); -} - - -// See http://www.ecma-international.org/ecma-262/6.0/#sec-function-calls. -void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) { - VariableProxy* callee = expr->expression()->AsVariableProxy(); - if (callee->var()->IsLookupSlot()) { - Label slow, done; - - SetExpressionPosition(callee); - // Generate code for loading from variables potentially shadowed by - // eval-introduced variables. - EmitDynamicLookupFastCase(callee, NOT_INSIDE_TYPEOF, &slow, &done); - - __ bind(&slow); - // Call the runtime to find the function to call (returned in v0) - // and the object holding it (returned in v1). - __ Push(callee->name()); - __ CallRuntime(Runtime::kLoadLookupSlotForCall); - PushOperands(v0, v1); // Function, receiver. - 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 - // code. - if (done.is_linked()) { - Label call; - __ Branch(&call); - __ bind(&done); - // Push function. - __ push(v0); - // The receiver is implicitly the global receiver. Indicate this - // by passing the hole to the call function stub. - __ LoadRoot(a1, Heap::kUndefinedValueRootIndex); - __ push(a1); - __ bind(&call); - } - } else { - VisitForStackValue(callee); - // refEnv.WithBaseObject() - __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); - PushOperand(a2); // Reserved receiver slot. - } -} - - -void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) { - // In a call to eval, we first call Runtime_ResolvePossiblyDirectEval - // to resolve the function we need to call. Then we call the resolved - // function using the given arguments. - ZoneList<Expression*>* args = expr->arguments(); - int arg_count = args->length(); - PushCalleeAndWithBaseObject(expr); - - // Push the arguments. - for (int i = 0; i < arg_count; i++) { - VisitForStackValue(args->at(i)); - } - - // Push a copy of the function (found below the arguments) and - // resolve eval. - __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); - __ push(a1); - EmitResolvePossiblyDirectEval(expr); - - // Touch up the stack with the resolved function. - __ sw(v0, MemOperand(sp, (arg_count + 1) * kPointerSize)); - - PrepareForBailoutForId(expr->EvalId(), BailoutState::NO_REGISTERS); - // Record source position for debugger. - SetCallPosition(expr); - Handle<Code> code = CodeFactory::CallIC(isolate(), ConvertReceiverMode::kAny, - expr->tail_call_mode()) - .code(); - __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot()))); - __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); - __ li(a0, Operand(arg_count)); - __ Call(code, RelocInfo::CODE_TARGET); - OperandStackDepthDecrement(arg_count + 1); - RecordJSReturnSite(expr); - RestoreContext(); - context()->DropAndPlug(1, v0); -} - - void FullCodeGenerator::VisitCallNew(CallNew* expr) { Comment cmnt(masm_, "[ CallNew"); // According to ECMA-262, section 11.2.2, page 44, the function @@ -2555,49 +1958,6 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { } -void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { - SuperCallReference* super_call_ref = - expr->expression()->AsSuperCallReference(); - DCHECK_NOT_NULL(super_call_ref); - - // Push the super constructor target on the stack (may be null, - // but the Construct builtin can deal with that properly). - VisitForAccumulatorValue(super_call_ref->this_function_var()); - __ AssertFunction(result_register()); - __ lw(result_register(), - FieldMemOperand(result_register(), HeapObject::kMapOffset)); - __ lw(result_register(), - FieldMemOperand(result_register(), Map::kPrototypeOffset)); - PushOperand(result_register()); - - // Push the arguments ("left-to-right") on the stack. - ZoneList<Expression*>* args = expr->arguments(); - int arg_count = args->length(); - for (int i = 0; i < arg_count; i++) { - VisitForStackValue(args->at(i)); - } - - // Call the construct call builtin that handles allocation and - // constructor invocation. - SetConstructCallPosition(expr); - - // Load new target into a3. - VisitForAccumulatorValue(super_call_ref->new_target_var()); - __ mov(a3, result_register()); - - // Load function and argument count into a1 and a0. - __ li(a0, Operand(arg_count)); - __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); - - __ Call(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); - OperandStackDepthDecrement(arg_count + 1); - - RecordJSReturnSite(expr); - RestoreContext(); - context()->Plug(v0); -} - - void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); DCHECK(args->length() == 1); @@ -2687,28 +2047,6 @@ void FullCodeGenerator::EmitIsTypedArray(CallRuntime* expr) { } -void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { - ZoneList<Expression*>* args = expr->arguments(); - DCHECK(args->length() == 1); - - VisitForAccumulatorValue(args->at(0)); - - Label materialize_true, materialize_false; - Label* if_true = NULL; - Label* if_false = NULL; - Label* fall_through = NULL; - context()->PrepareTest(&materialize_true, &materialize_false, - &if_true, &if_false, &fall_through); - - __ JumpIfSmi(v0, if_false); - __ GetObjectType(v0, a1, a1); - PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); - Split(eq, a1, Operand(JS_REGEXP_TYPE), if_true, if_false, fall_through); - - context()->Plug(if_true, if_false); -} - - void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); DCHECK(args->length() == 1); @@ -2944,16 +2282,12 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { __ Push(a2, a1); __ CallRuntime(Runtime::kDeleteProperty_Sloppy); context()->Plug(v0); - } else if (var->IsStackAllocated() || var->IsContextSlot()) { + } else { + DCHECK(!var->IsLookupSlot()); + DCHECK(var->IsStackAllocated() || var->IsContextSlot()); // Result of deleting non-global, non-dynamic variables is false. // The subexpression does not have side effects. context()->Plug(is_this); - } else { - // Non-global variable. Call the runtime to try to delete from the - // context where the variable was introduced. - __ Push(var->name()); - __ CallRuntime(Runtime::kDeleteLookupSlot); - context()->Plug(v0); } } else { // Result of deleting non-property, non-variable reference is true. @@ -3059,31 +2393,6 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { break; } - case NAMED_SUPER_PROPERTY: { - VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); - VisitForAccumulatorValue( - prop->obj()->AsSuperPropertyReference()->home_object()); - const Register scratch = a1; - __ lw(scratch, MemOperand(sp, 0)); // this - PushOperands(result_register(), scratch, result_register()); - EmitNamedSuperPropertyLoad(prop); - break; - } - - case KEYED_SUPER_PROPERTY: { - VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); - VisitForStackValue( - prop->obj()->AsSuperPropertyReference()->home_object()); - VisitForAccumulatorValue(prop->key()); - const Register scratch1 = a1; - const Register scratch2 = t0; - __ lw(scratch1, MemOperand(sp, 1 * kPointerSize)); // this - __ lw(scratch2, MemOperand(sp, 0 * kPointerSize)); // home object - PushOperands(result_register(), scratch1, scratch2, result_register()); - EmitKeyedSuperPropertyLoad(prop); - break; - } - case KEYED_PROPERTY: { VisitForStackValue(prop->obj()); VisitForStackValue(prop->key()); @@ -3094,6 +2403,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { break; } + case NAMED_SUPER_PROPERTY: + case KEYED_SUPER_PROPERTY: case VARIABLE: UNREACHABLE(); } @@ -3130,14 +2441,12 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { case NAMED_PROPERTY: __ sw(v0, MemOperand(sp, kPointerSize)); break; - case NAMED_SUPER_PROPERTY: - __ sw(v0, MemOperand(sp, 2 * kPointerSize)); - break; case KEYED_PROPERTY: __ sw(v0, MemOperand(sp, 2 * kPointerSize)); break; + case NAMED_SUPER_PROPERTY: case KEYED_SUPER_PROPERTY: - __ sw(v0, MemOperand(sp, 3 * kPointerSize)); + UNREACHABLE(); break; } } @@ -3170,14 +2479,12 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { case NAMED_PROPERTY: __ sw(v0, MemOperand(sp, kPointerSize)); break; - case NAMED_SUPER_PROPERTY: - __ sw(v0, MemOperand(sp, 2 * kPointerSize)); - break; case KEYED_PROPERTY: __ sw(v0, MemOperand(sp, 2 * kPointerSize)); break; + case NAMED_SUPER_PROPERTY: case KEYED_SUPER_PROPERTY: - __ sw(v0, MemOperand(sp, 3 * kPointerSize)); + UNREACHABLE(); break; } } @@ -3234,30 +2541,6 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { } break; } - case NAMED_SUPER_PROPERTY: { - EmitNamedSuperPropertyStore(prop); - PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); - if (expr->is_postfix()) { - if (!context()->IsEffect()) { - context()->PlugTOS(); - } - } else { - context()->Plug(v0); - } - break; - } - case KEYED_SUPER_PROPERTY: { - EmitKeyedSuperPropertyStore(prop); - PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); - if (expr->is_postfix()) { - if (!context()->IsEffect()) { - context()->PlugTOS(); - } - } else { - context()->Plug(v0); - } - break; - } case KEYED_PROPERTY: { __ mov(StoreDescriptor::ValueRegister(), result_register()); PopOperands(StoreDescriptor::ReceiverRegister(), @@ -3273,6 +2556,10 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { } break; } + case NAMED_SUPER_PROPERTY: + case KEYED_SUPER_PROPERTY: + UNREACHABLE(); + break; } } @@ -3504,70 +2791,6 @@ void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { } -// ---------------------------------------------------------------------------- -// Non-local control flow support. - -void FullCodeGenerator::EnterFinallyBlock() { - DCHECK(!result_register().is(a1)); - // Store pending message while executing finally block. - ExternalReference pending_message_obj = - ExternalReference::address_of_pending_message_obj(isolate()); - __ li(at, Operand(pending_message_obj)); - __ lw(a1, MemOperand(at)); - PushOperand(a1); - - ClearPendingMessage(); -} - - -void FullCodeGenerator::ExitFinallyBlock() { - DCHECK(!result_register().is(a1)); - // Restore pending message from stack. - PopOperand(a1); - ExternalReference pending_message_obj = - ExternalReference::address_of_pending_message_obj(isolate()); - __ li(at, Operand(pending_message_obj)); - __ sw(a1, MemOperand(at)); -} - - -void FullCodeGenerator::ClearPendingMessage() { - DCHECK(!result_register().is(a1)); - ExternalReference pending_message_obj = - ExternalReference::address_of_pending_message_obj(isolate()); - __ LoadRoot(a1, Heap::kTheHoleValueRootIndex); - __ li(at, Operand(pending_message_obj)); - __ sw(a1, MemOperand(at)); -} - - -void FullCodeGenerator::DeferredCommands::EmitCommands() { - DCHECK(!result_register().is(a1)); - __ Pop(result_register()); // Restore the accumulator. - __ Pop(a1); // Get the token. - for (DeferredCommand cmd : commands_) { - Label skip; - __ li(at, Operand(Smi::FromInt(cmd.token))); - __ Branch(&skip, ne, a1, Operand(at)); - switch (cmd.command) { - case kReturn: - codegen_->EmitUnwindAndReturn(); - break; - case kThrow: - __ Push(result_register()); - __ CallRuntime(Runtime::kReThrow); - break; - case kContinue: - codegen_->EmitContinue(cmd.target); - break; - case kBreak: - codegen_->EmitBreak(cmd.target); - break; - } - __ bind(&skip); - } -} - #undef __ |