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

Side by Side Diff: src/debug/debug.cc

Issue 1668103002: Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 4 years, 10 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/crankshaft/typing.cc ('k') | src/debug/liveedit.h » ('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 #include "src/debug/debug.h" 5 #include "src/debug/debug.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) { 1150 bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) {
1151 DCHECK(shared->is_compiled()); 1151 DCHECK(shared->is_compiled());
1152 1152
1153 if (isolate_->concurrent_recompilation_enabled()) { 1153 if (isolate_->concurrent_recompilation_enabled()) {
1154 isolate_->optimizing_compile_dispatcher()->Flush(); 1154 isolate_->optimizing_compile_dispatcher()->Flush();
1155 } 1155 }
1156 1156
1157 List<Handle<JSFunction> > functions; 1157 List<Handle<JSFunction> > functions;
1158 List<Handle<JSGeneratorObject> > suspended_generators; 1158 List<Handle<JSGeneratorObject> > suspended_generators;
1159 1159
1160 // Flush all optimized code maps. Note that the below heap iteration does not 1160 // Flush all optimized code. Note that the below heap iteration does not
1161 // cover this, because the given function might have been inlined into code 1161 // cover this, because the given function might have been inlined into code
1162 // for which no JSFunction exists. 1162 // for which no JSFunction exists.
1163 { 1163 {
1164 SharedFunctionInfo::Iterator iterator(isolate_); 1164 SharedFunctionInfo::Iterator iterator(isolate_);
1165 while (SharedFunctionInfo* shared = iterator.Next()) { 1165 while (SharedFunctionInfo* shared = iterator.Next()) {
1166 if (!shared->OptimizedCodeMapIsCleared()) { 1166 shared->ClearCodeFromOptimizedCodeMap();
1167 shared->ClearOptimizedCodeMap();
1168 }
1169 } 1167 }
1170 } 1168 }
1171 1169
1172 // Make sure we abort incremental marking. 1170 // Make sure we abort incremental marking.
1173 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask, 1171 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask,
1174 "prepare for break points"); 1172 "prepare for break points");
1175 1173
1176 { 1174 {
1177 HeapIterator iterator(isolate_->heap()); 1175 HeapIterator iterator(isolate_->heap());
1178 HeapObject* obj; 1176 HeapObject* obj;
(...skipping 21 matching lines...) Expand all
1200 } 1198 }
1201 } 1199 }
1202 1200
1203 if (!shared->HasDebugCode()) { 1201 if (!shared->HasDebugCode()) {
1204 DCHECK(functions.length() > 0); 1202 DCHECK(functions.length() > 0);
1205 if (!Compiler::CompileDebugCode(functions.first())) return false; 1203 if (!Compiler::CompileDebugCode(functions.first())) return false;
1206 } 1204 }
1207 1205
1208 for (Handle<JSFunction> const function : functions) { 1206 for (Handle<JSFunction> const function : functions) {
1209 function->ReplaceCode(shared->code()); 1207 function->ReplaceCode(shared->code());
1208 JSFunction::EnsureLiterals(function);
1210 } 1209 }
1211 1210
1212 for (Handle<JSGeneratorObject> const generator_obj : suspended_generators) { 1211 for (Handle<JSGeneratorObject> const generator_obj : suspended_generators) {
1213 int index = generator_obj->continuation(); 1212 int index = generator_obj->continuation();
1214 int pc_offset = ComputePcOffsetFromContinuationIndex(shared->code(), index); 1213 int pc_offset = ComputePcOffsetFromContinuationIndex(shared->code(), index);
1215 generator_obj->set_continuation(pc_offset); 1214 generator_obj->set_continuation(pc_offset);
1216 } 1215 }
1217 1216
1218 // Update PCs on the stack to point to recompiled code. 1217 // Update PCs on the stack to point to recompiled code.
1219 RedirectActiveFunctions redirect_visitor(*shared); 1218 RedirectActiveFunctions redirect_visitor(*shared);
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
2461 } 2460 }
2462 2461
2463 2462
2464 void LockingCommandMessageQueue::Clear() { 2463 void LockingCommandMessageQueue::Clear() {
2465 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2464 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2466 queue_.Clear(); 2465 queue_.Clear();
2467 } 2466 }
2468 2467
2469 } // namespace internal 2468 } // namespace internal
2470 } // namespace v8 2469 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/typing.cc ('k') | src/debug/liveedit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698