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 // TODO(jochen): Remove this after the setting is turned on globally. | 5 // TODO(jochen): Remove this after the setting is turned on globally. |
6 #define V8_IMMINENT_DEPRECATION_WARNINGS | 6 #define V8_IMMINENT_DEPRECATION_WARNINGS |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 if (expected >= Smi::kMaxValue) return; | 76 if (expected >= Smi::kMaxValue) return; |
77 Handle<Object> num = factory()->NewNumber(input); | 77 Handle<Object> num = factory()->NewNumber(input); |
78 Object* result = this->Call(*num); | 78 Object* result = this->Call(*num); |
79 CHECK(factory()->NewNumber(expected)->SameValue(result)); | 79 CHECK(factory()->NewNumber(expected)->SameValue(result)); |
80 } | 80 } |
81 | 81 |
82 template <typename T> | 82 template <typename T> |
83 T* CallWithPotentialGC() { | 83 T* CallWithPotentialGC() { |
84 // TODO(titzer): we wrap the code in a JSFunction here to reuse the | 84 // TODO(titzer): we wrap the code in a JSFunction here to reuse the |
85 // JSEntryStub; that could be done with a special prologue or other stub. | 85 // JSEntryStub; that could be done with a special prologue or other stub. |
86 Handle<JSFunction> fun = FunctionTester::ForMachineGraph(this->graph()); | 86 Handle<JSFunction> fun = FunctionTester::ForMachineGraph(this->graph(), 0); |
87 Handle<Object>* args = NULL; | 87 Handle<Object>* args = NULL; |
88 MaybeHandle<Object> result = Execution::Call( | 88 MaybeHandle<Object> result = Execution::Call( |
89 this->isolate(), fun, factory()->undefined_value(), 0, args); | 89 this->isolate(), fun, factory()->undefined_value(), 0, args); |
90 return T::cast(*result.ToHandleChecked()); | 90 return T::cast(*result.ToHandleChecked()); |
91 } | 91 } |
92 | 92 |
93 Factory* factory() { return this->isolate()->factory(); } | 93 Factory* factory() { return this->isolate()->factory(); } |
94 Heap* heap() { return this->isolate()->heap(); } | 94 Heap* heap() { return this->isolate()->heap(); } |
95 }; | 95 }; |
96 | 96 |
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1954 t.Return(use); | 1954 t.Return(use); |
1955 t.Lower(); | 1955 t.Lower(); |
1956 | 1956 |
1957 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); | 1957 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); |
1958 } | 1958 } |
1959 } | 1959 } |
1960 | 1960 |
1961 } // namespace compiler | 1961 } // namespace compiler |
1962 } // namespace internal | 1962 } // namespace internal |
1963 } // namespace v8 | 1963 } // namespace v8 |
OLD | NEW |