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

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

Issue 1618343002: [interpreter, debugger] abstraction for source position calculation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove bogus assertion 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/frames.cc ('k') | src/isolate.cc » ('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/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/scopeinfo.h" 9 #include "src/ast/scopeinfo.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 FixedArray* elements; 765 FixedArray* elements;
766 while ((elements = iterator.Next<FixedArray>())) { 766 while ((elements = iterator.Next<FixedArray>())) {
767 for (int j = 1; j < elements->length(); j += 4) { 767 for (int j = 1; j < elements->length(); j += 4) {
768 Object* maybe_code = elements->get(j + 2); 768 Object* maybe_code = elements->get(j + 2);
769 // If GC happens while adding a stack trace to the weak fixed array, 769 // If GC happens while adding a stack trace to the weak fixed array,
770 // which has been copied into a larger backing store, we may run into 770 // which has been copied into a larger backing store, we may run into
771 // a stack trace that has already been preprocessed. Guard against this. 771 // a stack trace that has already been preprocessed. Guard against this.
772 if (!maybe_code->IsCode()) break; 772 if (!maybe_code->IsCode()) break;
773 Code* code = Code::cast(maybe_code); 773 Code* code = Code::cast(maybe_code);
774 int offset = Smi::cast(elements->get(j + 3))->value(); 774 int offset = Smi::cast(elements->get(j + 3))->value();
775 Address pc = code->address() + offset; 775 int pos = code->SourcePosition(offset);
776 int pos = code->SourcePosition(pc);
777 elements->set(j + 2, Smi::FromInt(pos)); 776 elements->set(j + 2, Smi::FromInt(pos));
778 } 777 }
779 } 778 }
780 // We must not compact the weak fixed list here, as we may be in the middle 779 // We must not compact the weak fixed list here, as we may be in the middle
781 // of writing to it, when the GC triggered. Instead, we reset the root value. 780 // of writing to it, when the GC triggered. Instead, we reset the root value.
782 set_weak_stack_trace_list(Smi::FromInt(0)); 781 set_weak_stack_trace_list(Smi::FromInt(0));
783 } 782 }
784 783
785 784
786 class GCCallbacksScope { 785 class GCCallbacksScope {
(...skipping 5435 matching lines...) Expand 10 before | Expand all | Expand 10 after
6222 } 6221 }
6223 6222
6224 6223
6225 // static 6224 // static
6226 int Heap::GetStaticVisitorIdForMap(Map* map) { 6225 int Heap::GetStaticVisitorIdForMap(Map* map) {
6227 return StaticVisitorBase::GetVisitorId(map); 6226 return StaticVisitorBase::GetVisitorId(map);
6228 } 6227 }
6229 6228
6230 } // namespace internal 6229 } // namespace internal
6231 } // namespace v8 6230 } // namespace v8
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698