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

Unified Diff: runtime/vm/code_generator.cc

Issue 11467015: Revert "Do not call ResolveCompileInstanceFunction from the lookup stub." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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/code_generator.h ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 84735e4fa8247802f7fc88bd27cbbf4a6229927d..0ab08196e3c6d85af24574f3d2e2be5d1cd50ea1 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -826,6 +826,29 @@ static void CheckResultError(const Object& result) {
}
+// Resolves an instance function and compiles it if necessary.
+// Arg0: receiver object.
+// Arg1: IC data object.
+// Arg2: Arguments descriptor array.
+// Returns: RawCode object or NULL (method not found or not compileable).
+// This is called by the megamorphic stub when instance call does not need to be
+// patched.
+// Used by megamorphic lookup/no-such-method-handling.
+DEFINE_RUNTIME_ENTRY(ResolveCompileInstanceFunction, 3) {
+ ASSERT(arguments.ArgCount() ==
+ kResolveCompileInstanceFunctionRuntimeEntry.argument_count());
+ const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0));
+ const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(1));
+ const Array& arg_desc_array = Array::CheckedHandle(arguments.ArgAt(2));
+ ArgumentsDescriptor arg_descriptor(arg_desc_array);
+ const Code& code =
+ Code::Handle(ResolveCompileInstanceCallTarget(receiver,
+ ic_data,
+ arg_descriptor));
+ arguments.SetReturn(code);
+}
+
+
// Gets called from debug stub when code reaches a breakpoint.
DEFINE_RUNTIME_ENTRY(BreakpointStaticHandler, 0) {
ASSERT(arguments.ArgCount() ==
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698