| 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; | |
| 167 }; | 166 }; |
| 168 | 167 |
| 169 class AsmJsWasmStackFrame : public WasmStackFrame { | 168 class AsmJsWasmStackFrame : public WasmStackFrame { |
| 170 public: | 169 public: |
| 171 virtual ~AsmJsWasmStackFrame() {} | 170 virtual ~AsmJsWasmStackFrame() {} |
| 172 | 171 |
| 173 Handle<Object> GetReceiver() const override; | 172 Handle<Object> GetReceiver() const override; |
| 174 Handle<Object> GetFunction() const override; | 173 Handle<Object> GetFunction() const override; |
| 175 | 174 |
| 176 Handle<Object> GetFileName() override; | 175 Handle<Object> GetFileName() override; |
| 177 Handle<Object> GetScriptNameOrSourceUrl() override; | 176 Handle<Object> GetScriptNameOrSourceUrl() override; |
| 178 | 177 |
| 179 int GetPosition() const override; | 178 int GetPosition() const override; |
| 180 int GetLineNumber() override; | 179 int GetLineNumber() override; |
| 181 int GetColumnNumber() override; | 180 int GetColumnNumber() override; |
| 182 | 181 |
| 183 MaybeHandle<String> ToString() override; | 182 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_; | |
| 190 }; | 183 }; |
| 191 | 184 |
| 192 class FrameArrayIterator { | 185 class FrameArrayIterator { |
| 193 public: | 186 public: |
| 194 FrameArrayIterator(Isolate* isolate, Handle<FrameArray> array, | 187 FrameArrayIterator(Isolate* isolate, Handle<FrameArray> array, |
| 195 int frame_ix = 0); | 188 int frame_ix = 0); |
| 196 | 189 |
| 197 StackFrameBase* Frame(); | 190 StackFrameBase* Frame(); |
| 198 | 191 |
| 199 bool HasNext() const; | 192 bool HasNext() const; |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 708 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
| 716 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, | 709 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, |
| 717 Handle<Object> data); | 710 Handle<Object> data); |
| 718 }; | 711 }; |
| 719 | 712 |
| 720 | 713 |
| 721 } // namespace internal | 714 } // namespace internal |
| 722 } // namespace v8 | 715 } // namespace v8 |
| 723 | 716 |
| 724 #endif // V8_MESSAGES_H_ | 717 #endif // V8_MESSAGES_H_ |
| OLD | NEW |