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/api.h" | 7 #include "src/api.h" |
8 #include "src/execution.h" | 8 #include "src/execution.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/interpreter/bytecode-array-builder.h" | 10 #include "src/interpreter/bytecode-array-builder.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 function = Handle<JSFunction>::cast(v8::Utils::OpenHandle( | 110 function = Handle<JSFunction>::cast(v8::Utils::OpenHandle( |
111 *v8::Local<v8::Function>::Cast(CompileRun(source.c_str())))); | 111 *v8::Local<v8::Function>::Cast(CompileRun(source.c_str())))); |
112 function->ReplaceCode( | 112 function->ReplaceCode( |
113 *isolate_->builtins()->InterpreterEntryTrampoline()); | 113 *isolate_->builtins()->InterpreterEntryTrampoline()); |
114 } | 114 } |
115 | 115 |
116 if (!bytecode_.is_null()) { | 116 if (!bytecode_.is_null()) { |
117 function->shared()->set_function_data(*bytecode_.ToHandleChecked()); | 117 function->shared()->set_function_data(*bytecode_.ToHandleChecked()); |
118 } | 118 } |
119 if (!feedback_metadata_.is_null()) { | 119 if (!feedback_metadata_.is_null()) { |
| 120 function->set_feedback_vector_cell(isolate_->heap()->undefined_cell()); |
120 function->shared()->set_feedback_metadata( | 121 function->shared()->set_feedback_metadata( |
121 *feedback_metadata_.ToHandleChecked()); | 122 *feedback_metadata_.ToHandleChecked()); |
122 JSFunction::EnsureLiterals(function); | 123 JSFunction::EnsureLiterals(function); |
123 } | 124 } |
124 return function; | 125 return function; |
125 } | 126 } |
126 | 127 |
127 DISALLOW_COPY_AND_ASSIGN(InterpreterTester); | 128 DISALLOW_COPY_AND_ASSIGN(InterpreterTester); |
128 }; | 129 }; |
129 | 130 |
130 } // namespace interpreter | 131 } // namespace interpreter |
131 } // namespace internal | 132 } // namespace internal |
132 } // namespace v8 | 133 } // namespace v8 |
OLD | NEW |