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 3690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3852 Handle<i::Object> return_value = callable().ToHandleChecked(); | 3852 Handle<i::Object> return_value = callable().ToHandleChecked(); |
3853 CHECK(return_value->SameValue(*do_expr[i].second)); | 3853 CHECK(return_value->SameValue(*do_expr[i].second)); |
3854 } | 3854 } |
3855 | 3855 |
3856 FLAG_harmony_do_expressions = old_flag; | 3856 FLAG_harmony_do_expressions = old_flag; |
3857 } | 3857 } |
3858 | 3858 |
3859 } // namespace interpreter | 3859 } // namespace interpreter |
3860 } // namespace internal | 3860 } // namespace internal |
3861 } // namespace v8 | 3861 } // namespace v8 |
OLD | NEW |