OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // The infrastructure used for (localized) message reporting in V8. | 5 // The infrastructure used for (localized) message reporting in V8. |
6 // | 6 // |
7 // Note: there's a big unresolved issue about ownership of the data | 7 // Note: there's a big unresolved issue about ownership of the data |
8 // structures used by this framework. | 8 // structures used by this framework. |
9 | 9 |
10 #ifndef V8_MESSAGES_H_ | 10 #ifndef V8_MESSAGES_H_ |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // TODO(wasm): Use proper typing. | 156 // TODO(wasm): Use proper typing. |
157 Handle<Object> wasm_instance_; | 157 Handle<Object> wasm_instance_; |
158 uint32_t wasm_func_index_; | 158 uint32_t wasm_func_index_; |
159 Handle<AbstractCode> code_; | 159 Handle<AbstractCode> code_; |
160 int offset_; | 160 int offset_; |
161 | 161 |
162 private: | 162 private: |
163 void FromFrameArray(Isolate* isolate, Handle<FrameArray> array, int frame_ix); | 163 void FromFrameArray(Isolate* isolate, Handle<FrameArray> array, int frame_ix); |
164 | 164 |
165 friend class FrameArrayIterator; | 165 friend class FrameArrayIterator; |
| 166 friend class AsmJsWasmStackFrame; |
166 }; | 167 }; |
167 | 168 |
168 class AsmJsWasmStackFrame : public WasmStackFrame { | 169 class AsmJsWasmStackFrame : public WasmStackFrame { |
169 public: | 170 public: |
170 virtual ~AsmJsWasmStackFrame() {} | 171 virtual ~AsmJsWasmStackFrame() {} |
171 | 172 |
172 Handle<Object> GetReceiver() const override; | 173 Handle<Object> GetReceiver() const override; |
173 Handle<Object> GetFunction() const override; | 174 Handle<Object> GetFunction() const override; |
174 | 175 |
175 Handle<Object> GetFileName() override; | 176 Handle<Object> GetFileName() override; |
176 Handle<Object> GetScriptNameOrSourceUrl() override; | 177 Handle<Object> GetScriptNameOrSourceUrl() override; |
177 | 178 |
178 int GetPosition() const override; | 179 int GetPosition() const override; |
179 int GetLineNumber() override; | 180 int GetLineNumber() override; |
180 int GetColumnNumber() override; | 181 int GetColumnNumber() override; |
181 | 182 |
182 MaybeHandle<String> ToString() override; | 183 MaybeHandle<String> ToString() override; |
| 184 |
| 185 private: |
| 186 friend class FrameArrayIterator; |
| 187 void FromFrameArray(Isolate* isolate, Handle<FrameArray> array, int frame_ix); |
| 188 |
| 189 bool is_at_number_conversion_; |
183 }; | 190 }; |
184 | 191 |
185 class FrameArrayIterator { | 192 class FrameArrayIterator { |
186 public: | 193 public: |
187 FrameArrayIterator(Isolate* isolate, Handle<FrameArray> array, | 194 FrameArrayIterator(Isolate* isolate, Handle<FrameArray> array, |
188 int frame_ix = 0); | 195 int frame_ix = 0); |
189 | 196 |
190 StackFrameBase* Frame(); | 197 StackFrameBase* Frame(); |
191 | 198 |
192 bool HasNext() const; | 199 bool HasNext() const; |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 711 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
705 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, | 712 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, |
706 Handle<Object> data); | 713 Handle<Object> data); |
707 }; | 714 }; |
708 | 715 |
709 | 716 |
710 } // namespace internal | 717 } // namespace internal |
711 } // namespace v8 | 718 } // namespace v8 |
712 | 719 |
713 #endif // V8_MESSAGES_H_ | 720 #endif // V8_MESSAGES_H_ |
OLD | NEW |