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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 10572050: Removing more IC calls in optimized code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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_ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
===================================================================
--- runtime/vm/flow_graph_compiler.cc (revision 8921)
+++ runtime/vm/flow_graph_compiler.cc (working copy)
@@ -404,6 +404,37 @@
}
+void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data,
+ Register class_id_reg,
+ intptr_t arg_count,
+ const Array& arg_names,
+ Label* deopt,
+ Label* done,
+ intptr_t cid,
+ intptr_t token_index,
+ intptr_t try_index) {
+ // TODO(srdjan): better loop please!
+ for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) {
+ Label next_test;
+ assembler()->cmpl(class_id_reg, Immediate(ic_data.GetReceiverClassIdAt(i)));
+ assembler()->j(NOT_EQUAL, &next_test);
+ const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(i));
+ GenerateStaticCall(cid,
+ token_index,
+ try_index,
+ target,
+ arg_count,
+ arg_names);
+ assembler()->jmp(done);
+ assembler()->Bind(&next_test);
+ }
+ assembler()->jmp(deopt);
+}
+
+
+
+
+
Register FrameRegisterAllocator::AllocateFreeRegister(bool* blocked_registers) {
for (intptr_t regno = 0; regno < kNumberOfCpuRegisters; regno++) {
if (!blocked_registers[regno] && (registers_[regno] == NULL)) {
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/flow_graph_compiler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698