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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // Return 1-based column number, including column offset if first line. | 55 // Return 1-based column number, including column offset if first line. |
56 int GetColumnNumber(); | 56 int GetColumnNumber(); |
57 bool IsNative(); | 57 bool IsNative(); |
58 bool IsToplevel(); | 58 bool IsToplevel(); |
59 bool IsEval(); | 59 bool IsEval(); |
60 bool IsConstructor(); | 60 bool IsConstructor(); |
61 | 61 |
62 bool IsJavaScript() { return !fun_.is_null(); } | 62 bool IsJavaScript() { return !fun_.is_null(); } |
63 bool IsWasm() { return !wasm_obj_.is_null(); } | 63 bool IsWasm() { return !wasm_obj_.is_null(); } |
64 | 64 |
| 65 int wasm_func_index() const { return wasm_func_index_; } |
| 66 |
65 private: | 67 private: |
66 Isolate* isolate_; | 68 Isolate* isolate_; |
67 Handle<Object> receiver_; | 69 Handle<Object> receiver_; |
68 Handle<JSFunction> fun_; | 70 Handle<JSFunction> fun_; |
69 int32_t pos_ = -1; | 71 int32_t pos_ = -1; |
70 Handle<JSObject> wasm_obj_; | 72 Handle<JSObject> wasm_obj_; |
71 uint32_t wasm_func_index_ = static_cast<uint32_t>(-1); | 73 uint32_t wasm_func_index_ = static_cast<uint32_t>(-1); |
72 }; | 74 }; |
73 | 75 |
74 // Formats a textual stack trace from the given structured stack trace. | 76 // Formats a textual stack trace from the given structured stack trace. |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 557 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
556 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 558 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
557 Handle<Object> data); | 559 Handle<Object> data); |
558 }; | 560 }; |
559 | 561 |
560 | 562 |
561 } // namespace internal | 563 } // namespace internal |
562 } // namespace v8 | 564 } // namespace v8 |
563 | 565 |
564 #endif // V8_MESSAGES_H_ | 566 #endif // V8_MESSAGES_H_ |
OLD | NEW |