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

Side by Side Diff: runtime/vm/raw_object.h

Issue 2852943003: Move the Kernel string offsets into the VM's heap. (Closed)
Patch Set: Incorporate review comments. Created 3 years, 7 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/object.cc ('k') | no next file » | 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 #ifndef RUNTIME_VM_RAW_OBJECT_H_ 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_
6 #define RUNTIME_VM_RAW_OBJECT_H_ 6 #define RUNTIME_VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 private: 1019 private:
1020 RAW_HEAP_OBJECT_IMPLEMENTATION(Script); 1020 RAW_HEAP_OBJECT_IMPLEMENTATION(Script);
1021 1021
1022 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); } 1022 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); }
1023 RawString* url_; 1023 RawString* url_;
1024 RawString* resolved_url_; 1024 RawString* resolved_url_;
1025 RawArray* compile_time_constants_; 1025 RawArray* compile_time_constants_;
1026 RawArray* line_starts_; 1026 RawArray* line_starts_;
1027 RawArray* debug_positions_; 1027 RawArray* debug_positions_;
1028 RawArray* yield_positions_; 1028 RawArray* yield_positions_;
1029 RawTypedData* kernel_strings_; 1029 RawTypedData* kernel_string_offsets_;
1030 RawTypedData* kernel_string_data_;
1030 RawTokenStream* tokens_; 1031 RawTokenStream* tokens_;
1031 RawString* source_; 1032 RawString* source_;
1032 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->source_); } 1033 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->source_); }
1033 RawObject** to_snapshot(Snapshot::Kind kind) { 1034 RawObject** to_snapshot(Snapshot::Kind kind) {
1034 switch (kind) { 1035 switch (kind) {
1035 case Snapshot::kAppAOT: 1036 case Snapshot::kAppAOT:
1036 return reinterpret_cast<RawObject**>(&ptr()->url_); 1037 return reinterpret_cast<RawObject**>(&ptr()->url_);
1037 case Snapshot::kCore: 1038 case Snapshot::kCore:
1038 case Snapshot::kAppJIT: 1039 case Snapshot::kAppJIT:
1039 case Snapshot::kScript: 1040 case Snapshot::kScript:
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
2447 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2448 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2448 kTypedDataInt8ArrayViewCid + 15); 2449 kTypedDataInt8ArrayViewCid + 15);
2449 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2450 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2450 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2451 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2451 return (kNullCid - kTypedDataInt8ArrayCid); 2452 return (kNullCid - kTypedDataInt8ArrayCid);
2452 } 2453 }
2453 2454
2454 } // namespace dart 2455 } // namespace dart
2455 2456
2456 #endif // RUNTIME_VM_RAW_OBJECT_H_ 2457 #endif // RUNTIME_VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698