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

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

Issue 1642613002: Reland of Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: %SetCode failed to install literals in cache. Created 4 years, 11 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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) { 1141 bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) {
1142 DCHECK(shared->is_compiled()); 1142 DCHECK(shared->is_compiled());
1143 1143
1144 if (isolate_->concurrent_recompilation_enabled()) { 1144 if (isolate_->concurrent_recompilation_enabled()) {
1145 isolate_->optimizing_compile_dispatcher()->Flush(); 1145 isolate_->optimizing_compile_dispatcher()->Flush();
1146 } 1146 }
1147 1147
1148 List<Handle<JSFunction> > functions; 1148 List<Handle<JSFunction> > functions;
1149 List<Handle<JSGeneratorObject> > suspended_generators; 1149 List<Handle<JSGeneratorObject> > suspended_generators;
1150 1150
1151 // Flush all optimized code maps. Note that the below heap iteration does not 1151 // Flush all optimized code. Note that the below heap iteration does not
1152 // cover this, because the given function might have been inlined into code 1152 // cover this, because the given function might have been inlined into code
1153 // for which no JSFunction exists. 1153 // for which no JSFunction exists.
1154 { 1154 {
1155 SharedFunctionInfo::Iterator iterator(isolate_); 1155 SharedFunctionInfo::Iterator iterator(isolate_);
1156 while (SharedFunctionInfo* shared = iterator.Next()) { 1156 while (SharedFunctionInfo* shared = iterator.Next()) {
1157 if (!shared->OptimizedCodeMapIsCleared()) { 1157 shared->ClearCodeFromOptimizedCodeMap();
1158 shared->ClearOptimizedCodeMap();
1159 }
1160 } 1158 }
1161 } 1159 }
1162 1160
1163 // Make sure we abort incremental marking. 1161 // Make sure we abort incremental marking.
1164 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask, 1162 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask,
1165 "prepare for break points"); 1163 "prepare for break points");
1166 1164
1167 { 1165 {
1168 HeapIterator iterator(isolate_->heap()); 1166 HeapIterator iterator(isolate_->heap());
1169 HeapObject* obj; 1167 HeapObject* obj;
(...skipping 21 matching lines...) Expand all
1191 } 1189 }
1192 } 1190 }
1193 1191
1194 if (!shared->HasDebugCode()) { 1192 if (!shared->HasDebugCode()) {
1195 DCHECK(functions.length() > 0); 1193 DCHECK(functions.length() > 0);
1196 if (!Compiler::CompileDebugCode(functions.first())) return false; 1194 if (!Compiler::CompileDebugCode(functions.first())) return false;
1197 } 1195 }
1198 1196
1199 for (Handle<JSFunction> const function : functions) { 1197 for (Handle<JSFunction> const function : functions) {
1200 function->ReplaceCode(shared->code()); 1198 function->ReplaceCode(shared->code());
1199 JSFunction::EnsureLiterals(function);
1201 } 1200 }
1202 1201
1203 for (Handle<JSGeneratorObject> const generator_obj : suspended_generators) { 1202 for (Handle<JSGeneratorObject> const generator_obj : suspended_generators) {
1204 int index = generator_obj->continuation(); 1203 int index = generator_obj->continuation();
1205 int pc_offset = ComputePcOffsetFromContinuationIndex(shared->code(), index); 1204 int pc_offset = ComputePcOffsetFromContinuationIndex(shared->code(), index);
1206 generator_obj->set_continuation(pc_offset); 1205 generator_obj->set_continuation(pc_offset);
1207 } 1206 }
1208 1207
1209 // Update PCs on the stack to point to recompiled code. 1208 // Update PCs on the stack to point to recompiled code.
1210 RedirectActiveFunctions redirect_visitor(*shared); 1209 RedirectActiveFunctions redirect_visitor(*shared);
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
2448 } 2447 }
2449 2448
2450 2449
2451 void LockingCommandMessageQueue::Clear() { 2450 void LockingCommandMessageQueue::Clear() {
2452 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2451 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2453 queue_.Clear(); 2452 queue_.Clear();
2454 } 2453 }
2455 2454
2456 } // namespace internal 2455 } // namespace internal
2457 } // namespace v8 2456 } // 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