| 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/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/token.h" | 10 #include "vm/token.h" |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 kOptStaticCall = kIcCall << 1, // Call directly to known target. | 910 kOptStaticCall = kIcCall << 1, // Call directly to known target. |
| 911 kUnoptStaticCall = kOptStaticCall << 1, // Call to a known target via stub. | 911 kUnoptStaticCall = kOptStaticCall << 1, // Call to a known target via stub. |
| 912 kClosureCall = kUnoptStaticCall << 1, // Closure call. | 912 kClosureCall = kUnoptStaticCall << 1, // Closure call. |
| 913 kRuntimeCall = kClosureCall << 1, // Runtime call. | 913 kRuntimeCall = kClosureCall << 1, // Runtime call. |
| 914 kOsrEntry = kRuntimeCall << 1, // OSR entry point in unopt. code. | 914 kOsrEntry = kRuntimeCall << 1, // OSR entry point in unopt. code. |
| 915 kOther = kOsrEntry << 1, | 915 kOther = kOsrEntry << 1, |
| 916 kAnyKind = 0xFF | 916 kAnyKind = 0xFF |
| 917 }; | 917 }; |
| 918 | 918 |
| 919 // Compressed version assumes try_index is always -1 and does not store it. | 919 // Compressed version assumes try_index is always -1 and does not store it. |
| 920 struct PcDescriptorRec { | 920 class PcDescriptorRec { |
| 921 public: |
| 922 PcDescriptorRec() |
| 923 : pc_(0), deopt_id_and_kind_(0), token_pos_(0), try_index_(0) {} |
| 924 |
| 921 uword pc() const { return pc_; } | 925 uword pc() const { return pc_; } |
| 922 void set_pc(uword value) { pc_ = value; } | 926 void set_pc(uword value) { pc_ = value; } |
| 923 | 927 |
| 924 Kind kind() const { | 928 Kind kind() const { |
| 925 return static_cast<Kind>(deopt_id_and_kind_ & kAnyKind); | 929 return static_cast<Kind>(deopt_id_and_kind_ & kAnyKind); |
| 926 } | 930 } |
| 927 void set_kind(Kind kind) { | 931 void set_kind(Kind kind) { |
| 928 deopt_id_and_kind_ = (deopt_id_and_kind_ & 0xFFFFFF00) | kind; | 932 deopt_id_and_kind_ = (deopt_id_and_kind_ & 0xFFFFFF00) | kind; |
| 929 } | 933 } |
| 930 | 934 |
| (...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1946 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); | 1950 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); |
| 1947 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 1951 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 1948 kTypedDataInt8ArrayViewCid + 15); | 1952 kTypedDataInt8ArrayViewCid + 15); |
| 1949 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); | 1953 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); |
| 1950 return (kNullCid - kTypedDataInt8ArrayCid); | 1954 return (kNullCid - kTypedDataInt8ArrayCid); |
| 1951 } | 1955 } |
| 1952 | 1956 |
| 1953 } // namespace dart | 1957 } // namespace dart |
| 1954 | 1958 |
| 1955 #endif // VM_RAW_OBJECT_H_ | 1959 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |