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 // TODO(mvstanton): The call to ClearOptimizedCodeMap can be removed | |
121 // when we stop storing literals in the optimized code map (upcoming CL). | |
122 function->shared()->ClearOptimizedCodeMap(); | |
123 function->shared()->set_feedback_metadata( | 120 function->shared()->set_feedback_metadata( |
124 *feedback_metadata_.ToHandleChecked()); | 121 *feedback_metadata_.ToHandleChecked()); |
125 JSFunction::EnsureLiterals(function); | 122 JSFunction::EnsureLiterals(function); |
126 } | 123 } |
127 return function; | 124 return function; |
128 } | 125 } |
129 | 126 |
130 DISALLOW_COPY_AND_ASSIGN(InterpreterTester); | 127 DISALLOW_COPY_AND_ASSIGN(InterpreterTester); |
131 }; | 128 }; |
132 | 129 |
133 } // namespace interpreter | 130 } // namespace interpreter |
134 } // namespace internal | 131 } // namespace internal |
135 } // namespace v8 | 132 } // namespace v8 |
OLD | NEW |