OLD | NEW |
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 VM_RAW_OBJECT_H_ | 5 #ifndef VM_RAW_OBJECT_H_ |
6 #define VM_RAW_OBJECT_H_ | 6 #define 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/globals.h" | 10 #include "vm/globals.h" |
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 const uint8_t* data() const { OPEN_ARRAY_START(uint8_t, uint8_t); } | 1052 const uint8_t* data() const { OPEN_ARRAY_START(uint8_t, uint8_t); } |
1053 }; | 1053 }; |
1054 | 1054 |
1055 | 1055 |
1056 class RawLocalVarDescriptors : public RawObject { | 1056 class RawLocalVarDescriptors : public RawObject { |
1057 public: | 1057 public: |
1058 enum VarInfoKind { | 1058 enum VarInfoKind { |
1059 kStackVar = 1, | 1059 kStackVar = 1, |
1060 kContextVar, | 1060 kContextVar, |
1061 kContextLevel, | 1061 kContextLevel, |
1062 kSavedEntryContext, | |
1063 kSavedCurrentContext | 1062 kSavedCurrentContext |
1064 }; | 1063 }; |
1065 | 1064 |
1066 enum { | 1065 enum { |
1067 kKindPos = 0, | 1066 kKindPos = 0, |
1068 kKindSize = 8, | 1067 kKindSize = 8, |
1069 kIndexPos = kKindPos + kKindSize, | 1068 kIndexPos = kKindPos + kKindSize, |
1070 // Since there are 24 bits for the stack slot index, Functions can have | 1069 // Since there are 24 bits for the stack slot index, Functions can have |
1071 // only ~16.7 million stack slots. | 1070 // only ~16.7 million stack slots. |
1072 kPayloadSize = sizeof(int32_t) * kBitsPerByte, | 1071 kPayloadSize = sizeof(int32_t) * kBitsPerByte, |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2068 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2067 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2069 kTypedDataInt8ArrayViewCid + 15); | 2068 kTypedDataInt8ArrayViewCid + 15); |
2070 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2069 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2071 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2070 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2072 return (kNullCid - kTypedDataInt8ArrayCid); | 2071 return (kNullCid - kTypedDataInt8ArrayCid); |
2073 } | 2072 } |
2074 | 2073 |
2075 } // namespace dart | 2074 } // namespace dart |
2076 | 2075 |
2077 #endif // VM_RAW_OBJECT_H_ | 2076 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |