| 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/control-builders.h" | 7 #include "src/compiler/control-builders.h" |
| 8 #include "src/compiler/generic-node-inl.h" | 8 #include "src/compiler/generic-node-inl.h" |
| 9 #include "src/compiler/node-properties-inl.h" | 9 #include "src/compiler/node-properties-inl.h" |
| 10 #include "src/compiler/pipeline.h" | 10 #include "src/compiler/pipeline.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 using namespace v8::internal; | 24 using namespace v8::internal; |
| 25 using namespace v8::internal::compiler; | 25 using namespace v8::internal::compiler; |
| 26 | 26 |
| 27 template <typename ReturnType> | 27 template <typename ReturnType> |
| 28 class ChangesLoweringTester : public GraphBuilderTester<ReturnType> { | 28 class ChangesLoweringTester : public GraphBuilderTester<ReturnType> { |
| 29 public: | 29 public: |
| 30 explicit ChangesLoweringTester(MachineType p0 = kMachineLast) | 30 explicit ChangesLoweringTester(MachineType p0 = kMachineLast) |
| 31 : GraphBuilderTester<ReturnType>(p0), | 31 : GraphBuilderTester<ReturnType>(p0), |
| 32 typer(this->zone()), | 32 typer(this->zone()), |
| 33 source_positions(this->graph()), | |
| 34 jsgraph(this->graph(), this->common(), &typer), | 33 jsgraph(this->graph(), this->common(), &typer), |
| 35 lowering(&jsgraph, &source_positions), | 34 lowering(&jsgraph), |
| 36 function(Handle<JSFunction>::null()) {} | 35 function(Handle<JSFunction>::null()) {} |
| 37 | 36 |
| 38 Typer typer; | 37 Typer typer; |
| 39 SourcePositionTable source_positions; | |
| 40 JSGraph jsgraph; | 38 JSGraph jsgraph; |
| 41 SimplifiedLowering lowering; | 39 SimplifiedLowering lowering; |
| 42 Handle<JSFunction> function; | 40 Handle<JSFunction> function; |
| 43 | 41 |
| 44 Node* start() { return this->graph()->start(); } | 42 Node* start() { return this->graph()->start(); } |
| 45 | 43 |
| 46 template <typename T> | 44 template <typename T> |
| 47 T* CallWithPotentialGC() { | 45 T* CallWithPotentialGC() { |
| 48 // TODO(titzer): we need to wrap the code in a JSFunction and call it via | 46 // 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, | 47 // Execution::Call() so that the GC knows about the frame, can walk it, |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 386 |
| 389 if (TODO_FLOAT64_TO_TAGGED && Pipeline::SupportedTarget()) { | 387 if (TODO_FLOAT64_TO_TAGGED && Pipeline::SupportedTarget()) { |
| 390 FOR_FLOAT64_INPUTS(i) { | 388 FOR_FLOAT64_INPUTS(i) { |
| 391 input = *i; | 389 input = *i; |
| 392 SimulateFullSpace(CcTest::heap()->new_space()); | 390 SimulateFullSpace(CcTest::heap()->new_space()); |
| 393 Object* result = t.CallWithPotentialGC<Object>(); | 391 Object* result = t.CallWithPotentialGC<Object>(); |
| 394 t.CheckNumber(input, result); | 392 t.CheckNumber(input, result); |
| 395 } | 393 } |
| 396 } | 394 } |
| 397 } | 395 } |
| OLD | NEW |