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

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

Issue 1854713002: Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 8 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/full-codegen/x87/full-codegen-x87.cc ('k') | src/interpreter/bytecode-generator.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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 759
760 void Heap::PreprocessStackTraces() { 760 void Heap::PreprocessStackTraces() {
761 WeakFixedArray::Iterator iterator(weak_stack_trace_list()); 761 WeakFixedArray::Iterator iterator(weak_stack_trace_list());
762 FixedArray* elements; 762 FixedArray* elements;
763 while ((elements = iterator.Next<FixedArray>())) { 763 while ((elements = iterator.Next<FixedArray>())) {
764 for (int j = 1; j < elements->length(); j += 4) { 764 for (int j = 1; j < elements->length(); j += 4) {
765 Object* maybe_code = elements->get(j + 2); 765 Object* maybe_code = elements->get(j + 2);
766 // If GC happens while adding a stack trace to the weak fixed array, 766 // If GC happens while adding a stack trace to the weak fixed array,
767 // which has been copied into a larger backing store, we may run into 767 // which has been copied into a larger backing store, we may run into
768 // a stack trace that has already been preprocessed. Guard against this. 768 // a stack trace that has already been preprocessed. Guard against this.
769 if (!maybe_code->IsCode()) break; 769 if (!maybe_code->IsAbstractCode()) break;
770 Code* code = Code::cast(maybe_code); 770 AbstractCode* abstract_code = AbstractCode::cast(maybe_code);
771 int offset = Smi::cast(elements->get(j + 3))->value(); 771 int offset = Smi::cast(elements->get(j + 3))->value();
772 int pos = code->SourcePosition(offset); 772 int pos = abstract_code->SourcePosition(offset);
773 elements->set(j + 2, Smi::FromInt(pos)); 773 elements->set(j + 2, Smi::FromInt(pos));
774 } 774 }
775 } 775 }
776 // We must not compact the weak fixed list here, as we may be in the middle 776 // We must not compact the weak fixed list here, as we may be in the middle
777 // of writing to it, when the GC triggered. Instead, we reset the root value. 777 // of writing to it, when the GC triggered. Instead, we reset the root value.
778 set_weak_stack_trace_list(Smi::FromInt(0)); 778 set_weak_stack_trace_list(Smi::FromInt(0));
779 } 779 }
780 780
781 781
782 class GCCallbacksScope { 782 class GCCallbacksScope {
(...skipping 5651 matching lines...) Expand 10 before | Expand all | Expand 10 after
6434 } 6434 }
6435 6435
6436 6436
6437 // static 6437 // static
6438 int Heap::GetStaticVisitorIdForMap(Map* map) { 6438 int Heap::GetStaticVisitorIdForMap(Map* map) {
6439 return StaticVisitorBase::GetVisitorId(map); 6439 return StaticVisitorBase::GetVisitorId(map);
6440 } 6440 }
6441 6441
6442 } // namespace internal 6442 } // namespace internal
6443 } // namespace v8 6443 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698