| 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 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1136   } |  1136   } | 
|  1137   void set_num_native_fields(uint16_t value) const { |  1137   void set_num_native_fields(uint16_t value) const { | 
|  1138     raw_ptr()->num_native_fields_ = value; |  1138     raw_ptr()->num_native_fields_ = value; | 
|  1139   } |  1139   } | 
|  1140  |  1140  | 
|  1141   RawCode* allocation_stub() const { |  1141   RawCode* allocation_stub() const { | 
|  1142     return raw_ptr()->allocation_stub_; |  1142     return raw_ptr()->allocation_stub_; | 
|  1143   } |  1143   } | 
|  1144   void set_allocation_stub(const Code& value) const; |  1144   void set_allocation_stub(const Code& value) const; | 
|  1145  |  1145  | 
|  1146   void SwitchAllocationStub() const; |  1146   void DisableAllocationStub() const; | 
|  1147  |  1147  | 
|  1148   RawArray* constants() const; |  1148   RawArray* constants() const; | 
|  1149  |  1149  | 
|  1150   intptr_t FindInvocationDispatcherFunctionIndex(const Function& needle) const; |  1150   intptr_t FindInvocationDispatcherFunctionIndex(const Function& needle) const; | 
|  1151   RawFunction* InvocationDispatcherFunctionFromIndex(intptr_t idx) const; |  1151   RawFunction* InvocationDispatcherFunctionFromIndex(intptr_t idx) const; | 
|  1152  |  1152  | 
|  1153   RawFunction* GetInvocationDispatcher(const String& target_name, |  1153   RawFunction* GetInvocationDispatcher(const String& target_name, | 
|  1154                                        const Array& args_desc, |  1154                                        const Array& args_desc, | 
|  1155                                        RawFunction::Kind kind) const; |  1155                                        RawFunction::Kind kind) const; | 
|  1156  |  1156  | 
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1269   RawString* GenerateUserVisibleName() const; |  1269   RawString* GenerateUserVisibleName() const; | 
|  1270   void set_signature_function(const Function& value) const; |  1270   void set_signature_function(const Function& value) const; | 
|  1271   void set_signature_type(const AbstractType& value) const; |  1271   void set_signature_type(const AbstractType& value) const; | 
|  1272   void set_state_bits(intptr_t bits) const; |  1272   void set_state_bits(intptr_t bits) const; | 
|  1273  |  1273  | 
|  1274   void set_constants(const Array& value) const; |  1274   void set_constants(const Array& value) const; | 
|  1275  |  1275  | 
|  1276   void set_canonical_types(const Object& value) const; |  1276   void set_canonical_types(const Object& value) const; | 
|  1277   RawObject* canonical_types() const; |  1277   RawObject* canonical_types() const; | 
|  1278  |  1278  | 
|  1279   RawCode* spare_allocation_stub() const { |  | 
|  1280     return raw_ptr()->spare_allocation_stub_; |  | 
|  1281   } |  | 
|  1282  |  | 
|  1283   RawArray* invocation_dispatcher_cache() const; |  1279   RawArray* invocation_dispatcher_cache() const; | 
|  1284   void set_invocation_dispatcher_cache(const Array& cache) const; |  1280   void set_invocation_dispatcher_cache(const Array& cache) const; | 
|  1285   RawFunction* CreateInvocationDispatcher(const String& target_name, |  1281   RawFunction* CreateInvocationDispatcher(const String& target_name, | 
|  1286                                           const Array& args_desc, |  1282                                           const Array& args_desc, | 
|  1287                                           RawFunction::Kind kind) const; |  1283                                           RawFunction::Kind kind) const; | 
|  1288  |  1284  | 
|  1289   void CalculateFieldOffsets() const; |  1285   void CalculateFieldOffsets() const; | 
|  1290  |  1286  | 
|  1291   // functions_hash_table is in use iff there are at least this many functions. |  1287   // functions_hash_table is in use iff there are at least this many functions. | 
|  1292   static const intptr_t kFunctionLookupHashTreshold = 16; |  1288   static const intptr_t kFunctionLookupHashTreshold = 16; | 
| (...skipping 2469 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3762  |  3758  | 
|  3763   RawDeoptInfo* GetDeoptInfoAtPc( |  3759   RawDeoptInfo* GetDeoptInfoAtPc( | 
|  3764       uword pc, ICData::DeoptReasonId* deopt_reason) const; |  3760       uword pc, ICData::DeoptReasonId* deopt_reason) const; | 
|  3765  |  3761  | 
|  3766   // Returns null if there is no static call at 'pc'. |  3762   // Returns null if there is no static call at 'pc'. | 
|  3767   RawFunction* GetStaticCallTargetFunctionAt(uword pc) const; |  3763   RawFunction* GetStaticCallTargetFunctionAt(uword pc) const; | 
|  3768   // Returns null if there is no static call at 'pc'. |  3764   // Returns null if there is no static call at 'pc'. | 
|  3769   RawCode* GetStaticCallTargetCodeAt(uword pc) const; |  3765   RawCode* GetStaticCallTargetCodeAt(uword pc) const; | 
|  3770   // Aborts if there is no static call at 'pc'. |  3766   // Aborts if there is no static call at 'pc'. | 
|  3771   void SetStaticCallTargetCodeAt(uword pc, const Code& code) const; |  3767   void SetStaticCallTargetCodeAt(uword pc, const Code& code) const; | 
 |  3768   void SetStubCallTargetCodeAt(uword pc, const Code& code) const; | 
|  3772  |  3769  | 
|  3773   void Disassemble(DisassemblyFormatter* formatter = NULL) const; |  3770   void Disassemble(DisassemblyFormatter* formatter = NULL) const; | 
|  3774  |  3771  | 
|  3775   class Comments : public ZoneAllocated { |  3772   class Comments : public ZoneAllocated { | 
|  3776    public: |  3773    public: | 
|  3777     static Comments& New(intptr_t count); |  3774     static Comments& New(intptr_t count); | 
|  3778  |  3775  | 
|  3779     intptr_t Length() const; |  3776     intptr_t Length() const; | 
|  3780  |  3777  | 
|  3781     void SetPCOffsetAt(intptr_t idx, intptr_t pc_offset); |  3778     void SetPCOffsetAt(intptr_t idx, intptr_t pc_offset); | 
| (...skipping 3696 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  7478  |  7475  | 
|  7479  |  7476  | 
|  7480 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |  7477 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 
|  7481                                                intptr_t index) { |  7478                                                intptr_t index) { | 
|  7482   return array.At((index * kEntryLength) + kTargetFunctionIndex); |  7479   return array.At((index * kEntryLength) + kTargetFunctionIndex); | 
|  7483 } |  7480 } | 
|  7484  |  7481  | 
|  7485 }  // namespace dart |  7482 }  // namespace dart | 
|  7486  |  7483  | 
|  7487 #endif  // VM_OBJECT_H_ |  7484 #endif  // VM_OBJECT_H_ | 
| OLD | NEW |