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

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

Issue 1148943004: VM: Fix bugs with missing deoptimization environment and int32x4 constructor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comment Created 5 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm64.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) 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/constant_propagator.h" 8 #include "vm/constant_propagator.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 } else if ((kSmiBits < 32) && value()->Type()->IsInt()) { 1250 } else if ((kSmiBits < 32) && value()->Type()->IsInt()) {
1251 // Note: we don't support truncation of Bigint values. 1251 // Note: we don't support truncation of Bigint values.
1252 return !RangeUtils::Fits(value()->definition()->range(), 1252 return !RangeUtils::Fits(value()->definition()->range(),
1253 RangeBoundary::kRangeBoundaryInt32); 1253 RangeBoundary::kRangeBoundaryInt32);
1254 } else { 1254 } else {
1255 return true; 1255 return true;
1256 } 1256 }
1257 } 1257 }
1258 1258
1259 1259
1260 bool UnboxUint32Instr::CanDeoptimize() const {
1261 ASSERT(is_truncating());
1262 if ((value()->Type()->ToCid() == kSmiCid) ||
1263 (value()->Type()->ToCid() == kMintCid)) {
1264 return false;
1265 }
1266 // Check input value's range.
1267 Range* value_range = value()->definition()->range();
1268 return !RangeUtils::Fits(value_range, RangeBoundary::kRangeBoundaryInt64);
1269 }
1270
1271
1260 bool BinaryInt32OpInstr::CanDeoptimize() const { 1272 bool BinaryInt32OpInstr::CanDeoptimize() const {
1261 switch (op_kind()) { 1273 switch (op_kind()) {
1262 case Token::kBIT_AND: 1274 case Token::kBIT_AND:
1263 case Token::kBIT_OR: 1275 case Token::kBIT_OR:
1264 case Token::kBIT_XOR: 1276 case Token::kBIT_XOR:
1265 return false; 1277 return false;
1266 1278
1267 case Token::kSHR: 1279 case Token::kSHR:
1268 return false; 1280 return false;
1269 1281
(...skipping 2329 matching lines...) Expand 10 before | Expand all | Expand 10 after
3599 case Token::kTRUNCDIV: return 0; 3611 case Token::kTRUNCDIV: return 0;
3600 case Token::kMOD: return 1; 3612 case Token::kMOD: return 1;
3601 default: UNIMPLEMENTED(); return -1; 3613 default: UNIMPLEMENTED(); return -1;
3602 } 3614 }
3603 } 3615 }
3604 3616
3605 3617
3606 #undef __ 3618 #undef __
3607 3619
3608 } // namespace dart 3620 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698