| 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 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1990 // Slow function, use in asserts to track changes in important library | 1990 // Slow function, use in asserts to track changes in important library |
| 1991 // functions. | 1991 // functions. |
| 1992 int32_t SourceFingerprint() const; | 1992 int32_t SourceFingerprint() const; |
| 1993 | 1993 |
| 1994 // Return false and report an error if the fingerprint does not match. | 1994 // Return false and report an error if the fingerprint does not match. |
| 1995 bool CheckSourceFingerprint(int32_t fp) const; | 1995 bool CheckSourceFingerprint(int32_t fp) const; |
| 1996 | 1996 |
| 1997 // Works with map [deopt-id] -> ICData. | 1997 // Works with map [deopt-id] -> ICData. |
| 1998 void SaveICDataMap( | 1998 void SaveICDataMap( |
| 1999 const ZoneGrowableArray<const ICData*>& deopt_id_to_ic_data) const; | 1999 const ZoneGrowableArray<const ICData*>& deopt_id_to_ic_data) const; |
| 2000 RawArray* RestoreICDataMap() const; | 2000 void RestoreICDataMap( |
| 2001 ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data) const; |
| 2001 | 2002 |
| 2002 RawArray* ic_data_array() const; | 2003 RawArray* ic_data_array() const; |
| 2003 void ClearICData() const; | 2004 void ClearICData() const; |
| 2004 | 2005 |
| 2005 static const int kCtorPhaseInit = 1 << 0; | 2006 static const int kCtorPhaseInit = 1 << 0; |
| 2006 static const int kCtorPhaseBody = 1 << 1; | 2007 static const int kCtorPhaseBody = 1 << 1; |
| 2007 static const int kCtorPhaseAll = (kCtorPhaseInit | kCtorPhaseBody); | 2008 static const int kCtorPhaseAll = (kCtorPhaseInit | kCtorPhaseBody); |
| 2008 | 2009 |
| 2009 private: | 2010 private: |
| 2010 void set_ic_data_array(const Array& value) const; | 2011 void set_ic_data_array(const Array& value) const; |
| (...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3675 uword GetLazyDeoptPc() const; | 3676 uword GetLazyDeoptPc() const; |
| 3676 | 3677 |
| 3677 // Find pc, return 0 if not found. | 3678 // Find pc, return 0 if not found. |
| 3678 uword GetPcForDeoptId(intptr_t deopt_id, PcDescriptors::Kind kind) const; | 3679 uword GetPcForDeoptId(intptr_t deopt_id, PcDescriptors::Kind kind) const; |
| 3679 intptr_t GetDeoptIdForOsr(uword pc) const; | 3680 intptr_t GetDeoptIdForOsr(uword pc) const; |
| 3680 | 3681 |
| 3681 // Returns true if there is an object in the code between 'start_offset' | 3682 // Returns true if there is an object in the code between 'start_offset' |
| 3682 // (inclusive) and 'end_offset' (exclusive). | 3683 // (inclusive) and 'end_offset' (exclusive). |
| 3683 bool ObjectExistsInArea(intptr_t start_offest, intptr_t end_offset) const; | 3684 bool ObjectExistsInArea(intptr_t start_offest, intptr_t end_offset) const; |
| 3684 | 3685 |
| 3685 // Each (*node_ids)[n] has a an extracted ic data array (*arrays)[n]. | |
| 3686 // Returns the maximum id found. | |
| 3687 intptr_t ExtractIcDataArraysAtCalls( | |
| 3688 GrowableArray<intptr_t>* node_ids, | |
| 3689 const GrowableObjectArray& ic_data_objs) const; | |
| 3690 | |
| 3691 // Returns an array indexed by deopt id, containing the extracted ICData. | |
| 3692 RawArray* ExtractTypeFeedbackArray() const; | |
| 3693 | |
| 3694 RawString* Name() const; | 3686 RawString* Name() const; |
| 3695 RawString* PrettyName() const; | 3687 RawString* PrettyName() const; |
| 3696 | 3688 |
| 3697 int64_t compile_timestamp() const { | 3689 int64_t compile_timestamp() const { |
| 3698 return raw_ptr()->compile_timestamp_; | 3690 return raw_ptr()->compile_timestamp_; |
| 3699 } | 3691 } |
| 3700 | 3692 |
| 3701 intptr_t entry_patch_pc_offset() const { | 3693 intptr_t entry_patch_pc_offset() const { |
| 3702 return raw_ptr()->entry_patch_pc_offset_; | 3694 return raw_ptr()->entry_patch_pc_offset_; |
| 3703 } | 3695 } |
| (...skipping 3421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7125 | 7117 |
| 7126 | 7118 |
| 7127 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7119 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 7128 intptr_t index) { | 7120 intptr_t index) { |
| 7129 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7121 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 7130 } | 7122 } |
| 7131 | 7123 |
| 7132 } // namespace dart | 7124 } // namespace dart |
| 7133 | 7125 |
| 7134 #endif // VM_OBJECT_H_ | 7126 #endif // VM_OBJECT_H_ |
| OLD | NEW |