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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 882063002: [turbofan] Use unboxed doubles in range types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make tests less fragile. Created 5 years, 10 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 | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/typer.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 : jsgraph_(jsgraph), 68 : jsgraph_(jsgraph),
69 count_(jsgraph->graph()->NodeCount()), 69 count_(jsgraph->graph()->NodeCount()),
70 info_(zone->NewArray<NodeInfo>(count_)), 70 info_(zone->NewArray<NodeInfo>(count_)),
71 nodes_(zone), 71 nodes_(zone),
72 replacements_(zone), 72 replacements_(zone),
73 phase_(PROPAGATE), 73 phase_(PROPAGATE),
74 changer_(changer), 74 changer_(changer),
75 queue_(zone) { 75 queue_(zone) {
76 memset(info_, 0, sizeof(NodeInfo) * count_); 76 memset(info_, 0, sizeof(NodeInfo) * count_);
77 77
78 Factory* f = jsgraph->isolate()->factory();
79 safe_int_additive_range_ = 78 safe_int_additive_range_ =
80 Type::Range(f->NewNumber(-std::pow(2.0, 52.0)), 79 Type::Range(-std::pow(2.0, 52.0), std::pow(2.0, 52.0), zone);
81 f->NewNumber(std::pow(2.0, 52.0)), zone);
82 } 80 }
83 81
84 void Run(SimplifiedLowering* lowering) { 82 void Run(SimplifiedLowering* lowering) {
85 // Run propagation phase to a fixpoint. 83 // Run propagation phase to a fixpoint.
86 TRACE(("--{Propagation phase}--\n")); 84 TRACE(("--{Propagation phase}--\n"));
87 phase_ = PROPAGATE; 85 phase_ = PROPAGATE;
88 Enqueue(jsgraph_->graph()->end()); 86 Enqueue(jsgraph_->graph()->end());
89 // Process nodes from the queue until it is empty. 87 // Process nodes from the queue until it is empty.
90 while (!queue_.empty()) { 88 while (!queue_.empty()) {
91 Node* node = queue_.front(); 89 Node* node = queue_.front();
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 1513
1516 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 1514 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
1517 node->set_op(machine()->IntLessThanOrEqual()); 1515 node->set_op(machine()->IntLessThanOrEqual());
1518 node->ReplaceInput(0, StringComparison(node, true)); 1516 node->ReplaceInput(0, StringComparison(node, true));
1519 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1517 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1520 } 1518 }
1521 1519
1522 } // namespace compiler 1520 } // namespace compiler
1523 } // namespace internal 1521 } // namespace internal
1524 } // namespace v8 1522 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/typer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698