Chromium Code Reviews| 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_CODE_DESCRIPTORS_H_ | 5 #ifndef VM_CODE_DESCRIPTORS_H_ |
| 6 #define VM_CODE_DESCRIPTORS_H_ | 6 #define VM_CODE_DESCRIPTORS_H_ |
| 7 | 7 |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 #include "vm/growable_array.h" | 9 #include "vm/growable_array.h" |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 RawPcDescriptors* FinalizePcDescriptors(uword entry_point); | 58 RawPcDescriptors* FinalizePcDescriptors(uword entry_point); |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 GrowableArray<struct PcDesc> list_; | 61 GrowableArray<struct PcDesc> list_; |
| 62 DISALLOW_COPY_AND_ASSIGN(DescriptorList); | 62 DISALLOW_COPY_AND_ASSIGN(DescriptorList); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 | 65 |
| 66 class StackmapTableBuilder : public ZoneAllocated { | 66 class StackmapTableBuilder : public ZoneAllocated { |
| 67 public: | 67 public: |
| 68 StackmapTableBuilder() : | 68 explicit StackmapTableBuilder(intptr_t entry_length_in_bits) : |
|
Vyacheslav Egorov (Google)
2012/08/15 14:17:37
why : is left on this line?
Kevin Millikin (Google)
2012/08/15 14:41:31
For historical reasons.
| |
| 69 entry_length_in_bits_(entry_length_in_bits), | |
| 69 stack_map_(Stackmap::ZoneHandle()), | 70 stack_map_(Stackmap::ZoneHandle()), |
| 70 list_(GrowableObjectArray::ZoneHandle( | 71 list_(GrowableObjectArray::ZoneHandle( |
| 71 GrowableObjectArray::New(Heap::kOld))) { } | 72 GrowableObjectArray::New(Heap::kOld))) { } |
| 72 ~StackmapTableBuilder() { } | 73 ~StackmapTableBuilder() { } |
| 73 | 74 |
| 74 void AddEntry(intptr_t pc_offset, BitmapBuilder* bitmap); | 75 void AddEntry(intptr_t pc_offset, BitmapBuilder* bitmap); |
| 75 | 76 |
| 76 bool Verify(); | 77 bool Verify(); |
| 77 | 78 |
| 78 RawArray* FinalizeStackmaps(const Code& code); | 79 RawArray* FinalizeStackmaps(const Code& code); |
| 79 | 80 |
| 80 private: | 81 private: |
| 81 intptr_t Length() const { return list_.Length(); } | 82 intptr_t Length() const { return list_.Length(); } |
| 82 RawStackmap* Map(int index) const; | 83 RawStackmap* MapAt(int index) const; |
| 83 | 84 |
| 85 // All the stackmaps in a function have the same length. | |
| 86 intptr_t entry_length_in_bits_; | |
|
srdjan
2012/08/15 22:17:08
const
| |
| 84 Stackmap& stack_map_; | 87 Stackmap& stack_map_; |
| 85 GrowableObjectArray& list_; | 88 GrowableObjectArray& list_; |
| 86 DISALLOW_COPY_AND_ASSIGN(StackmapTableBuilder); | 89 DISALLOW_COPY_AND_ASSIGN(StackmapTableBuilder); |
| 87 }; | 90 }; |
| 88 | 91 |
| 89 | 92 |
| 90 class ExceptionHandlerList : public ZoneAllocated { | 93 class ExceptionHandlerList : public ZoneAllocated { |
| 91 public: | 94 public: |
| 92 struct HandlerDesc { | 95 struct HandlerDesc { |
| 93 intptr_t try_index; // Try block index handled by the handler. | 96 intptr_t try_index; // Try block index handled by the handler. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 } | 131 } |
| 129 | 132 |
| 130 private: | 133 private: |
| 131 GrowableArray<struct HandlerDesc> list_; | 134 GrowableArray<struct HandlerDesc> list_; |
| 132 DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerList); | 135 DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerList); |
| 133 }; | 136 }; |
| 134 | 137 |
| 135 } // namespace dart | 138 } // namespace dart |
| 136 | 139 |
| 137 #endif // VM_CODE_DESCRIPTORS_H_ | 140 #endif // VM_CODE_DESCRIPTORS_H_ |
| OLD | NEW |