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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 function = Handle<JSFunction>::cast(v8::Utils::OpenHandle( | 141 function = Handle<JSFunction>::cast(v8::Utils::OpenHandle( |
142 *v8::Local<v8::Function>::Cast(CompileRun(source.c_str())))); | 142 *v8::Local<v8::Function>::Cast(CompileRun(source.c_str())))); |
143 function->ReplaceCode( | 143 function->ReplaceCode( |
144 *isolate_->builtins()->InterpreterEntryTrampoline()); | 144 *isolate_->builtins()->InterpreterEntryTrampoline()); |
145 } | 145 } |
146 | 146 |
147 if (!bytecode_.is_null()) { | 147 if (!bytecode_.is_null()) { |
148 function->shared()->set_function_data(*bytecode_.ToHandleChecked()); | 148 function->shared()->set_function_data(*bytecode_.ToHandleChecked()); |
149 } | 149 } |
150 if (!feedback_vector_.is_null()) { | 150 if (!feedback_vector_.is_null()) { |
151 function->shared()->set_feedback_vector( | 151 function->literals()->set_feedback_vector( |
152 *feedback_vector_.ToHandleChecked()); | 152 *feedback_vector_.ToHandleChecked()); |
153 } | 153 } |
154 return function; | 154 return function; |
155 } | 155 } |
156 | 156 |
157 DISALLOW_COPY_AND_ASSIGN(InterpreterTester); | 157 DISALLOW_COPY_AND_ASSIGN(InterpreterTester); |
158 }; | 158 }; |
159 | 159 |
160 | 160 |
161 TEST(InterpreterReturn) { | 161 TEST(InterpreterReturn) { |
(...skipping 3514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3676 auto callable = tester.GetCallable<>(); | 3676 auto callable = tester.GetCallable<>(); |
3677 | 3677 |
3678 Handle<i::Object> return_value = callable().ToHandleChecked(); | 3678 Handle<i::Object> return_value = callable().ToHandleChecked(); |
3679 CHECK(return_value->SameValue(*eval_func_decl[i].second)); | 3679 CHECK(return_value->SameValue(*eval_func_decl[i].second)); |
3680 } | 3680 } |
3681 } | 3681 } |
3682 | 3682 |
3683 } // namespace interpreter | 3683 } // namespace interpreter |
3684 } // namespace internal | 3684 } // namespace internal |
3685 } // namespace v8 | 3685 } // namespace v8 |
OLD | NEW |