Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/liveedit.cc

Issue 1207583002: Revert "Keep a canonical list of shared function infos." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 DeoptimizeDependentFunctions(*shared_info); 1213 DeoptimizeDependentFunctions(*shared_info);
1214 shared_info_array->GetIsolate()->compilation_cache()->Remove(shared_info); 1214 shared_info_array->GetIsolate()->compilation_cache()->Remove(shared_info);
1215 } 1215 }
1216 1216
1217 1217
1218 void LiveEdit::SetFunctionScript(Handle<JSValue> function_wrapper, 1218 void LiveEdit::SetFunctionScript(Handle<JSValue> function_wrapper,
1219 Handle<Object> script_handle) { 1219 Handle<Object> script_handle) {
1220 Handle<SharedFunctionInfo> shared_info = 1220 Handle<SharedFunctionInfo> shared_info =
1221 UnwrapSharedFunctionInfoFromJSValue(function_wrapper); 1221 UnwrapSharedFunctionInfoFromJSValue(function_wrapper);
1222 CHECK(script_handle->IsScript() || script_handle->IsUndefined()); 1222 CHECK(script_handle->IsScript() || script_handle->IsUndefined());
1223 SharedFunctionInfo::SetScript(shared_info, script_handle); 1223 shared_info->set_script(*script_handle);
1224 shared_info->DisableOptimization(kLiveEdit); 1224 shared_info->DisableOptimization(kLiveEdit);
1225 1225
1226 function_wrapper->GetIsolate()->compilation_cache()->Remove(shared_info); 1226 function_wrapper->GetIsolate()->compilation_cache()->Remove(shared_info);
1227 } 1227 }
1228 1228
1229 1229
1230 // For a script text change (defined as position_change_array), translates 1230 // For a script text change (defined as position_change_array), translates
1231 // position in unchanged text to position in changed text. 1231 // position in unchanged text to position in changed text.
1232 // Text change is a set of non-overlapping regions in text, that have changed 1232 // Text change is a set of non-overlapping regions in text, that have changed
1233 // their contents and length. It is specified as array of groups of 3 numbers: 1233 // their contents and length. It is specified as array of groups of 3 numbers:
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
2055 isolate_->active_function_info_listener()->FunctionCode(code); 2055 isolate_->active_function_info_listener()->FunctionCode(code);
2056 } 2056 }
2057 2057
2058 2058
2059 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { 2059 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) {
2060 return isolate->active_function_info_listener() != NULL; 2060 return isolate->active_function_info_listener() != NULL;
2061 } 2061 }
2062 2062
2063 } // namespace internal 2063 } // namespace internal
2064 } // namespace v8 2064 } // namespace v8
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698