OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 | 5 |
6 #include "src/v8.h" | 6 #include "src/v8.h" |
7 | 7 |
8 #include "src/liveedit.h" | 8 #include "src/liveedit.h" |
9 | 9 |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 } | 1181 } |
1182 shared_info->DisableOptimization(kLiveEdit); | 1182 shared_info->DisableOptimization(kLiveEdit); |
1183 // Update the type feedback vector, if needed. | 1183 // Update the type feedback vector, if needed. |
1184 MaybeHandle<TypeFeedbackVector> feedback_vector = | 1184 MaybeHandle<TypeFeedbackVector> feedback_vector = |
1185 compile_info_wrapper.GetFeedbackVector(); | 1185 compile_info_wrapper.GetFeedbackVector(); |
1186 if (!feedback_vector.is_null()) { | 1186 if (!feedback_vector.is_null()) { |
1187 shared_info->set_feedback_vector(*feedback_vector.ToHandleChecked()); | 1187 shared_info->set_feedback_vector(*feedback_vector.ToHandleChecked()); |
1188 } | 1188 } |
1189 } | 1189 } |
1190 | 1190 |
1191 if (shared_info->debug_info()->IsDebugInfo()) { | |
1192 Handle<DebugInfo> debug_info(DebugInfo::cast(shared_info->debug_info())); | |
1193 Handle<Code> new_original_code = | |
1194 isolate->factory()->CopyCode(compile_info_wrapper.GetFunctionCode()); | |
1195 debug_info->set_original_code(*new_original_code); | |
1196 } | |
1197 | |
1198 int start_position = compile_info_wrapper.GetStartPosition(); | 1191 int start_position = compile_info_wrapper.GetStartPosition(); |
1199 int end_position = compile_info_wrapper.GetEndPosition(); | 1192 int end_position = compile_info_wrapper.GetEndPosition(); |
1200 shared_info->set_start_position(start_position); | 1193 shared_info->set_start_position(start_position); |
1201 shared_info->set_end_position(end_position); | 1194 shared_info->set_end_position(end_position); |
1202 | 1195 |
1203 LiteralFixer::PatchLiterals(&compile_info_wrapper, shared_info, isolate); | 1196 LiteralFixer::PatchLiterals(&compile_info_wrapper, shared_info, isolate); |
1204 | 1197 |
1205 shared_info->set_construct_stub( | 1198 shared_info->set_construct_stub( |
1206 isolate->builtins()->builtin(Builtins::kJSConstructStubGeneric)); | 1199 isolate->builtins()->builtin(Builtins::kJSConstructStubGeneric)); |
1207 | 1200 |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2059 isolate_->active_function_info_listener()->FunctionCode(code); | 2052 isolate_->active_function_info_listener()->FunctionCode(code); |
2060 } | 2053 } |
2061 | 2054 |
2062 | 2055 |
2063 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { | 2056 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { |
2064 return isolate->active_function_info_listener() != NULL; | 2057 return isolate->active_function_info_listener() != NULL; |
2065 } | 2058 } |
2066 | 2059 |
2067 } // namespace internal | 2060 } // namespace internal |
2068 } // namespace v8 | 2061 } // namespace v8 |
OLD | NEW |