| 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 2528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2539 kNumberOfEntries = 5, | 2539 kNumberOfEntries = 5, |
| 2540 }; | 2540 }; |
| 2541 | 2541 |
| 2542 public: | 2542 public: |
| 2543 enum Kind { | 2543 enum Kind { |
| 2544 kDeopt, // Deoptimization continuation point. | 2544 kDeopt, // Deoptimization continuation point. |
| 2545 kEntryPatch, // Location where to patch entry. | 2545 kEntryPatch, // Location where to patch entry. |
| 2546 kPatchCode, // Buffer for patching code entry. | 2546 kPatchCode, // Buffer for patching code entry. |
| 2547 kLazyDeoptJump, // Lazy deoptimization trampoline. | 2547 kLazyDeoptJump, // Lazy deoptimization trampoline. |
| 2548 kIcCall, // IC call. | 2548 kIcCall, // IC call. |
| 2549 kFuncCall, // Call to known target, e.g. static call. | 2549 kOptStaticCall, // Call directly to known target, e.g. static call. |
| 2550 kUnoptStaticCall, // Call to a known target via a stub. |
| 2550 kClosureCall, // Closure call. | 2551 kClosureCall, // Closure call. |
| 2551 kRuntimeCall, // Runtime call. | 2552 kRuntimeCall, // Runtime call. |
| 2552 kReturn, // Return from function. | 2553 kReturn, // Return from function. |
| 2553 kOsrEntry, // OSR entry point in unoptimized code. | 2554 kOsrEntry, // OSR entry point in unoptimized code. |
| 2554 kOther | 2555 kOther |
| 2555 }; | 2556 }; |
| 2556 | 2557 |
| 2557 intptr_t Length() const; | 2558 intptr_t Length() const; |
| 2558 | 2559 |
| 2559 uword PC(intptr_t index) const; | 2560 uword PC(intptr_t index) const; |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2983 | 2984 |
| 2984 // Each (*node_ids)[n] has a an extracted ic data array (*arrays)[n]. | 2985 // Each (*node_ids)[n] has a an extracted ic data array (*arrays)[n]. |
| 2985 // Returns the maximum id found. | 2986 // Returns the maximum id found. |
| 2986 intptr_t ExtractIcDataArraysAtCalls( | 2987 intptr_t ExtractIcDataArraysAtCalls( |
| 2987 GrowableArray<intptr_t>* node_ids, | 2988 GrowableArray<intptr_t>* node_ids, |
| 2988 const GrowableObjectArray& ic_data_objs) const; | 2989 const GrowableObjectArray& ic_data_objs) const; |
| 2989 | 2990 |
| 2990 // Returns an array indexed by deopt id, containing the extracted ICData. | 2991 // Returns an array indexed by deopt id, containing the extracted ICData. |
| 2991 RawArray* ExtractTypeFeedbackArray() const; | 2992 RawArray* ExtractTypeFeedbackArray() const; |
| 2992 | 2993 |
| 2993 // Returns deopt-ids of all static calls that were never resolved, i.e., | |
| 2994 // never executed. | |
| 2995 void ExtractUncalledStaticCallDeoptIds( | |
| 2996 GrowableArray<intptr_t>* deopt_ids) const; | |
| 2997 | |
| 2998 private: | 2994 private: |
| 2999 // An object finder visitor interface. | 2995 // An object finder visitor interface. |
| 3000 class FindRawCodeVisitor : public FindObjectVisitor { | 2996 class FindRawCodeVisitor : public FindObjectVisitor { |
| 3001 public: | 2997 public: |
| 3002 explicit FindRawCodeVisitor(uword pc) | 2998 explicit FindRawCodeVisitor(uword pc) |
| 3003 : FindObjectVisitor(Isolate::Current()), pc_(pc) { } | 2999 : FindObjectVisitor(Isolate::Current()), pc_(pc) { } |
| 3004 virtual ~FindRawCodeVisitor() { } | 3000 virtual ~FindRawCodeVisitor() { } |
| 3005 | 3001 |
| 3006 // Check if object matches find condition. | 3002 // Check if object matches find condition. |
| 3007 virtual bool FindObject(RawObject* obj); | 3003 virtual bool FindObject(RawObject* obj); |
| (...skipping 2934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5942 | 5938 |
| 5943 | 5939 |
| 5944 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 5940 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 5945 intptr_t index) { | 5941 intptr_t index) { |
| 5946 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 5942 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 5947 } | 5943 } |
| 5948 | 5944 |
| 5949 } // namespace dart | 5945 } // namespace dart |
| 5950 | 5946 |
| 5951 #endif // VM_OBJECT_H_ | 5947 #endif // VM_OBJECT_H_ |
| OLD | NEW |