| Index: vm/intermediate_language_x64.cc
|
| ===================================================================
|
| --- vm/intermediate_language_x64.cc (revision 9042)
|
| +++ vm/intermediate_language_x64.cc (working copy)
|
| @@ -107,7 +107,7 @@
|
| __ nop(1);
|
| compiler->AddCurrentDescriptor(PcDescriptors::kReturn,
|
| cid(),
|
| - token_index(),
|
| + token_pos(),
|
| CatchClauseNode::kInvalidTryIndex);
|
| }
|
|
|
| @@ -186,10 +186,10 @@
|
| __ CompareObject(obj, compiler->bool_false());
|
| __ j(EQUAL, &done, Assembler::kNearJump);
|
|
|
| - __ pushq(Immediate(Smi::RawValue(token_index()))); // Source location.
|
| + __ pushq(Immediate(Smi::RawValue(token_pos()))); // Source location.
|
| __ pushq(obj); // Push the source object.
|
| compiler->GenerateCallRuntime(cid(),
|
| - token_index(),
|
| + token_pos(),
|
| try_index(),
|
| kConditionTypeErrorRuntimeEntry);
|
| // We should never return here.
|
| @@ -256,7 +256,7 @@
|
| Register right = comp->locs()->in(1).reg();
|
| Register temp = comp->locs()->temp(0).reg();
|
| Label* deopt = compiler->AddDeoptStub(comp->cid(),
|
| - comp->token_index(),
|
| + comp->token_pos(),
|
| comp->try_index(),
|
| kDeoptSmiCompareSmis,
|
| left,
|
| @@ -286,7 +286,7 @@
|
| EqualityCompareComp* comp) {
|
| compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
|
| comp->cid(),
|
| - comp->token_index(),
|
| + comp->token_pos(),
|
| comp->try_index());
|
| const String& operator_name = String::ZoneHandle(String::NewSymbol("=="));
|
| const int kNumberOfArguments = 2;
|
| @@ -294,7 +294,7 @@
|
| const int kNumArgumentsChecked = 2;
|
|
|
| compiler->GenerateInstanceCall(comp->cid(),
|
| - comp->token_index(),
|
| + comp->token_pos(),
|
| comp->try_index(),
|
| operator_name,
|
| kNumberOfArguments,
|
| @@ -318,7 +318,7 @@
|
| ASSERT(ic_data.NumberOfChecks() > 0);
|
| ASSERT(ic_data.num_args_tested() == 1);
|
| Label* deopt = compiler->AddDeoptStub(comp->cid(),
|
| - comp->token_index(),
|
| + comp->token_pos(),
|
| comp->try_index(),
|
| kDeoptEquality);
|
| __ testq(left, Immediate(kSmiTagMask));
|
| @@ -363,7 +363,7 @@
|
| const int kNumberOfArguments = 2;
|
| const Array& kNoArgumentNames = Array::Handle();
|
| compiler->GenerateStaticCall(comp->cid(),
|
| - comp->token_index(),
|
| + comp->token_pos(),
|
| comp->try_index(),
|
| target,
|
| kNumberOfArguments,
|
| @@ -481,7 +481,7 @@
|
| Register right = comp->locs()->in(1).reg();
|
| Register temp = comp->locs()->temp(0).reg();
|
| Label* deopt = compiler->AddDeoptStub(comp->cid(),
|
| - comp->token_index(),
|
| + comp->token_pos(),
|
| comp->try_index(),
|
| kDeoptSmiCompareSmis,
|
| left,
|
| @@ -530,7 +530,7 @@
|
| // TODO(srdjan): temp is only needed if a conversion Smi->Double occurs.
|
| Register temp = comp->locs()->temp(0).reg();
|
| Label* deopt = compiler->AddDeoptStub(comp->cid(),
|
| - comp->token_index(),
|
| + comp->token_pos(),
|
| comp->try_index(),
|
| kDeoptDoubleComparison,
|
| left,
|
| @@ -575,12 +575,12 @@
|
| String::ZoneHandle(String::NewSymbol(Token::Str(kind())));
|
| compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
|
| cid(),
|
| - token_index(),
|
| + token_pos(),
|
| try_index());
|
| const intptr_t kNumArguments = 2;
|
| const intptr_t kNumArgsChecked = 2; // Type-feedback.
|
| compiler->GenerateInstanceCall(cid(),
|
| - token_index(),
|
| + token_pos(),
|
| try_index(),
|
| function_name,
|
| kNumArguments,
|
| @@ -625,7 +625,7 @@
|
| }
|
| __ movq(RBX, Immediate(reinterpret_cast<uword>(native_c_function())));
|
| __ movq(R10, Immediate(arg_count));
|
| - compiler->GenerateCall(token_index(),
|
| + compiler->GenerateCall(token_pos(),
|
| try_index(),
|
| &StubCode::CallNativeCFunctionLabel(),
|
| PcDescriptors::kOther);
|
| @@ -656,7 +656,7 @@
|
| static void EmitLoadIndexedPolymorphic(FlowGraphCompiler* compiler,
|
| LoadIndexedComp* comp) {
|
| Label* deopt = compiler->AddDeoptStub(comp->cid(),
|
| - comp->token_index(),
|
| + comp->token_pos(),
|
| comp->try_index(),
|
| kDeoptLoadIndexedPolymorphic);
|
| if (comp->ic_data()->NumberOfChecks() == 0) {
|
| @@ -681,7 +681,7 @@
|
| Array::Handle(), // No named arguments.
|
| deopt, &done, // Labels.
|
| comp->cid(),
|
| - comp->token_index(),
|
| + comp->token_pos(),
|
| comp->try_index());
|
| __ Bind(&done);
|
| }
|
| @@ -706,7 +706,7 @@
|
| kDeoptLoadIndexedGrowableArray : kDeoptLoadIndexedFixedArray;
|
|
|
| Label* deopt = compiler->AddDeoptStub(cid(),
|
| - token_index(),
|
| + token_pos(),
|
| try_index(),
|
| deopt_reason,
|
| receiver,
|
| @@ -777,13 +777,13 @@
|
|
|
| compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
|
| comp->cid(),
|
| - comp->token_index(),
|
| + comp->token_pos(),
|
| comp->try_index());
|
|
|
| const intptr_t kNumArguments = 3;
|
| const intptr_t kNumArgsChecked = 1; // Type-feedback.
|
| compiler->GenerateInstanceCall(comp->cid(),
|
| - comp->token_index(),
|
| + comp->token_pos(),
|
| comp->try_index(),
|
| function_name,
|
| kNumArguments,
|
| @@ -795,7 +795,7 @@
|
| static void EmitStoreIndexedPolymorphic(FlowGraphCompiler* compiler,
|
| StoreIndexedComp* comp) {
|
| Label* deopt = compiler->AddDeoptStub(comp->cid(),
|
| - comp->token_index(),
|
| + comp->token_pos(),
|
| comp->try_index(),
|
| kDeoptStoreIndexedPolymorphic);
|
| if (comp->ic_data()->NumberOfChecks() == 0) {
|
| @@ -820,7 +820,7 @@
|
| Array::Handle(), // No named arguments.
|
| deopt, &done, // Labels.
|
| comp->cid(),
|
| - comp->token_index(),
|
| + comp->token_pos(),
|
| comp->try_index());
|
| __ Bind(&done);
|
| }
|
| @@ -841,7 +841,7 @@
|
| Register value = locs()->in(2).reg();
|
|
|
| Label* deopt = compiler->AddDeoptStub(cid(),
|
| - token_index(),
|
| + token_pos(),
|
| try_index(),
|
| kDeoptStoreIndexed,
|
| receiver,
|
| @@ -900,12 +900,12 @@
|
|
|
| compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
|
| cid(),
|
| - token_index(),
|
| + token_pos(),
|
| try_index());
|
| const intptr_t kArgumentCount = 2;
|
| const intptr_t kCheckedArgumentCount = 1;
|
| compiler->GenerateInstanceCall(cid(),
|
| - token_index(),
|
| + token_pos(),
|
| try_index(),
|
| function_name,
|
| kArgumentCount,
|
| @@ -932,7 +932,7 @@
|
| __ pushq(value);
|
| __ pushq(value);
|
| compiler->GenerateStaticCall(cid(),
|
| - token_index(),
|
| + token_pos(),
|
| try_index(),
|
| setter_function(),
|
| 1,
|
| @@ -957,7 +957,7 @@
|
| if (HasICData()) {
|
| ASSERT(original() != NULL);
|
| Label* deopt = compiler->AddDeoptStub(original()->cid(),
|
| - original()->token_index(),
|
| + original()->token_pos(),
|
| original()->try_index(),
|
| kDeoptInstanceGetterSameTarget,
|
| instance_reg);
|
| @@ -999,7 +999,7 @@
|
| ASSERT(locs()->in(2).reg() == RDX); // Instantiator type arguments.
|
|
|
| compiler->GenerateInstanceOf(cid(),
|
| - token_index(),
|
| + token_pos(),
|
| try_index(),
|
| type(),
|
| negate_result());
|
| @@ -1032,7 +1032,7 @@
|
| ASSERT(temp_reg == R10);
|
| ASSERT(locs()->in(0).reg() == RBX);
|
| __ movq(temp_reg, Immediate(Smi::RawValue(ElementCount())));
|
| - compiler->GenerateCall(token_index(),
|
| + compiler->GenerateCall(token_pos(),
|
| try_index(),
|
| &StubCode::AllocateArrayLabel(),
|
| PcDescriptors::kOther);
|
| @@ -1064,12 +1064,12 @@
|
|
|
| // Push the result place holder initialized to NULL.
|
| __ PushObject(Object::ZoneHandle());
|
| - __ pushq(Immediate(Smi::RawValue(token_index())));
|
| + __ pushq(Immediate(Smi::RawValue(token_pos())));
|
| __ PushObject(cls);
|
| __ pushq(type_arguments);
|
| __ pushq(instantiator_type_arguments);
|
| compiler->GenerateCallRuntime(cid(),
|
| - token_index(),
|
| + token_pos(),
|
| try_index(),
|
| kAllocateObjectWithBoundsCheckRuntimeEntry);
|
| // Pop instantiator type arguments, type arguments, class, and
|
| @@ -1090,7 +1090,7 @@
|
| if (HasICData()) {
|
| ASSERT(original() != NULL);
|
| Label* deopt = compiler->AddDeoptStub(original()->cid(),
|
| - original()->token_index(),
|
| + original()->token_pos(),
|
| original()->try_index(),
|
| kDeoptInstanceGetterSameTarget,
|
| instance_reg);
|
| @@ -1155,7 +1155,7 @@
|
| __ PushObject(type_arguments());
|
| __ pushq(instantiator_reg); // Push instantiator type arguments.
|
| compiler->GenerateCallRuntime(cid(),
|
| - token_index(),
|
| + token_pos(),
|
| try_index(),
|
| kInstantiateTypeArgumentsRuntimeEntry);
|
| __ Drop(2); // Drop instantiator and uninstantiated type arguments.
|
| @@ -1305,7 +1305,7 @@
|
| __ movq(R10, Immediate(num_context_variables()));
|
| const ExternalLabel label("alloc_context",
|
| StubCode::AllocateContextEntryPoint());
|
| - compiler->GenerateCall(token_index(),
|
| + compiler->GenerateCall(token_pos(),
|
| try_index(),
|
| &label,
|
| PcDescriptors::kOther);
|
| @@ -1326,7 +1326,7 @@
|
| __ PushObject(Object::ZoneHandle()); // Make room for the result.
|
| __ pushq(context_value);
|
| compiler->GenerateCallRuntime(cid(),
|
| - token_index(),
|
| + token_pos(),
|
| try_index(),
|
| kCloneContextRuntimeEntry);
|
| __ popq(result); // Remove argument.
|
| @@ -1379,7 +1379,7 @@
|
| Label no_stack_overflow;
|
| __ j(ABOVE, &no_stack_overflow, Assembler::kNearJump);
|
| compiler->GenerateCallRuntime(cid(),
|
| - token_index(),
|
| + token_pos(),
|
| try_index(),
|
| kStackOverflowRuntimeEntry);
|
| __ Bind(&no_stack_overflow);
|
| @@ -1455,7 +1455,7 @@
|
| Register temp = comp->locs()->temp(0).reg();
|
| ASSERT(left == result);
|
| Label* deopt = compiler->AddDeoptStub(comp->instance_call()->cid(),
|
| - comp->instance_call()->token_index(),
|
| + comp->instance_call()->token_pos(),
|
| comp->instance_call()->try_index(),
|
| kDeoptSmiBinaryOp,
|
| temp,
|
| @@ -1566,7 +1566,7 @@
|
| __ pushq(temp);
|
| __ pushq(right);
|
| compiler->GenerateStaticCall(comp->instance_call()->cid(),
|
| - comp->instance_call()->token_index(),
|
| + comp->instance_call()->token_pos(),
|
| comp->instance_call()->try_index(),
|
| target,
|
| kArgumentCount,
|
| @@ -1612,7 +1612,7 @@
|
| ASSERT(left == result);
|
| ASSERT(comp->op_kind() == Token::kBIT_AND);
|
| Label* deopt = compiler->AddDeoptStub(comp->instance_call()->cid(),
|
| - comp->instance_call()->token_index(),
|
| + comp->instance_call()->token_pos(),
|
| comp->instance_call()->try_index(),
|
| kDeoptMintBinaryOp,
|
| left,
|
| @@ -1660,7 +1660,7 @@
|
| __ pushq(left);
|
| __ pushq(right);
|
| compiler->GenerateStaticCall(comp->instance_call()->cid(),
|
| - comp->instance_call()->token_index(),
|
| + comp->instance_call()->token_pos(),
|
| comp->instance_call()->try_index(),
|
| target,
|
| comp->instance_call()->ArgumentCount(),
|
| @@ -1680,7 +1680,7 @@
|
| __ pushq(left);
|
| __ pushq(right);
|
| compiler->GenerateStaticCall(comp->instance_call()->cid(),
|
| - comp->instance_call()->token_index(),
|
| + comp->instance_call()->token_pos(),
|
| comp->instance_call()->try_index(),
|
| target,
|
| comp->instance_call()->ArgumentCount(),
|
| @@ -1703,7 +1703,7 @@
|
| const Code& stub =
|
| Code::Handle(StubCode::GetAllocationStubForClass(double_class));
|
| const ExternalLabel label(double_class.ToCString(), stub.EntryPoint());
|
| - compiler->GenerateCall(comp->instance_call()->token_index(),
|
| + compiler->GenerateCall(comp->instance_call()->token_pos(),
|
| comp->instance_call()->try_index(),
|
| &label,
|
| PcDescriptors::kOther);
|
| @@ -1713,7 +1713,7 @@
|
| __ popq(left);
|
|
|
| Label* deopt = compiler->AddDeoptStub(comp->instance_call()->cid(),
|
| - comp->instance_call()->token_index(),
|
| + comp->instance_call()->token_pos(),
|
| comp->instance_call()->try_index(),
|
| kDeoptDoubleBinaryOp,
|
| left,
|
| @@ -1778,7 +1778,7 @@
|
| Register result = locs()->out().reg();
|
| ASSERT(value == result);
|
| Label* deopt = compiler->AddDeoptStub(instance_call()->cid(),
|
| - instance_call()->token_index(),
|
| + instance_call()->token_pos(),
|
| instance_call()->try_index(),
|
| kDeoptUnaryOp,
|
| value);
|
| @@ -1831,7 +1831,7 @@
|
| Register result = locs()->out().reg();
|
| ASSERT(value == result);
|
| Label* deopt = compiler->AddDeoptStub(instance_call()->cid(),
|
| - instance_call()->token_index(),
|
| + instance_call()->token_pos(),
|
| instance_call()->try_index(),
|
| kDeoptUnaryOp,
|
| value);
|
| @@ -1847,7 +1847,7 @@
|
| Code::Handle(StubCode::GetAllocationStubForClass(double_class));
|
| const ExternalLabel label(double_class.ToCString(), stub.EntryPoint());
|
| __ pushq(value);
|
| - compiler->GenerateCall(instance_call()->token_index(),
|
| + compiler->GenerateCall(instance_call()->token_pos(),
|
| instance_call()->try_index(),
|
| &label,
|
| PcDescriptors::kOther);
|
| @@ -1886,7 +1886,7 @@
|
| const DeoptReasonId deopt_reason = (from() == kDouble) ?
|
| kDeoptDoubleToDouble : kDeoptIntegerToDouble;
|
| Label* deopt = compiler->AddDeoptStub(instance_call()->cid(),
|
| - instance_call()->token_index(),
|
| + instance_call()->token_pos(),
|
| instance_call()->try_index(),
|
| deopt_reason,
|
| value);
|
| @@ -1908,7 +1908,7 @@
|
| const ExternalLabel label(double_class.ToCString(), stub.EntryPoint());
|
|
|
| // TODO(vegorov): allocate box in the driver loop to avoid spilling.
|
| - compiler->GenerateCall(instance_call()->token_index(),
|
| + compiler->GenerateCall(instance_call()->token_pos(),
|
| instance_call()->try_index(),
|
| &label,
|
| PcDescriptors::kOther);
|
| @@ -1931,7 +1931,7 @@
|
| void PolymorphicInstanceCallComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(instance_call()->VerifyComputation());
|
| Label* deopt = compiler->AddDeoptStub(instance_call()->cid(),
|
| - instance_call()->token_index(),
|
| + instance_call()->token_pos(),
|
| instance_call()->try_index(),
|
| kDeoptPolymorphicInstanceCallTestFail);
|
| if (!HasICData() || (ic_data()->NumberOfChecks() == 0)) {
|
| @@ -1957,14 +1957,14 @@
|
| instance_call()->argument_names(),
|
| deopt, &done, // Labels.
|
| instance_call()->cid(),
|
| - instance_call()->token_index(),
|
| + instance_call()->token_pos(),
|
| instance_call()->try_index());
|
| if (is_smi_label == &handle_smi) {
|
| __ Bind(&handle_smi);
|
| ASSERT(ic_data()->GetReceiverClassIdAt(0) == kSmi);
|
| const Function& target = Function::ZoneHandle(ic_data()->GetTargetAt(0));
|
| compiler->GenerateStaticCall(instance_call()->cid(),
|
| - instance_call()->token_index(),
|
| + instance_call()->token_pos(),
|
| instance_call()->try_index(),
|
| target,
|
| instance_call()->ArgumentCount(),
|
|
|