| 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 #include "src/compiler/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
| 7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
| 8 #include "src/compiler/simplified-operator.h" | 8 #include "src/compiler/simplified-operator.h" |
| 9 #include "src/compiler/typer.h" | 9 #include "src/compiler/typer.h" |
| 10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 Node* function = StringFunction("fromCharCode"); | 209 Node* function = StringFunction("fromCharCode"); |
| 210 | 210 |
| 211 Node* effect = graph()->start(); | 211 Node* effect = graph()->start(); |
| 212 Node* control = graph()->start(); | 212 Node* control = graph()->start(); |
| 213 Node* context = UndefinedConstant(); | 213 Node* context = UndefinedConstant(); |
| 214 Node* frame_state = graph()->start(); | 214 Node* frame_state = graph()->start(); |
| 215 TRACED_FOREACH(Type*, t0, kNumberTypes) { | 215 TRACED_FOREACH(Type*, t0, kNumberTypes) { |
| 216 Node* p0 = Parameter(t0, 0); | 216 Node* p0 = Parameter(t0, 0); |
| 217 Node* call = graph()->NewNode(javascript()->CallFunction(3), function, | 217 Node* call = graph()->NewNode(javascript()->CallFunction(3), function, |
| 218 UndefinedConstant(), p0, context, frame_state, | 218 UndefinedConstant(), p0, context, frame_state, |
| 219 frame_state, effect, control); | 219 effect, control); |
| 220 Reduction r = Reduce(call); | 220 Reduction r = Reduce(call); |
| 221 | 221 |
| 222 ASSERT_TRUE(r.Changed()); | 222 ASSERT_TRUE(r.Changed()); |
| 223 EXPECT_THAT(r.replacement(), IsStringFromCharCode(p0)); | 223 EXPECT_THAT(r.replacement(), IsStringFromCharCode(p0)); |
| 224 } | 224 } |
| 225 } | 225 } |
| 226 | 226 |
| 227 } // namespace compiler | 227 } // namespace compiler |
| 228 } // namespace internal | 228 } // namespace internal |
| 229 } // namespace v8 | 229 } // namespace v8 |
| OLD | NEW |