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

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

Issue 807593002: Merge RawICData::range_feedback_ field into RawICData::state_bits_. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 5759 matching lines...) Expand 10 before | Expand all | Expand 10 after
5770 } 5770 }
5771 5771
5772 5772
5773 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5773 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5774 const Register left = locs()->in(0).reg(); 5774 const Register left = locs()->in(0).reg();
5775 const Register out = locs()->out(0).reg(); 5775 const Register out = locs()->out(0).reg();
5776 ASSERT(left == out); 5776 ASSERT(left == out);
5777 5777
5778 Label* deopt = NULL; 5778 Label* deopt = NULL;
5779 if (CanDeoptimize()) { 5779 if (CanDeoptimize()) {
5780 deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptShiftMintOp); 5780 deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
5781 } 5781 }
5782 if (locs()->in(1).IsConstant()) { 5782 if (locs()->in(1).IsConstant()) {
5783 // Code for a constant shift amount. 5783 // Code for a constant shift amount.
5784 ASSERT(locs()->in(1).constant().IsSmi()); 5784 ASSERT(locs()->in(1).constant().IsSmi());
5785 const int64_t shift = 5785 const int64_t shift =
5786 reinterpret_cast<int64_t>(locs()->in(1).constant().raw()) >> 1; 5786 reinterpret_cast<int64_t>(locs()->in(1).constant().raw()) >> 1;
5787 switch (op_kind()) { 5787 switch (op_kind()) {
5788 case Token::kSHR: 5788 case Token::kSHR:
5789 __ sarq(left, Immediate(shift)); 5789 __ sarq(left, Immediate(shift));
5790 break; 5790 break;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
5939 5939
5940 5940
5941 void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5941 void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5942 const intptr_t kShifterLimit = 31; 5942 const intptr_t kShifterLimit = 31;
5943 5943
5944 Register left = locs()->in(0).reg(); 5944 Register left = locs()->in(0).reg();
5945 Register out = locs()->out(0).reg(); 5945 Register out = locs()->out(0).reg();
5946 ASSERT(left == out); 5946 ASSERT(left == out);
5947 5947
5948 5948
5949 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptShiftMintOp); 5949 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
5950 5950
5951 if (locs()->in(1).IsConstant()) { 5951 if (locs()->in(1).IsConstant()) {
5952 // Shifter is constant. 5952 // Shifter is constant.
5953 5953
5954 const Object& constant = locs()->in(1).constant(); 5954 const Object& constant = locs()->in(1).constant();
5955 ASSERT(constant.IsSmi()); 5955 ASSERT(constant.IsSmi());
5956 const intptr_t shift_value = Smi::Cast(constant).Value(); 5956 const intptr_t shift_value = Smi::Cast(constant).Value();
5957 5957
5958 // Do the shift: (shift_value > 0) && (shift_value <= kShifterLimit). 5958 // Do the shift: (shift_value > 0) && (shift_value <= kShifterLimit).
5959 switch (op_kind()) { 5959 switch (op_kind()) {
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
6402 __ movq(R10, Immediate(kInvalidObjectPointer)); 6402 __ movq(R10, Immediate(kInvalidObjectPointer));
6403 __ movq(RBX, Immediate(kInvalidObjectPointer)); 6403 __ movq(RBX, Immediate(kInvalidObjectPointer));
6404 #endif 6404 #endif
6405 } 6405 }
6406 6406
6407 } // namespace dart 6407 } // namespace dart
6408 6408
6409 #undef __ 6409 #undef __
6410 6410
6411 #endif // defined TARGET_ARCH_X64 6411 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698