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

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

Issue 59073003: Version 0.8.10.4 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | « dart/runtime/vm/intermediate_language.h ('k') | dart/runtime/vm/intermediate_language_arm.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/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 } 1510 }
1511 1511
1512 1512
1513 Definition* UnboxFloat32x4Instr::Canonicalize(FlowGraph* flow_graph) { 1513 Definition* UnboxFloat32x4Instr::Canonicalize(FlowGraph* flow_graph) {
1514 // Fold away UnboxFloat32x4(BoxFloat32x4(v)). 1514 // Fold away UnboxFloat32x4(BoxFloat32x4(v)).
1515 BoxFloat32x4Instr* defn = value()->definition()->AsBoxFloat32x4(); 1515 BoxFloat32x4Instr* defn = value()->definition()->AsBoxFloat32x4();
1516 return (defn != NULL) ? defn->value()->definition() : this; 1516 return (defn != NULL) ? defn->value()->definition() : this;
1517 } 1517 }
1518 1518
1519 1519
1520 Definition* BoxUint32x4Instr::Canonicalize(FlowGraph* flow_graph) { 1520 Definition* BoxInt32x4Instr::Canonicalize(FlowGraph* flow_graph) {
1521 if (input_use_list() == NULL) { 1521 if (input_use_list() == NULL) {
1522 // Environments can accomodate any representation. No need to box. 1522 // Environments can accomodate any representation. No need to box.
1523 return value()->definition(); 1523 return value()->definition();
1524 } 1524 }
1525 1525
1526 // Fold away BoxUint32x4(UnboxUint32x4(v)). 1526 // Fold away BoxInt32x4(UnboxInt32x4(v)).
1527 UnboxUint32x4Instr* defn = value()->definition()->AsUnboxUint32x4(); 1527 UnboxInt32x4Instr* defn = value()->definition()->AsUnboxInt32x4();
1528 if ((defn != NULL) && (defn->value()->Type()->ToCid() == kUint32x4Cid)) { 1528 if ((defn != NULL) && (defn->value()->Type()->ToCid() == kInt32x4Cid)) {
1529 return defn->value()->definition(); 1529 return defn->value()->definition();
1530 } 1530 }
1531 1531
1532 return this; 1532 return this;
1533 } 1533 }
1534 1534
1535 1535
1536 Definition* UnboxUint32x4Instr::Canonicalize(FlowGraph* flow_graph) { 1536 Definition* UnboxInt32x4Instr::Canonicalize(FlowGraph* flow_graph) {
1537 // Fold away UnboxUint32x4(BoxUint32x4(v)). 1537 // Fold away UnboxInt32x4(BoxInt32x4(v)).
1538 BoxUint32x4Instr* defn = value()->definition()->AsBoxUint32x4(); 1538 BoxInt32x4Instr* defn = value()->definition()->AsBoxInt32x4();
1539 return (defn != NULL) ? defn->value()->definition() : this; 1539 return (defn != NULL) ? defn->value()->definition() : this;
1540 } 1540 }
1541 1541
1542 1542
1543 Definition* BooleanNegateInstr::Canonicalize(FlowGraph* flow_graph) { 1543 Definition* BooleanNegateInstr::Canonicalize(FlowGraph* flow_graph) {
1544 Definition* defn = value()->definition(); 1544 Definition* defn = value()->definition();
1545 if (defn->IsComparison() && 1545 if (defn->IsComparison() &&
1546 (value()->Type()->ToCid() == kBoolCid) && 1546 (value()->Type()->ToCid() == kBoolCid) &&
1547 defn->HasOnlyUse(value())) { 1547 defn->HasOnlyUse(value())) {
1548 defn->AsComparison()->NegateComparison(); 1548 defn->AsComparison()->NegateComparison();
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 return kCosRuntimeEntry; 2891 return kCosRuntimeEntry;
2892 default: 2892 default:
2893 UNREACHABLE(); 2893 UNREACHABLE();
2894 } 2894 }
2895 return kSinRuntimeEntry; 2895 return kSinRuntimeEntry;
2896 } 2896 }
2897 2897
2898 #undef __ 2898 #undef __
2899 2899
2900 } // namespace dart 2900 } // namespace dart
OLDNEW
« no previous file with comments | « dart/runtime/vm/intermediate_language.h ('k') | dart/runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698