| Index: vm/flow_graph_compiler_ia32.cc
|
| ===================================================================
|
| --- vm/flow_graph_compiler_ia32.cc (revision 9042)
|
| +++ vm/flow_graph_compiler_ia32.cc (working copy)
|
| @@ -38,7 +38,7 @@
|
| __ call(&StubCode::DeoptimizeLabel());
|
| compiler->AddCurrentDescriptor(PcDescriptors::kOther,
|
| deopt_id_,
|
| - deopt_token_index_,
|
| + deopt_token_pos_,
|
| try_index_);
|
| #undef __
|
| }
|
| @@ -96,23 +96,23 @@
|
| }
|
|
|
|
|
| -void FlowGraphCompiler::GenerateCall(intptr_t token_index,
|
| +void FlowGraphCompiler::GenerateCall(intptr_t token_pos,
|
| intptr_t try_index,
|
| const ExternalLabel* label,
|
| PcDescriptors::Kind kind) {
|
| ASSERT(frame_register_allocator()->IsSpilled());
|
| __ call(label);
|
| - AddCurrentDescriptor(kind, AstNode::kNoId, token_index, try_index);
|
| + AddCurrentDescriptor(kind, AstNode::kNoId, token_pos, try_index);
|
| }
|
|
|
|
|
| void FlowGraphCompiler::GenerateCallRuntime(intptr_t cid,
|
| - intptr_t token_index,
|
| + intptr_t token_pos,
|
| intptr_t try_index,
|
| const RuntimeEntry& entry) {
|
| ASSERT(frame_register_allocator()->IsSpilled());
|
| __ CallRuntime(entry);
|
| - AddCurrentDescriptor(PcDescriptors::kOther, cid, token_index, try_index);
|
| + AddCurrentDescriptor(PcDescriptors::kOther, cid, token_pos, try_index);
|
| }
|
|
|
|
|
| @@ -356,7 +356,7 @@
|
| __ j(EQUAL, &argc_in_range, Assembler::kNearJump);
|
| if (function.IsClosureFunction()) {
|
| GenerateCallRuntime(AstNode::kNoId,
|
| - function.token_index(),
|
| + function.token_pos(),
|
| CatchClauseNode::kInvalidTryIndex,
|
| kClosureArgumentMismatchRuntimeEntry);
|
| } else {
|
| @@ -385,7 +385,7 @@
|
| Label no_stack_overflow;
|
| __ j(ABOVE, &no_stack_overflow, Assembler::kNearJump);
|
| GenerateCallRuntime(AstNode::kNoId,
|
| - function.token_index(),
|
| + function.token_pos(),
|
| CatchClauseNode::kInvalidTryIndex,
|
| kStackOverflowRuntimeEntry);
|
| __ Bind(&no_stack_overflow);
|
| @@ -504,7 +504,7 @@
|
| RawSubtypeTestCache*
|
| FlowGraphCompiler::GenerateInstantiatedTypeWithArgumentsTest(
|
| intptr_t cid,
|
| - intptr_t token_index,
|
| + intptr_t token_pos,
|
| const AbstractType& type,
|
| Label* is_instance_lbl,
|
| Label* is_not_instance_lbl) {
|
| @@ -531,7 +531,7 @@
|
| GenerateListTypeCheck(kClassIdReg, is_instance_lbl);
|
| }
|
| return GenerateSubtype1TestCacheLookup(
|
| - cid, token_index, type_class, is_instance_lbl, is_not_instance_lbl);
|
| + cid, token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
|
| }
|
| // If one type argument only, check if type argument is Object or Dynamic.
|
| if (type_arguments.Length() == 1) {
|
| @@ -547,7 +547,7 @@
|
| if (object_type.IsSubtypeOf(tp_argument, &malformed_error)) {
|
| // Instance class test only necessary.
|
| return GenerateSubtype1TestCacheLookup(
|
| - cid, token_index, type_class, is_instance_lbl, is_not_instance_lbl);
|
| + cid, token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
|
| }
|
| }
|
| }
|
| @@ -580,7 +580,7 @@
|
| // EAX: instance to test against (preserved). Clobbers ECX, EDI.
|
| void FlowGraphCompiler::GenerateInstantiatedTypeNoArgumentsTest(
|
| intptr_t cid,
|
| - intptr_t token_index,
|
| + intptr_t token_pos,
|
| const AbstractType& type,
|
| Label* is_instance_lbl,
|
| Label* is_not_instance_lbl) {
|
| @@ -651,7 +651,7 @@
|
| // EAX: instance (preserved). Clobbers EDX, EDI, ECX.
|
| RawSubtypeTestCache* FlowGraphCompiler::GenerateUninstantiatedTypeTest(
|
| intptr_t cid,
|
| - intptr_t token_index,
|
| + intptr_t token_pos,
|
| const AbstractType& type,
|
| Label* is_instance_lbl,
|
| Label* is_not_instance_lbl) {
|
| @@ -741,7 +741,7 @@
|
| // code (type-feedback).
|
| RawSubtypeTestCache* FlowGraphCompiler::GenerateSubtype1TestCacheLookup(
|
| intptr_t cid,
|
| - intptr_t token_index,
|
| + intptr_t token_pos,
|
| const Class& type_class,
|
| Label* is_instance_lbl,
|
| Label* is_not_instance_lbl) {
|
| @@ -775,7 +775,7 @@
|
| // is_instance or to the label is_not_instance.
|
| RawSubtypeTestCache* FlowGraphCompiler::GenerateInlineInstanceof(
|
| intptr_t cid,
|
| - intptr_t token_index,
|
| + intptr_t token_pos,
|
| const AbstractType& type,
|
| Label* is_instance_lbl,
|
| Label* is_not_instance_lbl) {
|
| @@ -786,26 +786,26 @@
|
| // non-parameterized class or with a raw dst type of a parameterized class.
|
| if (type_class.HasTypeArguments()) {
|
| return GenerateInstantiatedTypeWithArgumentsTest(cid,
|
| - token_index,
|
| + token_pos,
|
| type,
|
| is_instance_lbl,
|
| is_not_instance_lbl);
|
| // Fall through to runtime call.
|
| } else {
|
| GenerateInstantiatedTypeNoArgumentsTest(cid,
|
| - token_index,
|
| + token_pos,
|
| type,
|
| is_instance_lbl,
|
| is_not_instance_lbl);
|
| // If test non-conclusive so far, try the inlined type-test cache.
|
| // 'type' is known at compile time.
|
| return GenerateSubtype1TestCacheLookup(
|
| - cid, token_index, type_class,
|
| + cid, token_pos, type_class,
|
| is_instance_lbl, is_not_instance_lbl);
|
| }
|
| } else {
|
| return GenerateUninstantiatedTypeTest(cid,
|
| - token_index,
|
| + token_pos,
|
| type,
|
| is_instance_lbl,
|
| is_not_instance_lbl);
|
| @@ -826,7 +826,7 @@
|
| // Returns:
|
| // - true or false in EAX.
|
| void FlowGraphCompiler::GenerateInstanceOf(intptr_t cid,
|
| - intptr_t token_index,
|
| + intptr_t token_pos,
|
| intptr_t try_index,
|
| const AbstractType& type,
|
| bool negate_result) {
|
| @@ -853,14 +853,14 @@
|
| // TODO(srdjan): Enable inlined checks.
|
| // Generate inline instanceof test.
|
| SubtypeTestCache& test_cache = SubtypeTestCache::ZoneHandle();
|
| - test_cache = GenerateInlineInstanceof(cid, token_index, type,
|
| + test_cache = GenerateInlineInstanceof(cid, token_pos, type,
|
| &is_instance, &is_not_instance);
|
|
|
| // Generate runtime call.
|
| __ movl(EDX, Address(ESP, 0)); // Get instantiator type arguments.
|
| __ movl(ECX, Address(ESP, kWordSize)); // Get instantiator.
|
| __ PushObject(Object::ZoneHandle()); // Make room for the result.
|
| - __ pushl(Immediate(Smi::RawValue(token_index))); // Source location.
|
| + __ pushl(Immediate(Smi::RawValue(token_pos))); // Source location.
|
| __ pushl(Immediate(Smi::RawValue(cid))); // Computation id.
|
| __ pushl(EAX); // Push the instance.
|
| __ PushObject(type); // Push the type.
|
| @@ -868,7 +868,7 @@
|
| __ pushl(EDX); // Instantiator type arguments.
|
| __ LoadObject(EAX, test_cache);
|
| __ pushl(EAX);
|
| - GenerateCallRuntime(cid, token_index, try_index, kInstanceofRuntimeEntry);
|
| + GenerateCallRuntime(cid, token_pos, try_index, kInstanceofRuntimeEntry);
|
| // Pop the two parameters supplied to the runtime entry. The result of the
|
| // instanceof runtime call will be left as the result of the operation.
|
| __ Drop(7);
|
| @@ -909,12 +909,12 @@
|
| // Performance notes: positive checks must be quick, negative checks can be slow
|
| // as they throw an exception.
|
| void FlowGraphCompiler::GenerateAssertAssignable(intptr_t cid,
|
| - intptr_t token_index,
|
| + intptr_t token_pos,
|
| intptr_t try_index,
|
| const AbstractType& dst_type,
|
| const String& dst_name) {
|
| ASSERT(FLAG_enable_type_checks);
|
| - ASSERT(token_index >= 0);
|
| + ASSERT(token_pos >= 0);
|
| ASSERT(!dst_type.IsNull());
|
| ASSERT(dst_type.IsFinalized());
|
| // Assignable check is skipped in FlowGraphBuilder, not here.
|
| @@ -936,12 +936,12 @@
|
| const String& error_message = String::ZoneHandle(
|
| String::NewSymbol(error.ToErrorCString()));
|
| __ PushObject(Object::ZoneHandle()); // Make room for the result.
|
| - __ pushl(Immediate(Smi::RawValue(token_index))); // Source location.
|
| + __ pushl(Immediate(Smi::RawValue(token_pos))); // Source location.
|
| __ pushl(EAX); // Push the source object.
|
| __ PushObject(dst_name); // Push the name of the destination.
|
| __ PushObject(error_message);
|
| GenerateCallRuntime(cid,
|
| - token_index,
|
| + token_pos,
|
| try_index,
|
| kMalformedTypeErrorRuntimeEntry);
|
| // We should never return here.
|
| @@ -954,14 +954,14 @@
|
| // TODO(srdjan): Enable subtype test cache.
|
| // Generate inline type check, linking to runtime call if not assignable.
|
| SubtypeTestCache& test_cache = SubtypeTestCache::ZoneHandle();
|
| - test_cache = GenerateInlineInstanceof(cid, token_index, dst_type,
|
| + test_cache = GenerateInlineInstanceof(cid, token_pos, dst_type,
|
| &is_assignable, &runtime_call);
|
|
|
| __ Bind(&runtime_call);
|
| __ movl(EDX, Address(ESP, 0)); // Get instantiator type arguments.
|
| __ movl(ECX, Address(ESP, kWordSize)); // Get instantiator.
|
| __ PushObject(Object::ZoneHandle()); // Make room for the result.
|
| - __ pushl(Immediate(Smi::RawValue(token_index))); // Source location.
|
| + __ pushl(Immediate(Smi::RawValue(token_pos))); // Source location.
|
| __ pushl(Immediate(Smi::RawValue(cid))); // Computation id.
|
| __ pushl(EAX); // Push the source object.
|
| __ PushObject(dst_type); // Push the type of the destination.
|
| @@ -971,7 +971,7 @@
|
| __ LoadObject(EAX, test_cache);
|
| __ pushl(EAX);
|
| GenerateCallRuntime(cid,
|
| - token_index,
|
| + token_pos,
|
| try_index,
|
| kTypeCheckRuntimeEntry);
|
| // Pop the parameters supplied to the runtime entry. The result of the
|
|
|