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

Unified Diff: runtime/vm/code_generator.cc

Issue 10824349: Implement class id checks as a separate instruction and add a local CSE optimization pass. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/compiler.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 10885)
+++ runtime/vm/code_generator.cc (working copy)
@@ -878,7 +878,7 @@
ic_data.AddReceiverCheck(Class::Handle(args[0]->clazz()).id(),
target_function);
} else {
- GrowableArray<intptr_t> class_ids;
+ GrowableArray<intptr_t> class_ids(args.length());
ASSERT(ic_data.num_args_tested() == args.length());
for (intptr_t i = 0; i < args.length(); i++) {
class_ids.Add(Class::Handle(args[i]->clazz()).id());
@@ -907,7 +907,7 @@
ASSERT(arguments.Count() ==
kInlineCacheMissHandlerOneArgRuntimeEntry.argument_count());
const Instance& receiver = Instance::CheckedHandle(arguments.At(0));
- GrowableArray<const Instance*> args;
+ GrowableArray<const Instance*> args(1);
args.Add(&receiver);
const Function& result =
Function::Handle(InlineCacheMissHandler(isolate, args));
@@ -926,7 +926,7 @@
kInlineCacheMissHandlerTwoArgsRuntimeEntry.argument_count());
const Instance& receiver = Instance::CheckedHandle(arguments.At(0));
const Instance& other = Instance::CheckedHandle(arguments.At(1));
- GrowableArray<const Instance*> args;
+ GrowableArray<const Instance*> args(2);
args.Add(&receiver);
args.Add(&other);
const Function& result =
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698