| 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 javascript(this->zone()), | 34 jsgraph(this->graph(), this->common(), &typer), |
| 35 jsgraph(this->graph(), this->common(), &javascript, &typer, | |
| 36 this->machine()), | |
| 37 function(Handle<JSFunction>::null()) {} | 35 function(Handle<JSFunction>::null()) {} |
| 38 | 36 |
| 39 Typer typer; | 37 Typer typer; |
| 40 JSOperatorBuilder javascript; | |
| 41 JSGraph jsgraph; | 38 JSGraph jsgraph; |
| 42 Handle<JSFunction> function; | 39 Handle<JSFunction> function; |
| 43 | 40 |
| 44 Node* start() { return this->graph()->start(); } | 41 Node* start() { return this->graph()->start(); } |
| 45 | 42 |
| 46 template <typename T> | 43 template <typename T> |
| 47 T* CallWithPotentialGC() { | 44 T* CallWithPotentialGC() { |
| 48 // TODO(titzer): we need to wrap the code in a JSFunction and call it via | 45 // TODO(titzer): we need to wrap the code in a JSFunction and call it via |
| 49 // Execution::Call() so that the GC knows about the frame, can walk it, | 46 // Execution::Call() so that the GC knows about the frame, can walk it, |
| 50 // relocate the code object if necessary, etc. | 47 // relocate the code object if necessary, etc. |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 | 400 |
| 404 input = *i; | 401 input = *i; |
| 405 Object* result = t.CallWithPotentialGC<Object>(); | 402 Object* result = t.CallWithPotentialGC<Object>(); |
| 406 t.CheckNumber(input, result); | 403 t.CheckNumber(input, result); |
| 407 } | 404 } |
| 408 } | 405 } |
| 409 } | 406 } |
| 410 } | 407 } |
| 411 | 408 |
| 412 #endif // V8_TURBOFAN_BACKEND | 409 #endif // V8_TURBOFAN_BACKEND |
| OLD | NEW |