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

Unified Diff: runtime/vm/code_generator_ia32.cc

Issue 8357034: Transitioning to new IC structure: change IC data to include function name; pass IC data instead ... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 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
Index: runtime/vm/code_generator_ia32.cc
===================================================================
--- runtime/vm/code_generator_ia32.cc (revision 577)
+++ runtime/vm/code_generator_ia32.cc (working copy)
@@ -10,6 +10,7 @@
#include "lib/error.h"
#include "vm/ast_printer.h"
#include "vm/dart_entry.h"
+#include "vm/ic_data.h"
#include "vm/longjump.h"
#include "vm/object.h"
#include "vm/object_store.h"
@@ -256,7 +257,7 @@
AstPrinter::PrintFunctionNodes(parsed_function_);
}
if (FLAG_trace_functions) {
- // Preserve ECX (function name or object) and EDX (arguments descriptor).
+ // Preserve ECX (ic-data array or object) and EDX (arguments descriptor).
__ pushl(ECX);
__ pushl(EDX);
const Function& function =
@@ -474,7 +475,8 @@
// Set up the function name and number of arguments (including the receiver)
// to the InstanceCall stub which will resolve the correct entrypoint for
// the operator and call it.
- __ LoadObject(ECX, function_name);
+ ICData ic_data(function_name, 1);
+ __ LoadObject(ECX, Array::ZoneHandle(ic_data.data()));
__ LoadObject(EDX, ArgumentsDescriptor(num_arguments,
optional_arguments_names));
__ call(&StubCode::CallInstanceFunctionLabel());
@@ -698,12 +700,13 @@
kClosureArgumentMismatchRuntimeEntry);
} else {
// Invoke noSuchMethod function.
- __ LoadObject(ECX, String::ZoneHandle(function.name()));
+ ICData ic_data(String::Handle(function.name()), 1);
+ __ LoadObject(ECX, Array::ZoneHandle(ic_data.data()));
// EBP : points to previous frame pointer.
// EBP + 4 : points to return address.
// EBP + 8 : address of last argument (arg n-1).
// ESP + 8 + 4*(n-1) : address of first argument (arg 0).
- // ECX : function name.
+ // ECX : ic-data array.
// EDX : arguments descriptor array.
__ call(&StubCode::CallNoSuchMethodFunctionLabel());
}

Powered by Google App Engine
This is Rietveld 408576698