| OLD | NEW |
| 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 | 6 |
| 7 #include "src/compilation-dependencies.h" | 7 #include "src/compilation-dependencies.h" |
| 8 #include "src/compiler/access-builder.h" | 8 #include "src/compiler/access-builder.h" |
| 9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 | 268 |
| 269 // TODO(turbofan): Perform type checks on the {value}. We are not guaranteed | 269 // TODO(turbofan): Perform type checks on the {value}. We are not guaranteed |
| 270 // to learn from these checks in case they fail, as the witness (i.e. the | 270 // to learn from these checks in case they fail, as the witness (i.e. the |
| 271 // map check from the LoadIC for a.push) might not be executed in baseline | 271 // map check from the LoadIC for a.push) might not be executed in baseline |
| 272 // code (after we stored the value in the builtin and thereby changed the | 272 // code (after we stored the value in the builtin and thereby changed the |
| 273 // elements kind of a) before be decide to optimize this function again. We | 273 // elements kind of a) before be decide to optimize this function again. We |
| 274 // currently don't have a proper way to deal with this; the proper solution | 274 // currently don't have a proper way to deal with this; the proper solution |
| 275 // here is to learn on deopt, i.e. disable Array.prototype.push inlining | 275 // here is to learn on deopt, i.e. disable Array.prototype.push inlining |
| 276 // for this function. | 276 // for this function. |
| 277 if (IsFastSmiElementsKind(receiver_map->elements_kind())) { | 277 if (IsFastSmiElementsKind(receiver_map->elements_kind())) { |
| 278 value = effect = graph()->NewNode(simplified()->CheckTaggedSigned(), | 278 value = effect = |
| 279 value, effect, control); | 279 graph()->NewNode(simplified()->CheckSmi(), value, effect, control); |
| 280 } else if (IsFastDoubleElementsKind(receiver_map->elements_kind())) { | 280 } else if (IsFastDoubleElementsKind(receiver_map->elements_kind())) { |
| 281 value = effect = | 281 value = effect = |
| 282 graph()->NewNode(simplified()->CheckNumber(), value, effect, control); | 282 graph()->NewNode(simplified()->CheckNumber(), value, effect, control); |
| 283 // Make sure we do not store signaling NaNs into double arrays. | 283 // Make sure we do not store signaling NaNs into double arrays. |
| 284 value = graph()->NewNode(simplified()->NumberSilenceNaN(), value); | 284 value = graph()->NewNode(simplified()->NumberSilenceNaN(), value); |
| 285 } | 285 } |
| 286 | 286 |
| 287 // Load the "length" property of the {receiver}. | 287 // Load the "length" property of the {receiver}. |
| 288 Node* length = effect = graph()->NewNode( | 288 Node* length = effect = graph()->NewNode( |
| 289 simplified()->LoadField( | 289 simplified()->LoadField( |
| (...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 } | 1250 } |
| 1251 | 1251 |
| 1252 | 1252 |
| 1253 SimplifiedOperatorBuilder* JSBuiltinReducer::simplified() const { | 1253 SimplifiedOperatorBuilder* JSBuiltinReducer::simplified() const { |
| 1254 return jsgraph()->simplified(); | 1254 return jsgraph()->simplified(); |
| 1255 } | 1255 } |
| 1256 | 1256 |
| 1257 } // namespace compiler | 1257 } // namespace compiler |
| 1258 } // namespace internal | 1258 } // namespace internal |
| 1259 } // namespace v8 | 1259 } // namespace v8 |
| OLD | NEW |