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

Side by Side Diff: runtime/vm/snapshot.cc

Issue 1634863002: Introduce CodeSourceMap object to hold pc -> token position mappings (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/symbols.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/snapshot.h" 5 #include "vm/snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 ASSERT(kind_ == Snapshot::kFull); 779 ASSERT(kind_ == Snapshot::kFull);
780 ASSERT_NO_SAFEPOINT_SCOPE(); 780 ASSERT_NO_SAFEPOINT_SCOPE();
781 RawPcDescriptors* obj = reinterpret_cast<RawPcDescriptors*>( 781 RawPcDescriptors* obj = reinterpret_cast<RawPcDescriptors*>(
782 AllocateUninitialized(kPcDescriptorsCid, 782 AllocateUninitialized(kPcDescriptorsCid,
783 PcDescriptors::InstanceSize(len))); 783 PcDescriptors::InstanceSize(len)));
784 obj->ptr()->length_ = len; 784 obj->ptr()->length_ = len;
785 return obj; 785 return obj;
786 } 786 }
787 787
788 788
789 RawCodeSourceMap* SnapshotReader::NewCodeSourceMap(intptr_t len) {
790 ASSERT(kind_ == Snapshot::kFull);
791 ASSERT_NO_SAFEPOINT_SCOPE();
792 RawCodeSourceMap* obj = reinterpret_cast<RawCodeSourceMap*>(
793 AllocateUninitialized(kCodeSourceMapCid,
794 CodeSourceMap::InstanceSize(len)));
795 obj->ptr()->length_ = len;
796 return obj;
797 }
798
799
789 RawStackmap* SnapshotReader::NewStackmap(intptr_t len) { 800 RawStackmap* SnapshotReader::NewStackmap(intptr_t len) {
790 ASSERT(kind_ == Snapshot::kFull); 801 ASSERT(kind_ == Snapshot::kFull);
791 ASSERT_NO_SAFEPOINT_SCOPE(); 802 ASSERT_NO_SAFEPOINT_SCOPE();
792 RawStackmap* obj = reinterpret_cast<RawStackmap*>( 803 RawStackmap* obj = reinterpret_cast<RawStackmap*>(
793 AllocateUninitialized(kStackmapCid, Stackmap::InstanceSize(len))); 804 AllocateUninitialized(kStackmapCid, Stackmap::InstanceSize(len)));
794 obj->ptr()->length_ = len; 805 obj->ptr()->length_ = len;
795 return obj; 806 return obj;
796 } 807 }
797 808
798 809
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after
2590 if (setjmp(*jump.Set()) == 0) { 2601 if (setjmp(*jump.Set()) == 0) {
2591 NoSafepointScope no_safepoint; 2602 NoSafepointScope no_safepoint;
2592 WriteObject(obj.raw()); 2603 WriteObject(obj.raw());
2593 } else { 2604 } else {
2594 ThrowException(exception_type(), exception_msg()); 2605 ThrowException(exception_type(), exception_msg());
2595 } 2606 }
2596 } 2607 }
2597 2608
2598 2609
2599 } // namespace dart 2610 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698