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

Unified Diff: runtime/vm/intermediate_language_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/intermediate_language.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
===================================================================
--- runtime/vm/intermediate_language_ia32.cc (revision 10302)
+++ runtime/vm/intermediate_language_ia32.cc (working copy)
@@ -88,7 +88,7 @@
__ LoadObject(temp, function);
__ pushl(result); // Preserve result.
__ pushl(temp);
- compiler->GenerateCallRuntime(AstNode::kNoId,
+ compiler->GenerateCallRuntime(Isolate::kNoDeoptId,
0,
CatchClauseNode::kInvalidTryIndex,
kTraceFunctionExitRuntimeEntry);
@@ -102,7 +102,7 @@
// return pattern with a call to the debug stub.
__ nop(1);
compiler->AddCurrentDescriptor(PcDescriptors::kReturn,
- cid(),
+ deopt_id(),
token_pos(),
CatchClauseNode::kInvalidTryIndex);
}
@@ -197,7 +197,7 @@
__ j(EQUAL, &done, Assembler::kNearJump);
__ pushl(obj); // Push the source object.
- compiler->GenerateCallRuntime(cid(),
+ compiler->GenerateCallRuntime(deopt_id(),
token_pos(),
try_index(),
kConditionTypeErrorRuntimeEntry);
@@ -264,7 +264,7 @@
Register left = comp->locs()->in(0).reg();
Register right = comp->locs()->in(1).reg();
Register temp = comp->locs()->temp(0).reg();
- Label* deopt = compiler->AddDeoptStub(comp->cid(),
+ Label* deopt = compiler->AddDeoptStub(comp->deopt_id(),
comp->token_pos(),
comp->try_index(),
kDeoptSmiCompareSmi,
@@ -293,7 +293,7 @@
Register left = comp->locs()->in(0).reg();
Register right = comp->locs()->in(1).reg();
Register temp = comp->locs()->temp(0).reg();
- Label* deopt = compiler->AddDeoptStub(comp->cid(),
+ Label* deopt = compiler->AddDeoptStub(comp->deopt_id(),
comp->token_pos(),
comp->try_index(),
kDeoptDoubleCompareDouble,
@@ -315,7 +315,7 @@
static void EmitEqualityAsInstanceCall(FlowGraphCompiler* compiler,
EqualityCompareComp* comp) {
compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
- comp->cid(),
+ comp->deopt_id(),
comp->token_pos(),
comp->try_index());
const String& operator_name = String::ZoneHandle(Symbols::New("=="));
@@ -323,7 +323,7 @@
const Array& kNoArgumentNames = Array::Handle();
const int kNumArgumentsChecked = 2;
- compiler->GenerateInstanceCall(comp->cid(),
+ compiler->GenerateInstanceCall(comp->deopt_id(),
comp->token_pos(),
comp->try_index(),
operator_name,
@@ -349,14 +349,14 @@
const LocationSummary& locs,
BranchInstr* branch,
Token::Kind kind,
- intptr_t cid,
+ intptr_t deopt_id,
intptr_t token_pos,
intptr_t try_index) {
ASSERT((kind == Token::kEQ) || (kind == Token::kNE));
const ICData& ic_data = ICData::Handle(orig_ic_data.AsUnaryClassChecks());
ASSERT(ic_data.NumberOfChecks() > 0);
ASSERT(ic_data.num_args_tested() == 1);
- Label* deopt = compiler->AddDeoptStub(cid,
+ Label* deopt = compiler->AddDeoptStub(deopt_id,
token_pos,
try_index,
kDeoptEquality);
@@ -404,7 +404,7 @@
} else {
const int kNumberOfArguments = 2;
const Array& kNoArgumentNames = Array::Handle();
- compiler->GenerateStaticCall(cid,
+ compiler->GenerateStaticCall(deopt_id,
token_pos,
try_index,
target,
@@ -443,7 +443,7 @@
Token::Kind kind,
BranchInstr* branch,
const ICData& ic_data,
- intptr_t cid,
+ intptr_t deopt_id,
intptr_t token_pos,
intptr_t try_index) {
ASSERT((kind == Token::kEQ) || (kind == Token::kNE));
@@ -474,7 +474,7 @@
__ pushl(left);
__ pushl(right);
EmitEqualityAsPolymorphicCall(compiler, ic_data, locs, branch, kind,
- cid, token_pos, try_index);
+ deopt_id, token_pos, try_index);
__ Bind(&done);
}
@@ -489,8 +489,8 @@
return;
}
if (HasICData() && (ic_data()->NumberOfChecks() > 0)) {
- EmitGenericEqualityCompare(compiler, *locs(), kind(), NULL,
- *ic_data(), cid(), token_pos(), try_index());
+ EmitGenericEqualityCompare(compiler, *locs(), kind(), NULL, *ic_data(),
+ deopt_id(), token_pos(), try_index());
} else {
Register left = locs()->in(0).reg();
Register right = locs()->in(1).reg();
@@ -522,13 +522,13 @@
const LocationSummary& locs,
Token::Kind kind,
BranchInstr* branch,
- intptr_t cid,
+ intptr_t deopt_id,
intptr_t token_pos,
intptr_t try_index) {
Register left = locs.in(0).reg();
Register right = locs.in(1).reg();
Register temp = locs.temp(0).reg();
- Label* deopt = compiler->AddDeoptStub(cid,
+ Label* deopt = compiler->AddDeoptStub(deopt_id,
token_pos,
try_index,
kDeoptSmiCompareSmi,
@@ -576,14 +576,14 @@
const LocationSummary& locs,
Token::Kind kind,
BranchInstr* branch,
- intptr_t cid,
+ intptr_t deopt_id,
intptr_t token_pos,
intptr_t try_index) {
Register left = locs.in(0).reg();
Register right = locs.in(1).reg();
// TODO(srdjan): temp is only needed if a conversion Smi->Double occurs.
Register temp = locs.temp(0).reg();
- Label* deopt = compiler->AddDeoptStub(cid,
+ Label* deopt = compiler->AddDeoptStub(deopt_id,
token_pos,
try_index,
kDeoptDoubleComparison,
@@ -606,16 +606,16 @@
void RelationalOpComp::EmitNativeCode(FlowGraphCompiler* compiler) {
if (operands_class_id() == kSmi) {
EmitSmiComparisonOp(compiler, *locs(), kind(), NULL,
- cid(), token_pos(), try_index());
+ deopt_id(), token_pos(), try_index());
return;
}
if (operands_class_id() == kDouble) {
EmitDoubleComparisonOp(compiler, *locs(), kind(), NULL,
- cid(), token_pos(), try_index());
+ deopt_id(), token_pos(), try_index());
return;
}
if (HasICData() && (ic_data()->NumberOfChecks() > 0)) {
- Label* deopt = compiler->AddDeoptStub(cid(),
+ Label* deopt = compiler->AddDeoptStub(deopt_id(),
token_pos(),
try_index(),
kDeoptRelationalOp);
@@ -634,7 +634,7 @@
Array::Handle(), // No named arguments.
deopt, // Deoptimize target.
NULL, // Fallthrough when done.
- cid(),
+ deopt_id(),
token_pos(),
try_index());
return;
@@ -642,12 +642,12 @@
const String& function_name =
String::ZoneHandle(Symbols::New(Token::Str(kind())));
compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
- cid(),
+ deopt_id(),
token_pos(),
try_index());
const intptr_t kNumArguments = 2;
const intptr_t kNumArgsChecked = 2; // Type-feedback.
- compiler->GenerateInstanceCall(cid(),
+ compiler->GenerateInstanceCall(deopt_id(),
token_pos(),
try_index(),
function_name,
@@ -722,7 +722,7 @@
static void EmitLoadIndexedPolymorphic(FlowGraphCompiler* compiler,
LoadIndexedComp* comp) {
- Label* deopt = compiler->AddDeoptStub(comp->cid(),
+ Label* deopt = compiler->AddDeoptStub(comp->deopt_id(),
comp->token_pos(),
comp->try_index(),
kDeoptLoadIndexedPolymorphic);
@@ -744,7 +744,7 @@
Array::Handle(), // No named arguments.
deopt, // Deoptimize target.
NULL, // Fallthrough when done.
- comp->cid(),
+ comp->deopt_id(),
comp->token_pos(),
comp->try_index());
}
@@ -769,7 +769,7 @@
const DeoptReasonId deopt_reason = (receiver_type() == kGrowableObjectArray) ?
kDeoptLoadIndexedGrowableArray : kDeoptLoadIndexedFixedArray;
- Label* deopt = compiler->AddDeoptStub(cid(),
+ Label* deopt = compiler->AddDeoptStub(deopt_id(),
token_pos(),
try_index(),
deopt_reason,
@@ -840,13 +840,13 @@
String::ZoneHandle(Symbols::New(Token::Str(Token::kASSIGN_INDEX)));
compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
- comp->cid(),
+ comp->deopt_id(),
comp->token_pos(),
comp->try_index());
const intptr_t kNumArguments = 3;
const intptr_t kNumArgsChecked = 1; // Type-feedback.
- compiler->GenerateInstanceCall(comp->cid(),
+ compiler->GenerateInstanceCall(comp->deopt_id(),
comp->token_pos(),
comp->try_index(),
function_name,
@@ -858,7 +858,7 @@
static void EmitStoreIndexedPolymorphic(FlowGraphCompiler* compiler,
StoreIndexedComp* comp) {
- Label* deopt = compiler->AddDeoptStub(comp->cid(),
+ Label* deopt = compiler->AddDeoptStub(comp->deopt_id(),
comp->token_pos(),
comp->try_index(),
kDeoptStoreIndexedPolymorphic);
@@ -880,7 +880,7 @@
Array::Handle(), // No named arguments.
deopt, // Deoptimize target.
NULL, // Fallthrough when done.
- comp->cid(),
+ comp->deopt_id(),
comp->token_pos(),
comp->try_index());
}
@@ -901,7 +901,7 @@
Register value = locs()->in(2).reg();
Register temp = locs()->temp(0).reg();
- Label* deopt = compiler->AddDeoptStub(cid(),
+ Label* deopt = compiler->AddDeoptStub(deopt_id(),
token_pos(),
try_index(),
kDeoptStoreIndexed,
@@ -966,7 +966,7 @@
if (HasICData()) {
ASSERT(original() != NULL);
- Label* deopt = compiler->AddDeoptStub(original()->cid(),
+ Label* deopt = compiler->AddDeoptStub(original()->deopt_id(),
original()->token_pos(),
original()->try_index(),
kDeoptInstanceGetterSameTarget,
@@ -1013,7 +1013,7 @@
ASSERT(locs()->in(1).reg() == ECX); // Instantiator.
ASSERT(locs()->in(2).reg() == EDX); // Instantiator type arguments.
- compiler->GenerateInstanceOf(cid(),
+ compiler->GenerateInstanceOf(deopt_id(),
token_pos(),
try_index(),
type(),
@@ -1072,7 +1072,7 @@
__ PushObject(cls);
__ pushl(type_arguments);
__ pushl(instantiator_type_arguments);
- compiler->GenerateCallRuntime(cid(),
+ compiler->GenerateCallRuntime(deopt_id(),
token_pos(),
try_index(),
kAllocateObjectWithBoundsCheckRuntimeEntry);
@@ -1095,7 +1095,7 @@
Register result_reg = locs()->out().reg();
if (HasICData()) {
ASSERT(original() != NULL);
- Label* deopt = compiler->AddDeoptStub(original()->cid(),
+ Label* deopt = compiler->AddDeoptStub(original()->deopt_id(),
original()->token_pos(),
original()->try_index(),
kDeoptInstanceGetterSameTarget,
@@ -1161,7 +1161,7 @@
__ PushObject(Object::ZoneHandle()); // Make room for the result.
__ PushObject(type_arguments());
__ pushl(instantiator_reg); // Push instantiator type arguments.
- compiler->GenerateCallRuntime(cid(),
+ compiler->GenerateCallRuntime(deopt_id(),
token_pos(),
try_index(),
kInstantiateTypeArgumentsRuntimeEntry);
@@ -1341,7 +1341,7 @@
__ PushObject(Object::ZoneHandle()); // Make room for the result.
__ pushl(context_value);
- compiler->GenerateCallRuntime(cid(),
+ compiler->GenerateCallRuntime(deopt_id(),
token_pos(),
try_index(),
kCloneContextRuntimeEntry);
@@ -1392,7 +1392,7 @@
Address::Absolute(Isolate::Current()->stack_limit_address()));
Label no_stack_overflow;
__ j(ABOVE, &no_stack_overflow);
- compiler->GenerateCallRuntime(cid(),
+ compiler->GenerateCallRuntime(deopt_id(),
token_pos(),
try_index(),
kStackOverflowRuntimeEntry);
@@ -1471,7 +1471,7 @@
Register result = comp->locs()->out().reg();
Register temp = comp->locs()->temp(0).reg();
ASSERT(left == result);
- Label* deopt = compiler->AddDeoptStub(comp->instance_call()->cid(),
+ Label* deopt = compiler->AddDeoptStub(comp->instance_call()->deopt_id(),
comp->instance_call()->token_pos(),
comp->instance_call()->try_index(),
kDeoptSmiBinaryOp,
@@ -1582,7 +1582,7 @@
const intptr_t kArgumentCount = 2;
__ pushl(temp);
__ pushl(right);
- compiler->GenerateStaticCall(comp->instance_call()->cid(),
+ compiler->GenerateStaticCall(comp->instance_call()->deopt_id(),
comp->instance_call()->token_pos(),
comp->instance_call()->try_index(),
target,
@@ -1629,7 +1629,7 @@
Register temp = comp->locs()->temp(0).reg();
ASSERT(left == result);
ASSERT(comp->op_kind() == Token::kBIT_AND);
- Label* deopt = compiler->AddDeoptStub(comp->instance_call()->cid(),
+ Label* deopt = compiler->AddDeoptStub(comp->instance_call()->deopt_id(),
comp->instance_call()->token_pos(),
comp->instance_call()->try_index(),
kDeoptMintBinaryOp,
@@ -1677,7 +1677,7 @@
} else {
__ pushl(left);
__ pushl(right);
- compiler->GenerateStaticCall(comp->instance_call()->cid(),
+ compiler->GenerateStaticCall(comp->instance_call()->deopt_id(),
comp->instance_call()->token_pos(),
comp->instance_call()->try_index(),
target,
@@ -1697,7 +1697,7 @@
} else {
__ pushl(left);
__ pushl(right);
- compiler->GenerateStaticCall(comp->instance_call()->cid(),
+ compiler->GenerateStaticCall(comp->instance_call()->deopt_id(),
comp->instance_call()->token_pos(),
comp->instance_call()->try_index(),
target,
@@ -1750,7 +1750,7 @@
__ popl(right);
__ popl(left);
- Label* deopt = compiler->AddDeoptStub(instance_call()->cid(),
+ Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
instance_call()->token_pos(),
instance_call()->try_index(),
kDeoptDoubleBinaryOp,
@@ -1796,7 +1796,7 @@
Register value = locs()->in(0).reg();
Register result = locs()->out().reg();
ASSERT(value == result);
- Label* deopt = compiler->AddDeoptStub(instance_call()->cid(),
+ Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
instance_call()->token_pos(),
instance_call()->try_index(),
kDeoptUnaryOp,
@@ -1848,7 +1848,7 @@
Register value = locs()->in(0).reg();
Register result = locs()->out().reg();
ASSERT(value == result);
- Label* deopt = compiler->AddDeoptStub(instance_call()->cid(),
+ Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
instance_call()->token_pos(),
instance_call()->try_index(),
kDeoptUnaryOp,
@@ -1906,7 +1906,7 @@
const DeoptReasonId deopt_reason = (from() == kDouble) ?
kDeoptDoubleToDouble : kDeoptIntegerToDouble;
- Label* deopt = compiler->AddDeoptStub(instance_call()->cid(),
+ Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
instance_call()->token_pos(),
instance_call()->try_index(),
deopt_reason,
@@ -1951,7 +1951,7 @@
void PolymorphicInstanceCallComp::EmitNativeCode(FlowGraphCompiler* compiler) {
- Label* deopt = compiler->AddDeoptStub(instance_call()->cid(),
+ Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
instance_call()->token_pos(),
instance_call()->try_index(),
kDeoptPolymorphicInstanceCallTestFail);
@@ -1978,14 +1978,14 @@
instance_call()->argument_names(),
deopt,
(is_smi_label == &handle_smi) ? &done : NULL,
- instance_call()->cid(),
+ instance_call()->deopt_id(),
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(),
+ compiler->GenerateStaticCall(instance_call()->deopt_id(),
instance_call()->token_pos(),
instance_call()->try_index(),
target,
@@ -2059,18 +2059,18 @@
if (HasICData() && (ic_data()->NumberOfChecks() > 0)) {
if (ICDataWithBothClassIds(*ic_data(), kSmi)) {
EmitSmiComparisonOp(compiler, *locs(), kind(), this,
- cid(), token_pos(), try_index());
+ deopt_id(), token_pos(), try_index());
return;
}
if (ICDataWithBothClassIds(*ic_data(), kDouble)) {
EmitDoubleComparisonOp(compiler, *locs(), kind(), this,
- cid(), token_pos(), try_index());
+ deopt_id(), token_pos(), try_index());
return;
}
// TODO(srdjan): Add Smi/Double, Double/Smi comparisons.
if ((kind() == Token::kEQ) || (kind() == Token::kNE)) {
EmitGenericEqualityCompare(compiler, *locs(), kind(), this, *ic_data(),
- cid(), token_pos(), try_index());
+ deopt_id(), token_pos(), try_index());
return;
}
// Otherwise polymorphic dispatch?
@@ -2081,12 +2081,12 @@
const String& function_name =
String::ZoneHandle(Symbols::New(Token::Str(call_kind)));
compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
- cid(),
+ deopt_id(),
token_pos(),
try_index());
const intptr_t kNumArguments = 2;
const intptr_t kNumArgsChecked = 2; // Type-feedback.
- compiler->GenerateInstanceCall(cid(),
+ compiler->GenerateInstanceCall(deopt_id(),
token_pos(),
try_index(),
function_name,
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698