| 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->literals()->set_feedback_vector( | 151 function->shared()->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 3626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3788 auto callable = tester.GetCallable<>(); | 3788 auto callable = tester.GetCallable<>(); |
| 3789 | 3789 |
| 3790 Handle<i::Object> return_value = callable().ToHandleChecked(); | 3790 Handle<i::Object> return_value = callable().ToHandleChecked(); |
| 3791 CHECK(return_value->SameValue(*with_stmt[i].second)); | 3791 CHECK(return_value->SameValue(*with_stmt[i].second)); |
| 3792 } | 3792 } |
| 3793 } | 3793 } |
| 3794 | 3794 |
| 3795 } // namespace interpreter | 3795 } // namespace interpreter |
| 3796 } // namespace internal | 3796 } // namespace internal |
| 3797 } // namespace v8 | 3797 } // namespace v8 |
| OLD | NEW |