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/ast.h" | 8 #include "vm/ast.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 ExceptionHandlerList() : list_() {} | 110 ExceptionHandlerList() : list_() {} |
| 111 | 111 |
| 112 intptr_t Length() const { | 112 intptr_t Length() const { |
| 113 return list_.length(); | 113 return list_.length(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void AddPlaceHolder() { | 116 void AddPlaceHolder() { |
| 117 struct HandlerDesc data; | 117 struct HandlerDesc data; |
| 118 data.outer_try_index = -1; | 118 data.outer_try_index = -1; |
|
Ivan Posva
2015/03/12 20:53:35
kInvalidTryIndex
This or next CL.
srdjan
2015/03/12 21:39:59
Theres is a CatchClauseNode::kInvalidTryIndex. Nex
| |
| 119 data.pc_offset = -1; | 119 data.pc_offset = ExceptionHandlers::kInvalidPcOffset; |
| 120 data.handler_types = NULL; | 120 data.handler_types = NULL; |
| 121 data.needs_stacktrace = false; | 121 data.needs_stacktrace = false; |
| 122 list_.Add(data); | 122 list_.Add(data); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void AddHandler(intptr_t try_index, | 125 void AddHandler(intptr_t try_index, |
| 126 intptr_t outer_try_index, | 126 intptr_t outer_try_index, |
| 127 intptr_t pc_offset, | 127 intptr_t pc_offset, |
| 128 const Array& handler_types, | 128 const Array& handler_types, |
| 129 bool needs_stacktrace) { | 129 bool needs_stacktrace) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 RawExceptionHandlers* FinalizeExceptionHandlers(uword entry_point) const; | 165 RawExceptionHandlers* FinalizeExceptionHandlers(uword entry_point) const; |
| 166 | 166 |
| 167 private: | 167 private: |
| 168 GrowableArray<struct HandlerDesc> list_; | 168 GrowableArray<struct HandlerDesc> list_; |
| 169 DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerList); | 169 DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerList); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace dart | 172 } // namespace dart |
| 173 | 173 |
| 174 #endif // VM_CODE_DESCRIPTORS_H_ | 174 #endif // VM_CODE_DESCRIPTORS_H_ |
| OLD | NEW |