| 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 } | 420 } |
| 421 bool IsFunction() { | 421 bool IsFunction() { |
| 422 return ((GetClassId() == kFunctionCid)); | 422 return ((GetClassId() == kFunctionCid)); |
| 423 } | 423 } |
| 424 bool IsInstructions() { | 424 bool IsInstructions() { |
| 425 return ((GetClassId() == kInstructionsCid)); | 425 return ((GetClassId() == kInstructionsCid)); |
| 426 } | 426 } |
| 427 bool IsCode() { | 427 bool IsCode() { |
| 428 return ((GetClassId() == kCodeCid)); | 428 return ((GetClassId() == kCodeCid)); |
| 429 } | 429 } |
| 430 bool IsStackmap() { |
| 431 return ((GetClassId() == kStackmapCid)); |
| 432 } |
| 433 bool IsPcDescriptors() { |
| 434 return ((GetClassId() == kPcDescriptorsCid)); |
| 435 } |
| 430 | 436 |
| 431 intptr_t Size() const { | 437 intptr_t Size() const { |
| 432 uword tags = ptr()->tags_; | 438 uword tags = ptr()->tags_; |
| 433 intptr_t result = SizeTag::decode(tags); | 439 intptr_t result = SizeTag::decode(tags); |
| 434 if (result != 0) { | 440 if (result != 0) { |
| 435 ASSERT(result == SizeFromClass()); | 441 ASSERT(result == SizeFromClass()); |
| 436 return result; | 442 return result; |
| 437 } | 443 } |
| 438 result = SizeFromClass(); | 444 result = SizeFromClass(); |
| 439 ASSERT(result > SizeTag::kMaxSizeTag); | 445 ASSERT(result > SizeTag::kMaxSizeTag); |
| (...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2269 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2275 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 2270 kTypedDataInt8ArrayViewCid + 15); | 2276 kTypedDataInt8ArrayViewCid + 15); |
| 2271 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2277 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2272 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2278 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2273 return (kNullCid - kTypedDataInt8ArrayCid); | 2279 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2274 } | 2280 } |
| 2275 | 2281 |
| 2276 } // namespace dart | 2282 } // namespace dart |
| 2277 | 2283 |
| 2278 #endif // VM_RAW_OBJECT_H_ | 2284 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |