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

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

Issue 673793002: Disambiguate pow (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « 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 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 nodes_(zone), 70 nodes_(zone),
71 replacements_(zone), 71 replacements_(zone),
72 contains_js_nodes_(false), 72 contains_js_nodes_(false),
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 = zone->isolate()->factory(); 78 Factory* f = zone->isolate()->factory();
79 safe_int_additive_range_ = 79 safe_int_additive_range_ =
80 Type::Range(f->NewNumber(-pow(2, 52)), f->NewNumber(pow(2, 52)), zone); 80 Type::Range(f->NewNumber(-std::pow(2.0, 52.0)),
81 f->NewNumber(std::pow(2.0, 52.0)), zone);
81 } 82 }
82 83
83 void Run(SimplifiedLowering* lowering) { 84 void Run(SimplifiedLowering* lowering) {
84 // Run propagation phase to a fixpoint. 85 // Run propagation phase to a fixpoint.
85 TRACE(("--{Propagation phase}--\n")); 86 TRACE(("--{Propagation phase}--\n"));
86 phase_ = PROPAGATE; 87 phase_ = PROPAGATE;
87 Enqueue(jsgraph_->graph()->end()); 88 Enqueue(jsgraph_->graph()->end());
88 // Process nodes from the queue until it is empty. 89 // Process nodes from the queue until it is empty.
89 while (!queue_.empty()) { 90 while (!queue_.empty()) {
90 Node* node = queue_.front(); 91 Node* node = queue_.front();
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 1231 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
1231 node->set_op(machine()->IntLessThanOrEqual()); 1232 node->set_op(machine()->IntLessThanOrEqual());
1232 node->ReplaceInput(0, StringComparison(node, true)); 1233 node->ReplaceInput(0, StringComparison(node, true));
1233 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1234 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1234 } 1235 }
1235 1236
1236 1237
1237 } // namespace compiler 1238 } // namespace compiler
1238 } // namespace internal 1239 } // namespace internal
1239 } // namespace v8 1240 } // namespace v8
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