Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: runtime/vm/object.h

Issue 10982088: Remove deoptimization index PC descriptors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove code from an unrelated change. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 2097
2098 2098
2099 class PcDescriptors : public Object { 2099 class PcDescriptors : public Object {
2100 private: 2100 private:
2101 // Describes the layout of PC descriptor data. 2101 // Describes the layout of PC descriptor data.
2102 enum { 2102 enum {
2103 kPcEntry = 0, // PC value of the descriptor, unique. 2103 kPcEntry = 0, // PC value of the descriptor, unique.
2104 kKindEntry = 1, 2104 kKindEntry = 1,
2105 kDeoptIdEntry = 2, // Deopt id. 2105 kDeoptIdEntry = 2, // Deopt id.
2106 kTokenPosEntry = 3, // Token position in source. 2106 kTokenPosEntry = 3, // Token position in source.
2107 kDeoptReasonEntry = 3, // DeoptReasonId.
2108 kTryIndexEntry = 4, // Try block index. 2107 kTryIndexEntry = 4, // Try block index.
2109 kDeoptIndexEntry = 4, // Deoptimization array index.
2110 // We would potentially be adding other objects here like 2108 // We would potentially be adding other objects here like
2111 // pointer maps for optimized functions, local variables information etc. 2109 // pointer maps for optimized functions, local variables information etc.
2112 kNumberOfEntries = 5, 2110 kNumberOfEntries = 5,
2113 }; 2111 };
2114 2112
2115 public: 2113 public:
2116 enum Kind { 2114 enum Kind {
2117 kDeoptBefore = 0, // Deoptimization continuation point before instruction. 2115 kDeoptBefore = 0, // Deoptimization continuation point before instruction.
2118 kDeoptAfter, // Deoptimization continuation point after instruction. 2116 kDeoptAfter, // Deoptimization continuation point after instruction.
2119 kDeoptIndex, // Index into deopt info array.
2120 kPatchCode, // Buffer for patching code entry. 2117 kPatchCode, // Buffer for patching code entry.
2121 kLazyDeoptJump, // Lazy deoptimization trampoline. 2118 kLazyDeoptJump, // Lazy deoptimization trampoline.
2122 kIcCall, // IC call. 2119 kIcCall, // IC call.
2123 kFuncCall, // Call to known target, e.g. static call, closure call. 2120 kFuncCall, // Call to known target, e.g. static call, closure call.
2124 kReturn, // Return from function. 2121 kReturn, // Return from function.
2125 kOther 2122 kOther
2126 }; 2123 };
2127 2124
2128 intptr_t Length() const; 2125 intptr_t Length() const;
2129 2126
2130 uword PC(intptr_t index) const; 2127 uword PC(intptr_t index) const;
2131 PcDescriptors::Kind DescriptorKind(intptr_t index) const; 2128 PcDescriptors::Kind DescriptorKind(intptr_t index) const;
2132 const char* KindAsStr(intptr_t index) const; 2129 const char* KindAsStr(intptr_t index) const;
2133 intptr_t DeoptId(intptr_t index) const; 2130 intptr_t DeoptId(intptr_t index) const;
2134 intptr_t TokenPos(intptr_t index) const; 2131 intptr_t TokenPos(intptr_t index) const;
2135 intptr_t TryIndex(intptr_t index) const; 2132 intptr_t TryIndex(intptr_t index) const;
2136 // Different encoding for kDeoptIndex.
2137 // Index into the deopt-info array of Code object.
2138 intptr_t DeoptIndex(intptr_t index) const;
2139 intptr_t DeoptReason(intptr_t index) const;
2140 2133
2141 void AddDescriptor(intptr_t index, 2134 void AddDescriptor(intptr_t index,
2142 uword pc, 2135 uword pc,
2143 PcDescriptors::Kind kind, 2136 PcDescriptors::Kind kind,
2144 intptr_t deopt_id, 2137 intptr_t deopt_id,
2145 intptr_t token_pos, // Or deopt reason. 2138 intptr_t token_pos, // Or deopt reason.
2146 intptr_t try_index) const { // Or deopt index. 2139 intptr_t try_index) const { // Or deopt index.
2147 SetPC(index, pc); 2140 SetPC(index, pc);
2148 SetKind(index, kind); 2141 SetKind(index, kind);
2149 SetDeoptId(index, deopt_id); 2142 SetDeoptId(index, deopt_id);
(...skipping 3570 matching lines...) Expand 10 before | Expand all | Expand 10 after
5720 if (this->CharAt(i) != str.CharAt(begin_index + i)) { 5713 if (this->CharAt(i) != str.CharAt(begin_index + i)) {
5721 return false; 5714 return false;
5722 } 5715 }
5723 } 5716 }
5724 return true; 5717 return true;
5725 } 5718 }
5726 5719
5727 } // namespace dart 5720 } // namespace dart
5728 5721
5729 #endif // VM_OBJECT_H_ 5722 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698