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

Unified Diff: runtime/vm/code_generator.cc

Issue 484693003: Improve polymorphic inlining of int/int double/double operations. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased and addressed comments Created 6 years, 4 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/code_generator.h ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 39445)
+++ runtime/vm/code_generator.cc (working copy)
@@ -894,6 +894,37 @@
}
+// Handles a static call in unoptimized code that has one argument type not
+// seen before. Compile the target if necessary and update the ICData.
+// Arg0: argument.
+// Arg1: IC data object.
+DEFINE_RUNTIME_ENTRY(StaticCallMissHandlerOneArg, 2) {
+ const Instance& arg = Instance::CheckedHandle(arguments.ArgAt(0));
+ const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(1));
+ // IC data for static call is prepopulated with the statically known target.
+ ASSERT(ic_data.NumberOfChecks() == 1);
+ const Function& target = Function::Handle(ic_data.GetTargetAt(0));
+ if (!target.HasCode()) {
+ const Error& error = Error::Handle(Compiler::CompileFunction(isolate,
+ target));
+ if (!error.IsNull()) {
+ Exceptions::PropagateError(error);
+ }
+ }
+ ASSERT(!target.IsNull() && target.HasCode());
+ ic_data.AddReceiverCheck(arg.GetClassId(), target, 1);
+ if (FLAG_trace_ic) {
+ DartFrameIterator iterator;
+ StackFrame* caller_frame = iterator.NextFrame();
+ ASSERT(caller_frame != NULL);
+ OS::PrintErr("StaticCallMissHandler at %#" Px
+ " target %s (%" Pd ")\n",
+ caller_frame->pc(), target.ToCString(), arg.GetClassId());
+ }
+ arguments.SetReturn(target);
+}
+
+
// Handles a static call in unoptimized code that has two argument types not
// seen before. Compile the target if necessary and update the ICData.
// Arg0: argument 0.
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698