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

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

Issue 2780393005: Move the canonical empty context to the VM isolate. (Closed)
Patch Set: . Created 3 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 | « runtime/vm/object_store.cc ('k') | runtime/vm/raw_object_snapshot.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 (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 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->parent_); } 1431 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->parent_); }
1432 RawContext* parent_; 1432 RawContext* parent_;
1433 1433
1434 // Variable length data follows here. 1434 // Variable length data follows here.
1435 RawObject** data() { OPEN_ARRAY_START(RawObject*, RawObject*); } 1435 RawObject** data() { OPEN_ARRAY_START(RawObject*, RawObject*); }
1436 RawObject* const* data() const { OPEN_ARRAY_START(RawObject*, RawObject*); } 1436 RawObject* const* data() const { OPEN_ARRAY_START(RawObject*, RawObject*); }
1437 RawObject** to(intptr_t num_vars) { 1437 RawObject** to(intptr_t num_vars) {
1438 return reinterpret_cast<RawObject**>(&ptr()->data()[num_vars - 1]); 1438 return reinterpret_cast<RawObject**>(&ptr()->data()[num_vars - 1]);
1439 } 1439 }
1440 1440
1441 friend class Object;
1441 friend class SnapshotReader; 1442 friend class SnapshotReader;
1442 }; 1443 };
1443 1444
1444 1445
1445 class RawContextScope : public RawObject { 1446 class RawContextScope : public RawObject {
1446 RAW_HEAP_OBJECT_IMPLEMENTATION(ContextScope); 1447 RAW_HEAP_OBJECT_IMPLEMENTATION(ContextScope);
1447 1448
1448 // TODO(iposva): Switch to conventional enum offset based structure to avoid 1449 // TODO(iposva): Switch to conventional enum offset based structure to avoid
1449 // alignment mishaps. 1450 // alignment mishaps.
1450 struct VariableDesc { 1451 struct VariableDesc {
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
2434 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2435 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2435 kTypedDataInt8ArrayViewCid + 15); 2436 kTypedDataInt8ArrayViewCid + 15);
2436 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2437 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2437 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2438 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2438 return (kNullCid - kTypedDataInt8ArrayCid); 2439 return (kNullCid - kTypedDataInt8ArrayCid);
2439 } 2440 }
2440 2441
2441 } // namespace dart 2442 } // namespace dart
2442 2443
2443 #endif // RUNTIME_VM_RAW_OBJECT_H_ 2444 #endif // RUNTIME_VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/object_store.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698