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

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

Issue 1563213002: Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. 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
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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) { 1105 bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) {
1106 DCHECK(shared->is_compiled()); 1106 DCHECK(shared->is_compiled());
1107 1107
1108 if (isolate_->concurrent_recompilation_enabled()) { 1108 if (isolate_->concurrent_recompilation_enabled()) {
1109 isolate_->optimizing_compile_dispatcher()->Flush(); 1109 isolate_->optimizing_compile_dispatcher()->Flush();
1110 } 1110 }
1111 1111
1112 List<Handle<JSFunction> > functions; 1112 List<Handle<JSFunction> > functions;
1113 List<Handle<JSGeneratorObject> > suspended_generators; 1113 List<Handle<JSGeneratorObject> > suspended_generators;
1114 1114
1115 // Flush all optimized code maps. Note that the below heap iteration does not 1115 // Flush all optimized code. Note that the below heap iteration does not
1116 // cover this, because the given function might have been inlined into code 1116 // cover this, because the given function might have been inlined into code
1117 // for which no JSFunction exists. 1117 // for which no JSFunction exists.
1118 { 1118 {
1119 SharedFunctionInfo::Iterator iterator(isolate_); 1119 SharedFunctionInfo::Iterator iterator(isolate_);
1120 while (SharedFunctionInfo* shared = iterator.Next()) { 1120 while (SharedFunctionInfo* shared = iterator.Next()) {
1121 if (!shared->OptimizedCodeMapIsCleared()) { 1121 shared->ClearCodeFromOptimizedCodeMap();
1122 shared->ClearOptimizedCodeMap();
1123 }
1124 } 1122 }
1125 } 1123 }
1126 1124
1127 // Make sure we abort incremental marking. 1125 // Make sure we abort incremental marking.
1128 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask, 1126 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask,
1129 "prepare for break points"); 1127 "prepare for break points");
1130 1128
1131 { 1129 {
1132 HeapIterator iterator(isolate_->heap()); 1130 HeapIterator iterator(isolate_->heap());
1133 HeapObject* obj; 1131 HeapObject* obj;
(...skipping 21 matching lines...) Expand all
1155 } 1153 }
1156 } 1154 }
1157 1155
1158 if (!shared->HasDebugCode()) { 1156 if (!shared->HasDebugCode()) {
1159 DCHECK(functions.length() > 0); 1157 DCHECK(functions.length() > 0);
1160 if (!Compiler::CompileDebugCode(functions.first())) return false; 1158 if (!Compiler::CompileDebugCode(functions.first())) return false;
1161 } 1159 }
1162 1160
1163 for (Handle<JSFunction> const function : functions) { 1161 for (Handle<JSFunction> const function : functions) {
1164 function->ReplaceCode(shared->code()); 1162 function->ReplaceCode(shared->code());
1163 JSFunction::EnsureLiterals(function);
1165 } 1164 }
1166 1165
1167 for (Handle<JSGeneratorObject> const generator_obj : suspended_generators) { 1166 for (Handle<JSGeneratorObject> const generator_obj : suspended_generators) {
1168 int index = generator_obj->continuation(); 1167 int index = generator_obj->continuation();
1169 int pc_offset = ComputePcOffsetFromContinuationIndex(shared->code(), index); 1168 int pc_offset = ComputePcOffsetFromContinuationIndex(shared->code(), index);
1170 generator_obj->set_continuation(pc_offset); 1169 generator_obj->set_continuation(pc_offset);
1171 } 1170 }
1172 1171
1173 // Update PCs on the stack to point to recompiled code. 1172 // Update PCs on the stack to point to recompiled code.
1174 RedirectActiveFunctions redirect_visitor(*shared); 1173 RedirectActiveFunctions redirect_visitor(*shared);
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
2404 } 2403 }
2405 2404
2406 2405
2407 void LockingCommandMessageQueue::Clear() { 2406 void LockingCommandMessageQueue::Clear() {
2408 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2407 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2409 queue_.Clear(); 2408 queue_.Clear();
2410 } 2409 }
2411 2410
2412 } // namespace internal 2411 } // namespace internal
2413 } // namespace v8 2412 } // namespace v8
OLDNEW
« src/crankshaft/hydrogen.cc ('K') | « src/crankshaft/typing.cc ('k') | src/debug/liveedit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698