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

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

Issue 1906823002: Move of the type feedback vector to the closure. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 4 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/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 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 1306
1307 List<Handle<JSFunction> > functions; 1307 List<Handle<JSFunction> > functions;
1308 List<Handle<JSGeneratorObject> > suspended_generators; 1308 List<Handle<JSGeneratorObject> > suspended_generators;
1309 1309
1310 // Flush all optimized code maps. Note that the below heap iteration does not 1310 // Flush all optimized code maps. Note that the below heap iteration does not
1311 // cover this, because the given function might have been inlined into code 1311 // cover this, because the given function might have been inlined into code
1312 // for which no JSFunction exists. 1312 // for which no JSFunction exists.
1313 { 1313 {
1314 SharedFunctionInfo::Iterator iterator(isolate_); 1314 SharedFunctionInfo::Iterator iterator(isolate_);
1315 while (SharedFunctionInfo* shared = iterator.Next()) { 1315 while (SharedFunctionInfo* shared = iterator.Next()) {
1316 if (!shared->OptimizedCodeMapIsCleared()) { 1316 shared->ClearCodeFromOptimizedCodeMap();
1317 shared->ClearOptimizedCodeMap();
1318 }
1319 } 1317 }
1320 } 1318 }
1321 1319
1322 // Make sure we abort incremental marking. 1320 // Make sure we abort incremental marking.
1323 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask, 1321 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask,
1324 "prepare for break points"); 1322 "prepare for break points");
1325 1323
1326 bool is_interpreted = shared->HasBytecodeArray(); 1324 bool is_interpreted = shared->HasBytecodeArray();
1327 1325
1328 { 1326 {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 DCHECK(!is_interpreted || suspended_generators.length() == 0); 1359 DCHECK(!is_interpreted || suspended_generators.length() == 0);
1362 1360
1363 // We do not need to recompile to debug bytecode. 1361 // We do not need to recompile to debug bytecode.
1364 if (!is_interpreted && !shared->HasDebugCode()) { 1362 if (!is_interpreted && !shared->HasDebugCode()) {
1365 DCHECK(functions.length() > 0); 1363 DCHECK(functions.length() > 0);
1366 if (!Compiler::CompileDebugCode(functions.first())) return false; 1364 if (!Compiler::CompileDebugCode(functions.first())) return false;
1367 } 1365 }
1368 1366
1369 for (Handle<JSFunction> const function : functions) { 1367 for (Handle<JSFunction> const function : functions) {
1370 function->ReplaceCode(shared->code()); 1368 function->ReplaceCode(shared->code());
1369 JSFunction::EnsureLiterals(function);
1371 } 1370 }
1372 1371
1373 for (Handle<JSGeneratorObject> const generator_obj : suspended_generators) { 1372 for (Handle<JSGeneratorObject> const generator_obj : suspended_generators) {
1374 int index = generator_obj->continuation(); 1373 int index = generator_obj->continuation();
1375 int pc_offset = ComputePcOffsetFromContinuationIndex(shared->code(), index); 1374 int pc_offset = ComputePcOffsetFromContinuationIndex(shared->code(), index);
1376 generator_obj->set_continuation(pc_offset); 1375 generator_obj->set_continuation(pc_offset);
1377 } 1376 }
1378 1377
1379 // Update PCs on the stack to point to recompiled code. 1378 // Update PCs on the stack to point to recompiled code.
1380 RedirectActiveFunctions redirect_visitor(*shared); 1379 RedirectActiveFunctions redirect_visitor(*shared);
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
2586 } 2585 }
2587 2586
2588 2587
2589 void LockingCommandMessageQueue::Clear() { 2588 void LockingCommandMessageQueue::Clear() {
2590 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2589 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2591 queue_.Clear(); 2590 queue_.Clear();
2592 } 2591 }
2593 2592
2594 } // namespace internal 2593 } // namespace internal
2595 } // namespace v8 2594 } // 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