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

Side by Side Diff: src/debug.cc

Issue 758523004: Correctly find shared function info for debugging when compiling eagerly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « no previous file | test/mjsunit/regress/regress-3717.js » ('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/v8.h" 5 #include "src/v8.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 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2114 // compiled lazily without a context to not be compiled at all. Compilation 2114 // compiled lazily without a context to not be compiled at all. Compilation
2115 // will be triggered at points where we do not need a context. 2115 // will be triggered at points where we do not need a context.
2116 bool done = false; 2116 bool done = false;
2117 // The current candidate for the source position: 2117 // The current candidate for the source position:
2118 int target_start_position = RelocInfo::kNoPosition; 2118 int target_start_position = RelocInfo::kNoPosition;
2119 Handle<JSFunction> target_function; 2119 Handle<JSFunction> target_function;
2120 Handle<SharedFunctionInfo> target; 2120 Handle<SharedFunctionInfo> target;
2121 Heap* heap = isolate_->heap(); 2121 Heap* heap = isolate_->heap();
2122 while (!done) { 2122 while (!done) {
2123 { // Extra scope for iterator. 2123 { // Extra scope for iterator.
2124 HeapIterator iterator(heap); 2124 // If lazy compilation is off, we won't have duplicate shared function
2125 // infos that need to be filtered.
2126 HeapIterator iterator(heap, FLAG_lazy ? HeapIterator::kNoFiltering
2127 : HeapIterator::kFilterUnreachable);
2125 for (HeapObject* obj = iterator.next(); 2128 for (HeapObject* obj = iterator.next();
2126 obj != NULL; obj = iterator.next()) { 2129 obj != NULL; obj = iterator.next()) {
2127 bool found_next_candidate = false; 2130 bool found_next_candidate = false;
2128 Handle<JSFunction> function; 2131 Handle<JSFunction> function;
2129 Handle<SharedFunctionInfo> shared; 2132 Handle<SharedFunctionInfo> shared;
2130 if (obj->IsJSFunction()) { 2133 if (obj->IsJSFunction()) {
2131 function = Handle<JSFunction>(JSFunction::cast(obj)); 2134 function = Handle<JSFunction>(JSFunction::cast(obj));
2132 shared = Handle<SharedFunctionInfo>(function->shared()); 2135 shared = Handle<SharedFunctionInfo>(function->shared());
2133 DCHECK(shared->allows_lazy_compilation() || shared->is_compiled()); 2136 DCHECK(shared->allows_lazy_compilation() || shared->is_compiled());
2134 found_next_candidate = true; 2137 found_next_candidate = true;
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
3442 logger_->DebugEvent("Put", message.text()); 3445 logger_->DebugEvent("Put", message.text());
3443 } 3446 }
3444 3447
3445 3448
3446 void LockingCommandMessageQueue::Clear() { 3449 void LockingCommandMessageQueue::Clear() {
3447 base::LockGuard<base::Mutex> lock_guard(&mutex_); 3450 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3448 queue_.Clear(); 3451 queue_.Clear();
3449 } 3452 }
3450 3453
3451 } } // namespace v8::internal 3454 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-3717.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698