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

Side by Side Diff: src/compiler/js-builtin-reducer.cc

Issue 1893483003: [turbofan] Quickfix for fround built-in lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « 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/js-builtin-reducer.h" 5 #include "src/compiler/js-builtin-reducer.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 #include "src/compiler/simplified-operator.h" 9 #include "src/compiler/simplified-operator.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Math.floor(a:number) -> NumberFloor(a) 165 // Math.floor(a:number) -> NumberFloor(a)
166 Node* value = graph()->NewNode(simplified()->NumberFloor(), r.left()); 166 Node* value = graph()->NewNode(simplified()->NumberFloor(), r.left());
167 return Replace(value); 167 return Replace(value);
168 } 168 }
169 return NoChange(); 169 return NoChange();
170 } 170 }
171 171
172 // ES6 draft 08-24-14, section 20.2.2.17. 172 // ES6 draft 08-24-14, section 20.2.2.17.
173 Reduction JSBuiltinReducer::ReduceMathFround(Node* node) { 173 Reduction JSBuiltinReducer::ReduceMathFround(Node* node) {
174 JSCallReduction r(node); 174 JSCallReduction r(node);
175 if (r.InputsMatchOne(Type::Number())) { 175 if (r.InputsMatchOne(Type::NumberOrUndefined())) {
176 // Math.fround(a:number) -> TruncateFloat64ToFloat32(a) 176 // Math.fround(a:number) -> TruncateFloat64ToFloat32(a)
177 Node* value = 177 Node* value =
178 graph()->NewNode(machine()->TruncateFloat64ToFloat32(), r.left()); 178 graph()->NewNode(machine()->TruncateFloat64ToFloat32(), r.left());
179 return Replace(value); 179 return Replace(value);
180 } 180 }
181 return NoChange(); 181 return NoChange();
182 } 182 }
183 183
184 // ES6 section 20.2.2.28 Math.round ( x ) 184 // ES6 section 20.2.2.28 Math.round ( x )
185 Reduction JSBuiltinReducer::ReduceMathRound(Node* node) { 185 Reduction JSBuiltinReducer::ReduceMathRound(Node* node) {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 } 276 }
277 277
278 278
279 SimplifiedOperatorBuilder* JSBuiltinReducer::simplified() const { 279 SimplifiedOperatorBuilder* JSBuiltinReducer::simplified() const {
280 return jsgraph()->simplified(); 280 return jsgraph()->simplified();
281 } 281 }
282 282
283 } // namespace compiler 283 } // namespace compiler
284 } // namespace internal 284 } // namespace internal
285 } // namespace v8 285 } // 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