| 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 <limits> | 5 #include <limits> |
| 6 | 6 |
| 7 #include "src/compiler/change-lowering.h" | 7 #include "src/compiler/change-lowering.h" |
| 8 #include "src/compiler/control-builders.h" | 8 #include "src/compiler/control-builders.h" |
| 9 #include "src/compiler/generic-node-inl.h" | 9 #include "src/compiler/generic-node-inl.h" |
| 10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 using namespace v8::internal; | 25 using namespace v8::internal; |
| 26 using namespace v8::internal::compiler; | 26 using namespace v8::internal::compiler; |
| 27 | 27 |
| 28 template <typename ReturnType> | 28 template <typename ReturnType> |
| 29 class ChangesLoweringTester : public GraphBuilderTester<ReturnType> { | 29 class ChangesLoweringTester : public GraphBuilderTester<ReturnType> { |
| 30 public: | 30 public: |
| 31 explicit ChangesLoweringTester(MachineType p0 = kMachNone) | 31 explicit ChangesLoweringTester(MachineType p0 = kMachNone) |
| 32 : GraphBuilderTester<ReturnType>(p0), | 32 : GraphBuilderTester<ReturnType>(p0), |
| 33 typer(this->zone()), | 33 typer(this->zone()), |
| 34 jsgraph(this->graph(), this->common(), &typer), | 34 javascript(this->zone()), |
| 35 jsgraph(this->graph(), this->common(), &javascript, &typer, |
| 36 this->machine()), |
| 35 function(Handle<JSFunction>::null()) {} | 37 function(Handle<JSFunction>::null()) {} |
| 36 | 38 |
| 37 Typer typer; | 39 Typer typer; |
| 40 JSOperatorBuilder javascript; |
| 38 JSGraph jsgraph; | 41 JSGraph jsgraph; |
| 39 Handle<JSFunction> function; | 42 Handle<JSFunction> function; |
| 40 | 43 |
| 41 Node* start() { return this->graph()->start(); } | 44 Node* start() { return this->graph()->start(); } |
| 42 | 45 |
| 43 template <typename T> | 46 template <typename T> |
| 44 T* CallWithPotentialGC() { | 47 T* CallWithPotentialGC() { |
| 45 // TODO(titzer): we need to wrap the code in a JSFunction and call it via | 48 // TODO(titzer): we need to wrap the code in a JSFunction and call it via |
| 46 // Execution::Call() so that the GC knows about the frame, can walk it, | 49 // Execution::Call() so that the GC knows about the frame, can walk it, |
| 47 // relocate the code object if necessary, etc. | 50 // relocate the code object if necessary, etc. |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 | 403 |
| 401 input = *i; | 404 input = *i; |
| 402 Object* result = t.CallWithPotentialGC<Object>(); | 405 Object* result = t.CallWithPotentialGC<Object>(); |
| 403 t.CheckNumber(input, result); | 406 t.CheckNumber(input, result); |
| 404 } | 407 } |
| 405 } | 408 } |
| 406 } | 409 } |
| 407 } | 410 } |
| 408 | 411 |
| 409 #endif // V8_TURBOFAN_BACKEND | 412 #endif // V8_TURBOFAN_BACKEND |
| OLD | NEW |