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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 10264031: Switch from AST node ids to computation ids (cid). In addition to computations,… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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_x64.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_x64.cc
===================================================================
--- runtime/vm/flow_graph_compiler_x64.cc (revision 7204)
+++ runtime/vm/flow_graph_compiler_x64.cc (working copy)
@@ -292,7 +292,7 @@
// - object in RAX 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 node_id,
+void FlowGraphCompiler::GenerateAssertAssignable(intptr_t cid,
intptr_t token_index,
intptr_t try_index,
const AbstractType& dst_type,
@@ -324,7 +324,7 @@
__ pushq(RAX); // Push the source object.
__ PushObject(dst_name); // Push the name of the destination.
__ PushObject(error_message);
- GenerateCallRuntime(node_id,
+ GenerateCallRuntime(cid,
token_index,
try_index,
kMalformedTypeErrorRuntimeEntry);
@@ -342,10 +342,10 @@
__ PushObject(Object::ZoneHandle()); // Make room for the result.
const Immediate location =
Immediate(reinterpret_cast<int64_t>(Smi::New(token_index)));
- const Immediate node_id_as_smi =
- Immediate(reinterpret_cast<int64_t>(Smi::New(node_id)));
+ const Immediate cid_as_smi =
+ Immediate(reinterpret_cast<int64_t>(Smi::New(cid)));
__ pushq(location); // Push the source location.
- __ pushq(node_id_as_smi); // node-id.
+ __ pushq(cid_as_smi); // node-id.
__ pushq(RAX); // Push the source object.
__ PushObject(dst_type); // Push the type of the destination.
if (!dst_type.IsInstantiated()) {
@@ -354,7 +354,7 @@
__ pushq(raw_null); // Null instantiator.
}
__ PushObject(dst_name); // Push the name of the destination.
- GenerateCallRuntime(node_id,
+ GenerateCallRuntime(cid,
token_index,
try_index,
kTypeCheckRuntimeEntry);
@@ -403,7 +403,7 @@
__ popq(RDX);
}
LoadValue(RAX, comp->value());
- GenerateAssertAssignable(comp->node_id(),
+ GenerateAssertAssignable(comp->cid(),
comp->token_index(),
comp->try_index(),
comp->dst_type(),
@@ -425,7 +425,7 @@
Immediate(reinterpret_cast<int64_t>(Smi::New(comp->token_index())));
__ pushq(location); // Push the source location.
__ pushq(RAX); // Push the source object.
- GenerateCallRuntime(comp->node_id(),
+ GenerateCallRuntime(comp->cid(),
comp->token_index(),
comp->try_index(),
kConditionTypeErrorRuntimeEntry);
@@ -468,7 +468,7 @@
}
-void FlowGraphCompiler::EmitInstanceCall(intptr_t node_id,
+void FlowGraphCompiler::EmitInstanceCall(intptr_t cid,
intptr_t token_index,
intptr_t try_index,
const String& function_name,
@@ -478,7 +478,7 @@
ICData& ic_data =
ICData::ZoneHandle(ICData::New(parsed_function_.function(),
function_name,
- node_id,
+ cid,
checked_argument_count));
const Array& arguments_descriptor =
CodeGenerator::ArgumentsDescriptor(argument_count, argument_names);
@@ -498,7 +498,7 @@
}
ExternalLabel target_label("InlineCache", label_address);
__ call(&target_label);
- AddCurrentDescriptor(PcDescriptors::kIcCall, node_id, token_index, try_index);
+ AddCurrentDescriptor(PcDescriptors::kIcCall, cid, token_index, try_index);
__ addq(RSP, Immediate(argument_count * kWordSize));
}
@@ -554,7 +554,7 @@
void FlowGraphCompiler::VisitInstanceCall(InstanceCallComp* comp) {
ASSERT(VerifyCallComputation(comp));
- EmitInstanceCall(comp->node_id(),
+ EmitInstanceCall(comp->cid(),
comp->token_index(),
comp->try_index(),
comp->function_name(),
@@ -611,7 +611,7 @@
const Array& kNoArgumentNames = Array::Handle();
const int kNumArgumentsChecked = 1;
- EmitInstanceCall(comp->node_id(),
+ EmitInstanceCall(comp->cid(),
comp->token_index(),
comp->try_index(),
operator_name,
@@ -738,7 +738,7 @@
__ pushq(RCX);
__ pushq(RBX);
__ pushq(RAX);
- EmitInstanceCall(comp->node_id(),
+ EmitInstanceCall(comp->cid(),
comp->token_index(),
comp->try_index(),
function_name,
@@ -761,7 +761,7 @@
__ pushq(RAX);
__ pushq(RBX);
__ pushq(RAX);
- EmitInstanceCall(comp->node_id(),
+ EmitInstanceCall(comp->cid(),
comp->token_index(),
comp->try_index(),
function_name,
@@ -811,7 +811,7 @@
// Destroys RCX and RDX.
// Returns:
// - true or false in RAX.
-void FlowGraphCompiler::GenerateInstanceOf(intptr_t node_id,
+void FlowGraphCompiler::GenerateInstanceOf(intptr_t cid,
intptr_t token_index,
intptr_t try_index,
const AbstractType& type,
@@ -844,10 +844,10 @@
__ PushObject(Object::ZoneHandle()); // Make room for the result.
const Immediate location =
Immediate(reinterpret_cast<int64_t>(Smi::New(token_index)));
- const Immediate node_id_as_smi =
- Immediate(reinterpret_cast<int64_t>(Smi::New(node_id)));
+ const Immediate cid_as_smi =
+ Immediate(reinterpret_cast<int64_t>(Smi::New(cid)));
__ pushq(location); // Push the source location.
- __ pushq(node_id_as_smi);
+ __ pushq(cid_as_smi);
__ pushq(RAX); // Push the instance.
__ PushObject(type); // Push the type.
if (!type.IsInstantiated()) {
@@ -855,7 +855,7 @@
} else {
__ pushq(raw_null); // Null instantiator.
}
- GenerateCallRuntime(node_id, token_index, try_index, kInstanceofRuntimeEntry);
+ GenerateCallRuntime(cid, token_index, 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.
__ addq(RSP, Immediate(5 * kWordSize));
@@ -886,7 +886,7 @@
__ popq(RDX);
}
LoadValue(RAX, comp->value());
- GenerateInstanceOf(comp->node_id(),
+ GenerateInstanceOf(comp->cid(),
comp->token_index(),
comp->try_index(),
comp->type(),
@@ -992,7 +992,7 @@
__ PushObject(Object::ZoneHandle()); // Make room for the result.
__ PushObject(comp->type_arguments());
__ pushq(RAX); // Push instantiator type arguments.
- GenerateCallRuntime(comp->node_id(),
+ GenerateCallRuntime(comp->cid(),
comp->token_index(),
comp->try_index(),
kInstantiateTypeArgumentsRuntimeEntry);
@@ -1124,7 +1124,7 @@
__ popq(RAX); // Get context value from stack.
__ PushObject(Object::ZoneHandle()); // Make room for the result.
__ pushq(RAX);
- GenerateCallRuntime(comp->node_id(),
+ GenerateCallRuntime(comp->cid(),
comp->token_index(),
comp->try_index(),
kCloneContextRuntimeEntry);
@@ -1256,7 +1256,7 @@
__ nop(1);
__ nop(1);
AddCurrentDescriptor(PcDescriptors::kReturn,
- instr->node_id(),
+ instr->cid(),
instr->token_index(),
CatchClauseNode::kInvalidTryIndex); // try-index.
}
@@ -1265,7 +1265,7 @@
void FlowGraphCompiler::VisitThrow(ThrowInstr* instr) {
LoadValue(RAX, instr->exception());
__ pushq(RAX);
- GenerateCallRuntime(instr->node_id(),
+ GenerateCallRuntime(instr->cid(),
instr->token_index(),
instr->try_index(),
kThrowRuntimeEntry);
@@ -1278,7 +1278,7 @@
__ pushq(RAX);
LoadValue(RAX, instr->stack_trace());
__ pushq(RAX);
- GenerateCallRuntime(instr->node_id(),
+ GenerateCallRuntime(instr->cid(),
instr->token_index(),
instr->try_index(),
kReThrowRuntimeEntry);
@@ -1666,23 +1666,23 @@
}
-void FlowGraphCompiler::GenerateCallRuntime(intptr_t node_id,
+void FlowGraphCompiler::GenerateCallRuntime(intptr_t cid,
intptr_t token_index,
intptr_t try_index,
const RuntimeEntry& entry) {
__ CallRuntime(entry);
- AddCurrentDescriptor(PcDescriptors::kOther, node_id, token_index, try_index);
+ AddCurrentDescriptor(PcDescriptors::kOther, cid, token_index, try_index);
}
// Uses current pc position and try-index.
void FlowGraphCompiler::AddCurrentDescriptor(PcDescriptors::Kind kind,
- intptr_t node_id,
+ intptr_t cid,
intptr_t token_index,
intptr_t try_index) {
pc_descriptors_list_->AddDescriptor(kind,
assembler_->CodeSize(),
- node_id,
+ cid,
token_index,
try_index);
}
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698