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

Unified Diff: runtime/vm/flow_graph_compiler_ia32.cc

Issue 10458050: Move ReturnInstr to new scheme (x64 and ia32) and implement more code in new ia32 compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 | « 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 8165)
+++ runtime/vm/flow_graph_compiler_ia32.cc (working copy)
@@ -324,6 +324,67 @@
}
+void FlowGraphCompiler::EmitInstanceCall(intptr_t cid,
+ intptr_t token_index,
+ intptr_t try_index,
+ const String& function_name,
+ intptr_t argument_count,
+ const Array& argument_names,
+ intptr_t checked_argument_count) {
+ ICData& ic_data = ICData::ZoneHandle(ICData::New(parsed_function_.function(),
+ function_name,
+ cid,
+ checked_argument_count));
+ const Array& arguments_descriptor =
+ CodeGenerator::ArgumentsDescriptor(argument_count, argument_names);
+ __ LoadObject(ECX, ic_data);
+ __ LoadObject(EDX, arguments_descriptor);
+
+ uword label_address = 0;
+ switch (checked_argument_count) {
+ case 1:
+ label_address = StubCode::OneArgCheckInlineCacheEntryPoint();
+ break;
+ case 2:
+ label_address = StubCode::TwoArgsCheckInlineCacheEntryPoint();
+ break;
+ default:
+ UNIMPLEMENTED();
+ }
+ ExternalLabel target_label("InlineCache", label_address);
+ __ call(&target_label);
+ AddCurrentDescriptor(PcDescriptors::kIcCall, cid, token_index, try_index);
+ __ Drop(argument_count);
+}
+
+
+void FlowGraphCompiler::EmitStaticCall(intptr_t token_index,
+ intptr_t try_index,
+ const Function& function,
+ intptr_t argument_count,
+ const Array& argument_names) {
+ const Array& arguments_descriptor =
+ CodeGenerator::ArgumentsDescriptor(argument_count, argument_names);
+ __ LoadObject(ECX, function);
+ __ LoadObject(EDX, arguments_descriptor);
+
+ GenerateCall(token_index,
+ try_index,
+ &StubCode::CallStaticFunctionLabel(),
+ PcDescriptors::kFuncCall);
+ __ Drop(argument_count);
+}
+
+
+void FlowGraphCompiler::GenerateCall(intptr_t token_index,
+ intptr_t try_index,
+ const ExternalLabel* label,
+ PcDescriptors::Kind kind) {
+ __ call(label);
+ AddCurrentDescriptor(kind, AstNode::kNoId, token_index, try_index);
+}
+
+
void FlowGraphCompiler::GenerateDeferredCode() {
for (intptr_t i = 0; i < deopt_stubs_.length(); i++) {
deopt_stubs_[i]->GenerateCode(this);
« 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