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

Unified Diff: vm/flow_graph_compiler_x64.cc

Issue 10407082: Reland: Migrate {Closure,Instance,Static}Call to use location-based code generation templates. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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 | « vm/flow_graph_compiler_x64.h ('k') | vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/flow_graph_compiler_x64.cc
===================================================================
--- vm/flow_graph_compiler_x64.cc (revision 7834)
+++ vm/flow_graph_compiler_x64.cc (working copy)
@@ -435,27 +435,6 @@
}
-// True iff. the arguments to a call will be properly pushed and can
-// be popped after the call.
-template <typename T> static bool VerifyCallComputation(T* comp) {
- // Argument values should be consecutive temps.
- //
- // TODO(kmillikin): implement stack height tracking so we can also assert
- // they are on top of the stack.
- intptr_t previous = -1;
- for (int i = 0; i < comp->ArgumentCount(); ++i) {
- Value* val = comp->ArgumentAt(i);
- if (!val->IsUse()) return false;
- intptr_t current = val->AsUse()->definition()->temp_index();
- if (i != 0) {
- if (current != (previous + 1)) return false;
- }
- previous = current;
- }
- return true;
-}
-
-
// Truee iff. the v2 is above v1 on stack, or one of them is constant.
static bool VerifyValues(Value* v1, Value* v2) {
if (v1->IsUse() && v2->IsUse()) {
@@ -530,33 +509,14 @@
void FlowGraphCompiler::VisitClosureCall(ClosureCallComp* comp) {
- ASSERT(VerifyCallComputation(comp));
- // The arguments to the stub include the closure. The arguments
- // descriptor describes the closure's arguments (and so does not include
- // the closure).
- int argument_count = comp->ArgumentCount();
- const Array& arguments_descriptor =
- CodeGenerator::ArgumentsDescriptor(argument_count - 1,
- comp->argument_names());
- __ LoadObject(R10, arguments_descriptor);
-
- GenerateCall(comp->token_index(),
- comp->try_index(),
- &StubCode::CallClosureFunctionLabel(),
- PcDescriptors::kOther);
- __ Drop(argument_count);
+ // Moved to intermediate_language_x64.cc.
+ UNREACHABLE();
}
void FlowGraphCompiler::VisitInstanceCall(InstanceCallComp* comp) {
- ASSERT(VerifyCallComputation(comp));
- EmitInstanceCall(comp->cid(),
- comp->token_index(),
- comp->try_index(),
- comp->function_name(),
- comp->ArgumentCount(),
- comp->argument_names(),
- comp->checked_argument_count());
+ // Moved to intermediate_language_x64.cc.
+ UNREACHABLE();
}
@@ -607,12 +567,8 @@
void FlowGraphCompiler::VisitStaticCall(StaticCallComp* comp) {
- ASSERT(VerifyCallComputation(comp));
- EmitStaticCall(comp->token_index(),
- comp->try_index(),
- comp->function(),
- comp->ArgumentCount(),
- comp->argument_names());
+ // Moved to intermediate_language_x64.cc.
+ UNREACHABLE();
}
@@ -654,7 +610,7 @@
void FlowGraphCompiler::VisitStoreInstanceField(StoreInstanceFieldComp* comp) {
- VerifyValues(comp->instance(), comp->value());
+ ASSERT(VerifyValues(comp->instance(), comp->value()));
LoadValue(RDX, comp->value());
LoadValue(RAX, comp->instance());
__ StoreIntoObject(RAX, FieldAddress(RAX, comp->field().Offset()), RDX);
« no previous file with comments | « vm/flow_graph_compiler_x64.h ('k') | vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698