Chromium Code Reviews| 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) || | 1026 #if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM64) |
|
Ivan Posva
2015/01/23 18:57:31
ARCH_IS_64_BIT
Alternatively you could limit the
Florian Schneider
2015/01/26 10:28:01
The proper fix would be to rewrite IsUint/IsInt to
| |
| 1027 static_cast<uint64_t>(value) <= static_cast<uint64_t>(kMaxUint32)); | 1027 ASSERT(value <= static_cast<uword>(kMaxUint32)); |
| 1028 #endif | |
| 1028 pc_offset_ = value; | 1029 pc_offset_ = value; |
| 1029 } | 1030 } |
| 1030 | 1031 |
| 1031 Kind kind() const { | 1032 Kind kind() const { |
| 1032 return static_cast<Kind>(deopt_id_and_kind_ & kAnyKind); | 1033 return static_cast<Kind>(deopt_id_and_kind_ & kAnyKind); |
| 1033 } | 1034 } |
| 1034 void set_kind(Kind kind) { | 1035 void set_kind(Kind kind) { |
| 1035 deopt_id_and_kind_ = (deopt_id_and_kind_ & 0xFFFFFF00) | kind; | 1036 deopt_id_and_kind_ = (deopt_id_and_kind_ & 0xFFFFFF00) | kind; |
| 1036 } | 1037 } |
| 1037 | 1038 |
| (...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2157 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2158 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 2158 kTypedDataInt8ArrayViewCid + 15); | 2159 kTypedDataInt8ArrayViewCid + 15); |
| 2159 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2160 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2160 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2161 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2161 return (kNullCid - kTypedDataInt8ArrayCid); | 2162 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2162 } | 2163 } |
| 2163 | 2164 |
| 2164 } // namespace dart | 2165 } // namespace dart |
| 2165 | 2166 |
| 2166 #endif // VM_RAW_OBJECT_H_ | 2167 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |