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/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/token.h" | 10 #include "vm/token.h" |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 897 friend class Code; | 897 friend class Code; |
| 898 friend class StackFrame; | 898 friend class StackFrame; |
| 899 friend class MarkingVisitor; | 899 friend class MarkingVisitor; |
| 900 friend class Function; | 900 friend class Function; |
| 901 }; | 901 }; |
| 902 | 902 |
| 903 | 903 |
| 904 class RawPcDescriptors : public RawObject { | 904 class RawPcDescriptors : public RawObject { |
| 905 public: | 905 public: |
| 906 enum Kind { | 906 enum Kind { |
| 907 kDeopt, // Deoptimization continuation point. | 907 kDeopt = 1, // Deoptimization continuation point. |
| 908 kIcCall, // IC call. | 908 kIcCall = kDeopt << 1, // IC call. |
| 909 kOptStaticCall, // Call directly to known target, e.g. static call. | 909 kOptStaticCall = kIcCall << 1, // Call directly to known target. |
| 910 kUnoptStaticCall, // Call to a known target via a stub. | 910 kUnoptStaticCall = kOptStaticCall << 1, // Call to a known target via stub. |
| 911 kClosureCall, // Closure call. | 911 kClosureCall = kUnoptStaticCall << 1, // Closure call. |
| 912 kRuntimeCall, // Runtime call. | 912 kRuntimeCall = kClosureCall << 1, // Runtime call. |
| 913 kOsrEntry, // OSR entry point in unoptimized code. | 913 kOsrEntry = kRuntimeCall << 1, // OSR entry point in unopt. code. |
| 914 kOther | 914 kOther = kOsrEntry << 1, |
| 915 kAnyKind = 0xFFFF | |
|
siva
2014/07/10 18:21:21
0xff because kind_ is uint8_t ?
srdjan
2014/07/10 18:24:48
Done.
| |
| 915 }; | 916 }; |
| 916 | 917 |
| 917 struct PcDescriptorRec { | 918 struct PcDescriptorRec { |
| 918 uword pc; | 919 uword pc; |
| 919 int32_t deopt_id; | 920 int32_t deopt_id; |
| 920 int32_t token_pos; // Or deopt reason. | 921 int32_t token_pos; // Or deopt reason. |
| 921 int16_t try_index; // Or deopt index. | 922 int16_t try_index; // Or deopt index. |
| 922 int8_t kind_; | 923 uint8_t kind_; |
| 923 | 924 |
| 924 Kind kind() const { return static_cast<Kind>(kind_); } | 925 Kind kind() const { return static_cast<Kind>(kind_); } |
| 925 }; | 926 }; |
| 926 | 927 |
| 927 private: | 928 private: |
| 928 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); | 929 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); |
| 929 | 930 |
| 930 intptr_t length_; // Number of descriptors. | 931 intptr_t length_; // Number of descriptors. |
| 931 | 932 |
| 932 // Variable length data follows here. | 933 // Variable length data follows here. |
| (...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1896 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); | 1897 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); |
| 1897 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 1898 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 1898 kTypedDataInt8ArrayViewCid + 15); | 1899 kTypedDataInt8ArrayViewCid + 15); |
| 1899 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); | 1900 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); |
| 1900 return (kNullCid - kTypedDataInt8ArrayCid); | 1901 return (kNullCid - kTypedDataInt8ArrayCid); |
| 1901 } | 1902 } |
| 1902 | 1903 |
| 1903 } // namespace dart | 1904 } // namespace dart |
| 1904 | 1905 |
| 1905 #endif // VM_RAW_OBJECT_H_ | 1906 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |