Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: runtime/vm/flow_graph_compiler_ia32.cc

Issue 10832150: Get rid of ast node ids. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.h ('k') | runtime/vm/flow_graph_compiler_x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_ia32.cc
===================================================================
--- runtime/vm/flow_graph_compiler_ia32.cc (revision 10302)
+++ runtime/vm/flow_graph_compiler_ia32.cc (working copy)
@@ -170,7 +170,6 @@
// Clobbers ECX, EDI.
RawSubtypeTestCache*
FlowGraphCompiler::GenerateInstantiatedTypeWithArgumentsTest(
- intptr_t cid,
intptr_t token_pos,
const AbstractType& type,
Label* is_instance_lbl,
@@ -199,7 +198,7 @@
GenerateListTypeCheck(kClassIdReg, is_instance_lbl);
}
return GenerateSubtype1TestCacheLookup(
- cid, token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
+ 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) {
@@ -213,7 +212,7 @@
if (object_type.IsSubtypeOf(tp_argument, NULL)) {
// Instance class test only necessary.
return GenerateSubtype1TestCacheLookup(
- cid, token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
+ token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
}
}
}
@@ -247,7 +246,6 @@
// Clobbers ECX, EDI.
// Returns true if there is a fallthrough.
bool FlowGraphCompiler::GenerateInstantiatedTypeNoArgumentsTest(
- intptr_t cid,
intptr_t token_pos,
const AbstractType& type,
Label* is_instance_lbl,
@@ -322,7 +320,6 @@
// arrays can grow too high, but they may be useful when optimizing
// code (type-feedback).
RawSubtypeTestCache* FlowGraphCompiler::GenerateSubtype1TestCacheLookup(
- intptr_t cid,
intptr_t token_pos,
const Class& type_class,
Label* is_instance_lbl,
@@ -351,7 +348,6 @@
// EAX: instance (preserved).
// Clobbers EDX, EDI, ECX.
RawSubtypeTestCache* FlowGraphCompiler::GenerateUninstantiatedTypeTest(
- intptr_t cid,
intptr_t token_pos,
const AbstractType& type,
Label* is_instance_lbl,
@@ -443,7 +439,6 @@
// 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 cid,
intptr_t token_pos,
const AbstractType& type,
Label* is_instance_lbl,
@@ -459,16 +454,14 @@
// A class equality check is only applicable with a dst type of a
// non-parameterized class or with a raw dst type of a parameterized class.
if (type_class.HasTypeArguments()) {
- return GenerateInstantiatedTypeWithArgumentsTest(cid,
- token_pos,
+ return GenerateInstantiatedTypeWithArgumentsTest(token_pos,
type,
is_instance_lbl,
is_not_instance_lbl);
// Fall through to runtime call.
}
const bool has_fall_through =
- GenerateInstantiatedTypeNoArgumentsTest(cid,
- token_pos,
+ GenerateInstantiatedTypeNoArgumentsTest(token_pos,
type,
is_instance_lbl,
is_not_instance_lbl);
@@ -476,14 +469,12 @@
// If test non-conclusive so far, try the inlined type-test cache.
// 'type' is known at compile time.
return GenerateSubtype1TestCacheLookup(
- cid, token_pos, type_class,
- is_instance_lbl, is_not_instance_lbl);
+ token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
} else {
return SubtypeTestCache::null();
}
}
- return GenerateUninstantiatedTypeTest(cid,
- token_pos,
+ return GenerateUninstantiatedTypeTest(token_pos,
type,
is_instance_lbl,
is_not_instance_lbl);
@@ -502,7 +493,7 @@
// Clobbers ECX and EDX.
// Returns:
// - true or false in EAX.
-void FlowGraphCompiler::GenerateInstanceOf(intptr_t cid,
+void FlowGraphCompiler::GenerateInstanceOf(intptr_t deopt_id,
intptr_t token_pos,
intptr_t try_index,
const AbstractType& type,
@@ -530,7 +521,7 @@
// Generate inline instanceof test.
SubtypeTestCache& test_cache = SubtypeTestCache::ZoneHandle();
- test_cache = GenerateInlineInstanceof(cid, token_pos, type,
+ test_cache = GenerateInlineInstanceof(token_pos, type,
&is_instance, &is_not_instance);
// test_cache is null if there is no fall-through.
@@ -540,17 +531,17 @@
__ 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(cid))); // Computation id.
__ pushl(EAX); // Push the instance.
__ PushObject(type); // Push the type.
__ pushl(ECX); // Instantiator.
__ pushl(EDX); // Instantiator type arguments.
__ LoadObject(EAX, test_cache);
__ pushl(EAX);
- GenerateCallRuntime(cid, token_pos, try_index, kInstanceofRuntimeEntry);
+ GenerateCallRuntime(deopt_id, token_pos, try_index,
+ kInstanceofRuntimeEntry);
// Pop the parameters supplied to the runtime entry. The result of the
// instanceof runtime call will be left as the result of the operation.
- __ Drop(6);
+ __ Drop(5);
if (negate_result) {
__ popl(EDX);
__ LoadObject(EAX, bool_true());
@@ -586,7 +577,7 @@
// - 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 cid,
+void FlowGraphCompiler::GenerateAssertAssignable(intptr_t deopt_id,
intptr_t token_pos,
intptr_t try_index,
const AbstractType& dst_type,
@@ -615,7 +606,7 @@
__ pushl(EAX); // Push the source object.
__ PushObject(dst_name); // Push the name of the destination.
__ PushObject(error_message);
- GenerateCallRuntime(cid,
+ GenerateCallRuntime(deopt_id,
token_pos,
try_index,
kMalformedTypeErrorRuntimeEntry);
@@ -628,14 +619,13 @@
// Generate inline type check, linking to runtime call if not assignable.
SubtypeTestCache& test_cache = SubtypeTestCache::ZoneHandle();
- test_cache = GenerateInlineInstanceof(cid, token_pos, dst_type,
+ test_cache = GenerateInlineInstanceof(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(cid))); // Computation id.
__ pushl(EAX); // Push the source object.
__ PushObject(dst_type); // Push the type of the destination.
__ pushl(ECX); // Instantiator.
@@ -643,13 +633,13 @@
__ PushObject(dst_name); // Push the name of the destination.
__ LoadObject(EAX, test_cache);
__ pushl(EAX);
- GenerateCallRuntime(cid,
+ GenerateCallRuntime(deopt_id,
token_pos,
try_index,
kTypeCheckRuntimeEntry);
// Pop the parameters supplied to the runtime entry. The result of the
// type check runtime call is the checked value.
- __ Drop(7);
+ __ Drop(6);
__ popl(EAX);
__ Bind(&is_assignable);
@@ -822,7 +812,7 @@
__ addl(ESP, Immediate(StackSize() * kWordSize));
}
if (function.IsClosureFunction()) {
- GenerateCallRuntime(AstNode::kNoId,
+ GenerateCallRuntime(Isolate::kNoDeoptId,
0,
CatchClauseNode::kInvalidTryIndex,
kClosureArgumentMismatchRuntimeEntry);
@@ -833,7 +823,7 @@
ICData& ic_data = ICData::ZoneHandle();
ic_data = ICData::New(function,
String::Handle(function.name()),
- AstNode::kNoId,
+ Isolate::kNoDeoptId,
kNumArgsChecked);
__ LoadObject(ECX, ic_data);
// EBP - 4 : PC marker, allows easy identification of RawInstruction obj.
@@ -849,7 +839,7 @@
if (FLAG_trace_functions) {
__ pushl(EAX); // Preserve result.
__ PushObject(Function::ZoneHandle(function.raw()));
- GenerateCallRuntime(AstNode::kNoId,
+ GenerateCallRuntime(Isolate::kNoDeoptId,
0,
CatchClauseNode::kInvalidTryIndex,
kTraceFunctionExitRuntimeEntry);
@@ -970,7 +960,7 @@
__ cmpl(EAX, Immediate(Smi::RawValue(parameter_count)));
__ j(EQUAL, &argc_in_range, Assembler::kNearJump);
if (function.IsClosureFunction()) {
- GenerateCallRuntime(AstNode::kNoId,
+ GenerateCallRuntime(Isolate::kNoDeoptId,
function.token_pos(),
CatchClauseNode::kInvalidTryIndex,
kClosureArgumentMismatchRuntimeEntry);
@@ -1008,7 +998,7 @@
Address::Absolute(Isolate::Current()->stack_limit_address()));
Label no_stack_overflow;
__ j(ABOVE, &no_stack_overflow, Assembler::kNearJump);
- GenerateCallRuntime(AstNode::kNoId,
+ GenerateCallRuntime(Isolate::kNoDeoptId,
function.token_pos(),
CatchClauseNode::kInvalidTryIndex,
kStackOverflowRuntimeEntry);
@@ -1032,7 +1022,7 @@
// at entry point.
pc_descriptors_list()->AddDescriptor(PcDescriptors::kPatchCode,
assembler()->CodeSize(),
- AstNode::kNoId,
+ Isolate::kNoDeoptId,
0,
-1);
__ jmp(&StubCode::FixCallersTargetLabel());
@@ -1046,18 +1036,18 @@
ASSERT(!IsLeaf());
ASSERT(frame_register_allocator()->IsSpilled());
__ call(label);
- AddCurrentDescriptor(kind, AstNode::kNoId, token_pos, try_index);
+ AddCurrentDescriptor(kind, Isolate::kNoDeoptId, token_pos, try_index);
}
-void FlowGraphCompiler::GenerateCallRuntime(intptr_t cid,
+void FlowGraphCompiler::GenerateCallRuntime(intptr_t deopt_id,
intptr_t token_pos,
intptr_t try_index,
const RuntimeEntry& entry) {
ASSERT(!IsLeaf());
ASSERT(frame_register_allocator()->IsSpilled());
__ CallRuntime(entry);
- AddCurrentDescriptor(PcDescriptors::kOther, cid, token_pos, try_index);
+ AddCurrentDescriptor(PcDescriptors::kOther, deopt_id, token_pos, try_index);
}
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.h ('k') | runtime/vm/flow_graph_compiler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698