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

Side by Side Diff: runtime/vm/intermediate_language_ia32.cc

Issue 11262025: Check class instruction supports Smi check. This fixes missed inlining of isOdd/isEven (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 2127 matching lines...) Expand 10 before | Expand all | Expand 10 after
2138 const intptr_t kNumTemps = 1; 2138 const intptr_t kNumTemps = 1;
2139 LocationSummary* summary = 2139 LocationSummary* summary =
2140 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 2140 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
2141 summary->set_in(0, Location::RequiresRegister()); 2141 summary->set_in(0, Location::RequiresRegister());
2142 summary->set_temp(0, Location::RequiresRegister()); 2142 summary->set_temp(0, Location::RequiresRegister());
2143 return summary; 2143 return summary;
2144 } 2144 }
2145 2145
2146 2146
2147 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2147 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2148 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) ||
2149 (unary_checks().NumberOfChecks() > 1));
2148 Register value = locs()->in(0).reg(); 2150 Register value = locs()->in(0).reg();
2149 Register temp = locs()->temp(0).reg(); 2151 Register temp = locs()->temp(0).reg();
2150 Label* deopt = compiler->AddDeoptStub(deopt_id(), 2152 Label* deopt = compiler->AddDeoptStub(deopt_id(),
2151 kDeoptCheckClass); 2153 kDeoptCheckClass);
2152 Label is_ok; 2154 Label is_ok;
2153 intptr_t cix = 0; 2155 intptr_t cix = 0;
2154 if (unary_checks().GetReceiverClassIdAt(cix) == kSmiCid) { 2156 if (unary_checks().GetReceiverClassIdAt(cix) == kSmiCid) {
2155 __ testl(value, Immediate(kSmiTagMask)); 2157 __ testl(value, Immediate(kSmiTagMask));
2156 __ j(ZERO, &is_ok); 2158 __ j(ZERO, &is_ok);
2157 cix++; // Skip first check. 2159 cix++; // Skip first check.
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
2556 __ pcmpeqq(XMM0, XMM0); // Generate all 1's. 2558 __ pcmpeqq(XMM0, XMM0); // Generate all 1's.
2557 __ pxor(value, XMM0); 2559 __ pxor(value, XMM0);
2558 } 2560 }
2559 2561
2560 2562
2561 } // namespace dart 2563 } // namespace dart
2562 2564
2563 #undef __ 2565 #undef __
2564 2566
2565 #endif // defined TARGET_ARCH_X64 2567 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698