| 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 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 kRuntimeCall = kClosureCall << 1, // Runtime call. | 1016 kRuntimeCall = kClosureCall << 1, // Runtime call. |
| 1017 kOsrEntry = kRuntimeCall << 1, // OSR entry point in unopt. code. | 1017 kOsrEntry = kRuntimeCall << 1, // OSR entry point in unopt. code. |
| 1018 kOther = kOsrEntry << 1, | 1018 kOther = kOsrEntry << 1, |
| 1019 kAnyKind = 0xFF | 1019 kAnyKind = 0xFF |
| 1020 }; | 1020 }; |
| 1021 | 1021 |
| 1022 // Compressed version assumes try_index is always -1 and does not store it. | 1022 // Compressed version assumes try_index is always -1 and does not store it. |
| 1023 struct PcDescriptorRec { | 1023 struct PcDescriptorRec { |
| 1024 uword pc_offset() const { return pc_offset_; } | 1024 uword pc_offset() const { return pc_offset_; } |
| 1025 void set_pc_offset(uword value) { | 1025 void set_pc_offset(uword value) { |
| 1026 ASSERT((sizeof(value) == 4) || (value < static_cast<uword>(1) << 32)); | 1026 ASSERT((sizeof(value) == 4) || |
| 1027 static_cast<uint64_t>(value) <= static_cast<uint64_t>(kMaxUint32)); |
| 1027 pc_offset_ = value; | 1028 pc_offset_ = value; |
| 1028 } | 1029 } |
| 1029 | 1030 |
| 1030 Kind kind() const { | 1031 Kind kind() const { |
| 1031 return static_cast<Kind>(deopt_id_and_kind_ & kAnyKind); | 1032 return static_cast<Kind>(deopt_id_and_kind_ & kAnyKind); |
| 1032 } | 1033 } |
| 1033 void set_kind(Kind kind) { | 1034 void set_kind(Kind kind) { |
| 1034 deopt_id_and_kind_ = (deopt_id_and_kind_ & 0xFFFFFF00) | kind; | 1035 deopt_id_and_kind_ = (deopt_id_and_kind_ & 0xFFFFFF00) | kind; |
| 1035 } | 1036 } |
| 1036 | 1037 |
| (...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2156 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2157 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 2157 kTypedDataInt8ArrayViewCid + 15); | 2158 kTypedDataInt8ArrayViewCid + 15); |
| 2158 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2159 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2159 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2160 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2160 return (kNullCid - kTypedDataInt8ArrayCid); | 2161 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2161 } | 2162 } |
| 2162 | 2163 |
| 2163 } // namespace dart | 2164 } // namespace dart |
| 2164 | 2165 |
| 2165 #endif // VM_RAW_OBJECT_H_ | 2166 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |