| 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_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
| 6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
| (...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1976 | 1976 |
| 1977 | 1977 |
| 1978 class PcDescriptors : public Object { | 1978 class PcDescriptors : public Object { |
| 1979 public: | 1979 public: |
| 1980 enum Kind { | 1980 enum Kind { |
| 1981 kDeopt = 0, // Deoptimization cotinuation point. | 1981 kDeopt = 0, // Deoptimization cotinuation point. |
| 1982 kPatchCode, // Buffer for patching code entry. | 1982 kPatchCode, // Buffer for patching code entry. |
| 1983 kIcCall, // IC call. | 1983 kIcCall, // IC call. |
| 1984 kFuncCall, // Call to known target, e.g. static call, closure call. | 1984 kFuncCall, // Call to known target, e.g. static call, closure call. |
| 1985 kReturn, // Return from function. | 1985 kReturn, // Return from function. |
| 1986 kTypeTest, // Array caching previous type tests. |
| 1986 kOther | 1987 kOther |
| 1987 }; | 1988 }; |
| 1988 | 1989 |
| 1989 intptr_t Length() const; | 1990 intptr_t Length() const; |
| 1990 | 1991 |
| 1991 uword PC(intptr_t index) const; | 1992 uword PC(intptr_t index) const; |
| 1992 PcDescriptors::Kind DescriptorKind(intptr_t index) const; | 1993 PcDescriptors::Kind DescriptorKind(intptr_t index) const; |
| 1993 const char* KindAsStr(intptr_t index) const; | 1994 const char* KindAsStr(intptr_t index) const; |
| 1994 intptr_t NodeId(intptr_t index) const; | 1995 intptr_t NodeId(intptr_t index) const; |
| 1995 intptr_t TokenIndex(intptr_t index) const; | 1996 intptr_t TokenIndex(intptr_t index) const; |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2232 | 2233 |
| 2233 int32_t GetPointerOffsetAt(int index) const { | 2234 int32_t GetPointerOffsetAt(int index) const { |
| 2234 return *PointerOffsetAddrAt(index); | 2235 return *PointerOffsetAddrAt(index); |
| 2235 } | 2236 } |
| 2236 intptr_t GetTokenIndexOfPC(uword pc) const; | 2237 intptr_t GetTokenIndexOfPC(uword pc) const; |
| 2237 | 2238 |
| 2238 // Find pc of patch code buffer. Return 0 if not found. | 2239 // Find pc of patch code buffer. Return 0 if not found. |
| 2239 uword GetPatchCodePc() const; | 2240 uword GetPatchCodePc() const; |
| 2240 | 2241 |
| 2241 uword GetDeoptPcAtNodeId(intptr_t node_id) const; | 2242 uword GetDeoptPcAtNodeId(intptr_t node_id) const; |
| 2243 uword GetTypeTestAtNodeId(intptr_t node_id) const; |
| 2242 | 2244 |
| 2243 // Returns true if there is an object in the code between 'start_offset' | 2245 // Returns true if there is an object in the code between 'start_offset' |
| 2244 // (inclusive) and 'end_offset' (exclusive). | 2246 // (inclusive) and 'end_offset' (exclusive). |
| 2245 bool ObjectExistInArea(intptr_t start_offest, intptr_t end_offset) const; | 2247 bool ObjectExistInArea(intptr_t start_offest, intptr_t end_offset) const; |
| 2246 | 2248 |
| 2247 // Each (*node_ids)[n] has a an extracted ic data array (*arrays)[n]. | 2249 // Each (*node_ids)[n] has a an extracted ic data array (*arrays)[n]. |
| 2248 void ExtractIcDataArraysAtCalls( | 2250 void ExtractIcDataArraysAtCalls( |
| 2249 GrowableArray<intptr_t>* node_ids, | 2251 GrowableArray<intptr_t>* node_ids, |
| 2250 const GrowableObjectArray& ic_data_objs) const; | 2252 const GrowableObjectArray& ic_data_objs) const; |
| 2251 | 2253 |
| (...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3964 } | 3966 } |
| 3965 | 3967 |
| 3966 | 3968 |
| 3967 intptr_t Stackmap::SizeInBits() const { | 3969 intptr_t Stackmap::SizeInBits() const { |
| 3968 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); | 3970 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); |
| 3969 } | 3971 } |
| 3970 | 3972 |
| 3971 } // namespace dart | 3973 } // namespace dart |
| 3972 | 3974 |
| 3973 #endif // VM_OBJECT_H_ | 3975 #endif // VM_OBJECT_H_ |
| OLD | NEW |