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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 10917005: Add explicit class checks: LoadVMField. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: removed now unused helper 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/flow_graph_compiler_x64.h ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_x64.cc
===================================================================
--- runtime/vm/flow_graph_compiler_x64.cc (revision 11587)
+++ runtime/vm/flow_graph_compiler_x64.cc (working copy)
@@ -1058,36 +1058,6 @@
}
-// Checks class id of instance against all 'class_ids'. Jump to 'deopt' label
-// if no match or instance is Smi.
-void FlowGraphCompiler::EmitClassChecksNoSmi(const ICData& ic_data,
- Register instance_reg,
- Register temp_reg,
- Label* deopt) {
- Label ok;
- ASSERT(ic_data.GetReceiverClassIdAt(0) != kSmiCid);
- __ testq(instance_reg, Immediate(kSmiTagMask));
- __ j(ZERO, deopt);
- Label is_ok;
- const intptr_t num_checks = ic_data.NumberOfChecks();
- const bool use_near_jump = num_checks < 5;
- __ LoadClassId(temp_reg, instance_reg);
- for (intptr_t i = 0; i < num_checks; i++) {
- __ cmpl(temp_reg, Immediate(ic_data.GetReceiverClassIdAt(i)));
- if (i == (num_checks - 1)) {
- __ j(NOT_EQUAL, deopt);
- } else {
- if (use_near_jump) {
- __ j(EQUAL, &is_ok, Assembler::kNearJump);
- } else {
- __ j(EQUAL, &is_ok);
- }
- }
- }
- __ Bind(&is_ok);
-}
-
-
void FlowGraphCompiler::LoadDoubleOrSmiToXmm(XmmRegister result,
Register reg,
Register temp,
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698