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

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

Issue 11557012: Narrow result cid and type of BinarySmiOp to be always smi. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
« no previous file with comments | « no previous file | no next file » | 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/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/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/flow_graph_allocator.h" 9 #include "vm/flow_graph_allocator.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 return AbstractType::null(); 1316 return AbstractType::null();
1317 } 1317 }
1318 1318
1319 1319
1320 RawAbstractType* CheckStackOverflowInstr::CompileType() const { 1320 RawAbstractType* CheckStackOverflowInstr::CompileType() const {
1321 return AbstractType::null(); 1321 return AbstractType::null();
1322 } 1322 }
1323 1323
1324 1324
1325 RawAbstractType* BinarySmiOpInstr::CompileType() const { 1325 RawAbstractType* BinarySmiOpInstr::CompileType() const {
1326 return (op_kind() == Token::kSHL) ? Type::IntType() : Type::SmiType(); 1326 return Type::SmiType();
1327 } 1327 }
1328 1328
1329 1329
1330 intptr_t BinarySmiOpInstr::ResultCid() const { 1330 intptr_t BinarySmiOpInstr::ResultCid() const {
1331 return (op_kind() == Token::kSHL) ? kDynamicCid : kSmiCid; 1331 return kSmiCid;
1332 } 1332 }
1333 1333
1334 1334
1335 bool BinarySmiOpInstr::CanDeoptimize() const { 1335 bool BinarySmiOpInstr::CanDeoptimize() const {
1336 switch (op_kind()) { 1336 switch (op_kind()) {
1337 case Token::kBIT_AND: 1337 case Token::kBIT_AND:
1338 case Token::kBIT_OR: 1338 case Token::kBIT_OR:
1339 case Token::kBIT_XOR: 1339 case Token::kBIT_XOR:
1340 return false; 1340 return false;
1341 case Token::kSHR: { 1341 case Token::kSHR: {
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after
2753 default: 2753 default:
2754 UNREACHABLE(); 2754 UNREACHABLE();
2755 return -1; 2755 return -1;
2756 } 2756 }
2757 } 2757 }
2758 2758
2759 2759
2760 #undef __ 2760 #undef __
2761 2761
2762 } // namespace dart 2762 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698