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-context-specialization.h" | 5 #include "src/compiler/js-context-specialization.h" |
6 #include "src/compiler/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
7 #include "src/compiler/js-operator.h" | 7 #include "src/compiler/js-operator.h" |
8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
10 #include "src/compiler/source-position.h" | 10 #include "src/compiler/source-position.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 Node* value_use = | 218 Node* value_use = |
219 t.graph()->NewNode(t.simplified()->ChangeTaggedToInt32(), load); | 219 t.graph()->NewNode(t.simplified()->ChangeTaggedToInt32(), load); |
220 Node* other_load = | 220 Node* other_load = |
221 t.graph()->NewNode(t.javascript()->LoadContext(0, slot, true), | 221 t.graph()->NewNode(t.javascript()->LoadContext(0, slot, true), |
222 param_context, param_context, load); | 222 param_context, param_context, load); |
223 Node* effect_use = other_load; | 223 Node* effect_use = other_load; |
224 Node* other_use = | 224 Node* other_use = |
225 t.graph()->NewNode(t.simplified()->ChangeTaggedToInt32(), other_load); | 225 t.graph()->NewNode(t.simplified()->ChangeTaggedToInt32(), other_load); |
226 | 226 |
227 Node* add = t.graph()->NewNode( | 227 Node* add = t.graph()->NewNode( |
228 t.javascript()->Add(LanguageMode::SLOPPY, BinaryOperationHints::Any()), | 228 t.javascript()->Add(BinaryOperationHints::Any()), value_use, other_use, |
229 value_use, other_use, param_context, t.jsgraph()->EmptyFrameState(), | 229 param_context, t.jsgraph()->EmptyFrameState(), |
230 t.jsgraph()->EmptyFrameState(), other_load, start); | 230 t.jsgraph()->EmptyFrameState(), other_load, start); |
231 | 231 |
232 Node* ret = | 232 Node* ret = |
233 t.graph()->NewNode(t.common()->Return(), add, effect_use, start); | 233 t.graph()->NewNode(t.common()->Return(), add, effect_use, start); |
234 Node* end = t.graph()->NewNode(t.common()->End(1), ret); | 234 Node* end = t.graph()->NewNode(t.common()->End(1), ret); |
235 USE(end); | 235 USE(end); |
236 t.graph()->SetEnd(end); | 236 t.graph()->SetEnd(end); |
237 | 237 |
238 // Double check the above graph is what we expect, or the test is broken. | 238 // Double check the above graph is what we expect, or the test is broken. |
239 CheckEffectInput(effect_in, load); | 239 CheckEffectInput(effect_in, load); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 313 |
314 CHECK(T.Call(T.Val(0.0), T.Val(0.0)).ToHandleChecked()->IsNaN()); | 314 CHECK(T.Call(T.Val(0.0), T.Val(0.0)).ToHandleChecked()->IsNaN()); |
315 CHECK(T.Call(T.Val(2.0), T.Val(0.0)).ToHandleChecked()->IsNaN()); | 315 CHECK(T.Call(T.Val(2.0), T.Val(0.0)).ToHandleChecked()->IsNaN()); |
316 CHECK(T.Call(T.Val(-2.1), T.Val(0.0)).ToHandleChecked()->IsNaN()); | 316 CHECK(T.Call(T.Val(-2.1), T.Val(0.0)).ToHandleChecked()->IsNaN()); |
317 } | 317 } |
318 } | 318 } |
319 | 319 |
320 } // namespace compiler | 320 } // namespace compiler |
321 } // namespace internal | 321 } // namespace internal |
322 } // namespace v8 | 322 } // namespace v8 |
OLD | NEW |