OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/execution.h" | 7 #include "src/execution.h" |
8 #include "src/handles.h" | 8 #include "src/handles.h" |
9 #include "src/interpreter/bytecode-array-builder.h" | 9 #include "src/interpreter/bytecode-array-builder.h" |
10 #include "src/interpreter/interpreter.h" | 10 #include "src/interpreter/interpreter.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 function = Handle<JSFunction>::cast(v8::Utils::OpenHandle( | 143 function = Handle<JSFunction>::cast(v8::Utils::OpenHandle( |
144 *v8::Local<v8::Function>::Cast(CompileRun(source.c_str())))); | 144 *v8::Local<v8::Function>::Cast(CompileRun(source.c_str())))); |
145 function->ReplaceCode( | 145 function->ReplaceCode( |
146 *isolate_->builtins()->InterpreterEntryTrampoline()); | 146 *isolate_->builtins()->InterpreterEntryTrampoline()); |
147 } | 147 } |
148 | 148 |
149 if (!bytecode_.is_null()) { | 149 if (!bytecode_.is_null()) { |
150 function->shared()->set_function_data(*bytecode_.ToHandleChecked()); | 150 function->shared()->set_function_data(*bytecode_.ToHandleChecked()); |
151 } | 151 } |
152 if (!feedback_vector_.is_null()) { | 152 if (!feedback_vector_.is_null()) { |
153 function->shared()->set_feedback_vector( | 153 function->literals()->set_feedback_vector( |
154 *feedback_vector_.ToHandleChecked()); | 154 *feedback_vector_.ToHandleChecked()); |
155 } | 155 } |
156 return function; | 156 return function; |
157 } | 157 } |
158 | 158 |
159 DISALLOW_COPY_AND_ASSIGN(InterpreterTester); | 159 DISALLOW_COPY_AND_ASSIGN(InterpreterTester); |
160 }; | 160 }; |
161 | 161 |
162 | 162 |
163 TEST(InterpreterReturn) { | 163 TEST(InterpreterReturn) { |
(...skipping 3381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3545 auto callable = tester.GetCallable<>(); | 3545 auto callable = tester.GetCallable<>(); |
3546 | 3546 |
3547 Handle<i::Object> return_value = callable().ToHandleChecked(); | 3547 Handle<i::Object> return_value = callable().ToHandleChecked(); |
3548 CHECK(return_value->SameValue(*eval_global[i].second)); | 3548 CHECK(return_value->SameValue(*eval_global[i].second)); |
3549 } | 3549 } |
3550 } | 3550 } |
3551 | 3551 |
3552 } // namespace interpreter | 3552 } // namespace interpreter |
3553 } // namespace internal | 3553 } // namespace internal |
3554 } // namespace v8 | 3554 } // namespace v8 |
OLD | NEW |