Index: runtime/vm/flow_graph_compiler_ia32.cc |
diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc |
index 3a2ee04dbf3eb43ea4434bf3bf63b046ef978551..fde96be4cf555399f8dadef30c02753f871fa9ba 100644 |
--- a/runtime/vm/flow_graph_compiler_ia32.cc |
+++ b/runtime/vm/flow_graph_compiler_ia32.cc |
@@ -270,7 +270,7 @@ RawSubtypeTestCache* FlowGraphCompiler::GenerateCallSubtypeTestStub( |
// Clobbers ECX, EDI. |
RawSubtypeTestCache* |
FlowGraphCompiler::GenerateInstantiatedTypeWithArgumentsTest( |
- intptr_t token_pos, |
+ TokenDescriptor token_pos, |
const AbstractType& type, |
Label* is_instance_lbl, |
Label* is_not_instance_lbl) { |
@@ -359,7 +359,7 @@ void FlowGraphCompiler::CheckClassIds(Register class_id_reg, |
// Clobbers ECX, EDI. |
// Returns true if there is a fallthrough. |
bool FlowGraphCompiler::GenerateInstantiatedTypeNoArgumentsTest( |
- intptr_t token_pos, |
+ TokenDescriptor token_pos, |
const AbstractType& type, |
Label* is_instance_lbl, |
Label* is_not_instance_lbl) { |
@@ -429,7 +429,7 @@ bool FlowGraphCompiler::GenerateInstantiatedTypeNoArgumentsTest( |
// arrays can grow too high, but they may be useful when optimizing |
// code (type-feedback). |
RawSubtypeTestCache* FlowGraphCompiler::GenerateSubtype1TestCacheLookup( |
- intptr_t token_pos, |
+ TokenDescriptor token_pos, |
const Class& type_class, |
Label* is_instance_lbl, |
Label* is_not_instance_lbl) { |
@@ -458,7 +458,7 @@ RawSubtypeTestCache* FlowGraphCompiler::GenerateSubtype1TestCacheLookup( |
// EAX: instance (preserved). |
// Clobbers EDX, EDI, ECX. |
RawSubtypeTestCache* FlowGraphCompiler::GenerateUninstantiatedTypeTest( |
- intptr_t token_pos, |
+ TokenDescriptor token_pos, |
const AbstractType& type, |
Label* is_instance_lbl, |
Label* is_not_instance_lbl) { |
@@ -543,7 +543,7 @@ RawSubtypeTestCache* FlowGraphCompiler::GenerateUninstantiatedTypeTest( |
// may fall through to it. Otherwise, this inline code will jump to the label |
// is_instance or to the label is_not_instance. |
RawSubtypeTestCache* FlowGraphCompiler::GenerateInlineInstanceof( |
- intptr_t token_pos, |
+ TokenDescriptor token_pos, |
const AbstractType& type, |
Label* is_instance_lbl, |
Label* is_not_instance_lbl) { |
@@ -597,7 +597,7 @@ RawSubtypeTestCache* FlowGraphCompiler::GenerateInlineInstanceof( |
// Clobbers EDX. |
// Returns: |
// - true or false in EAX. |
-void FlowGraphCompiler::GenerateInstanceOf(intptr_t token_pos, |
+void FlowGraphCompiler::GenerateInstanceOf(TokenDescriptor token_pos, |
intptr_t deopt_id, |
const AbstractType& type, |
bool negate_result, |
@@ -679,12 +679,12 @@ void FlowGraphCompiler::GenerateInstanceOf(intptr_t token_pos, |
// - object in EAX for successful assignable check (or throws TypeError). |
// Performance notes: positive checks must be quick, negative checks can be slow |
// as they throw an exception. |
-void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos, |
+void FlowGraphCompiler::GenerateAssertAssignable(TokenDescriptor token_pos, |
intptr_t deopt_id, |
const AbstractType& dst_type, |
const String& dst_name, |
LocationSummary* locs) { |
- ASSERT(!Token::IsClassifying(token_pos)); |
+ ASSERT(!TokenDescriptor(token_pos).IsClassifying()); |
ASSERT(!dst_type.IsNull()); |
ASSERT(dst_type.IsFinalized()); |
// Assignable check is skipped in FlowGraphBuilder, not here. |
@@ -1147,7 +1147,7 @@ void FlowGraphCompiler::CompileGraph() { |
} |
-void FlowGraphCompiler::GenerateCall(intptr_t token_pos, |
+void FlowGraphCompiler::GenerateCall(TokenDescriptor token_pos, |
const StubEntry& stub_entry, |
RawPcDescriptors::Kind kind, |
LocationSummary* locs) { |
@@ -1158,7 +1158,7 @@ void FlowGraphCompiler::GenerateCall(intptr_t token_pos, |
void FlowGraphCompiler::GenerateDartCall(intptr_t deopt_id, |
- intptr_t token_pos, |
+ TokenDescriptor token_pos, |
const StubEntry& stub_entry, |
RawPcDescriptors::Kind kind, |
LocationSummary* locs) { |
@@ -1178,7 +1178,7 @@ void FlowGraphCompiler::GenerateDartCall(intptr_t deopt_id, |
} |
-void FlowGraphCompiler::GenerateRuntimeCall(intptr_t token_pos, |
+void FlowGraphCompiler::GenerateRuntimeCall(TokenDescriptor token_pos, |
intptr_t deopt_id, |
const RuntimeEntry& entry, |
intptr_t argument_count, |
@@ -1204,7 +1204,7 @@ void FlowGraphCompiler::GenerateRuntimeCall(intptr_t token_pos, |
void FlowGraphCompiler::EmitUnoptimizedStaticCall( |
intptr_t argument_count, |
intptr_t deopt_id, |
- intptr_t token_pos, |
+ TokenDescriptor token_pos, |
LocationSummary* locs, |
const ICData& ic_data) { |
const StubEntry& stub_entry = |
@@ -1237,7 +1237,7 @@ void FlowGraphCompiler::EmitOptimizedInstanceCall( |
const ICData& ic_data, |
intptr_t argument_count, |
intptr_t deopt_id, |
- intptr_t token_pos, |
+ TokenDescriptor token_pos, |
LocationSummary* locs) { |
ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0); |
// Each ICData propagated from unoptimized to optimized code contains the |
@@ -1261,7 +1261,7 @@ void FlowGraphCompiler::EmitInstanceCall(const StubEntry& stub_entry, |
const ICData& ic_data, |
intptr_t argument_count, |
intptr_t deopt_id, |
- intptr_t token_pos, |
+ TokenDescriptor token_pos, |
LocationSummary* locs) { |
ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0); |
__ LoadObject(ECX, ic_data); |
@@ -1278,7 +1278,7 @@ void FlowGraphCompiler::EmitMegamorphicInstanceCall( |
const ICData& ic_data, |
intptr_t argument_count, |
intptr_t deopt_id, |
- intptr_t token_pos, |
+ TokenDescriptor token_pos, |
LocationSummary* locs, |
intptr_t try_index) { |
const String& name = String::Handle(zone(), ic_data.target_name()); |
@@ -1319,7 +1319,7 @@ void FlowGraphCompiler::EmitSwitchableInstanceCall( |
const ICData& ic_data, |
intptr_t argument_count, |
intptr_t deopt_id, |
- intptr_t token_pos, |
+ TokenDescriptor token_pos, |
LocationSummary* locs) { |
// Only generated with precompilation. |
UNREACHABLE(); |
@@ -1331,7 +1331,7 @@ void FlowGraphCompiler::EmitOptimizedStaticCall( |
const Array& arguments_descriptor, |
intptr_t argument_count, |
intptr_t deopt_id, |
- intptr_t token_pos, |
+ TokenDescriptor token_pos, |
LocationSummary* locs) { |
__ LoadObject(EDX, arguments_descriptor); |
// Do not use the code from the function, but let the code be patched so that |
@@ -1350,7 +1350,7 @@ Condition FlowGraphCompiler::EmitEqualityRegConstCompare( |
Register reg, |
const Object& obj, |
bool needs_number_check, |
- intptr_t token_pos) { |
+ TokenDescriptor token_pos) { |
ASSERT(!needs_number_check || |
(!obj.IsMint() && !obj.IsDouble() && !obj.IsBigint())); |
@@ -1368,7 +1368,7 @@ Condition FlowGraphCompiler::EmitEqualityRegConstCompare( |
} else { |
__ Call(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); |
} |
- if (token_pos >= 0) { |
+ if (token_pos.IsReal()) { |
AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, |
Thread::kNoDeoptId, |
token_pos); |
@@ -1383,10 +1383,11 @@ Condition FlowGraphCompiler::EmitEqualityRegConstCompare( |
} |
-Condition FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, |
- Register right, |
- bool needs_number_check, |
- intptr_t token_pos) { |
+Condition FlowGraphCompiler::EmitEqualityRegRegCompare( |
+ Register left, |
+ Register right, |
+ bool needs_number_check, |
+ TokenDescriptor token_pos) { |
if (needs_number_check) { |
__ pushl(left); |
__ pushl(right); |
@@ -1395,7 +1396,7 @@ Condition FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, |
} else { |
__ Call(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); |
} |
- if (token_pos >= 0) { |
+ if (token_pos.IsReal()) { |
AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, |
Thread::kNoDeoptId, |
token_pos); |
@@ -1492,7 +1493,7 @@ void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data, |
Label* failed, |
Label* match_found, |
intptr_t deopt_id, |
- intptr_t token_index, |
+ TokenDescriptor token_index, |
LocationSummary* locs) { |
ASSERT(is_optimizing()); |
__ Comment("EmitTestAndCall"); |