10 #ifndef V8_MESSAGES_H_ 11 #define V8_MESSAGES_H_ 15 #include "src/handles.h" 16 #include "src/message-template.h" 27 class JSMessageObject;
29 class SharedFunctionInfo;
31 class WasmInstanceObject;
41 int start_pos()
const {
return start_pos_; }
42 int end_pos()
const {
return end_pos_; }
66 virtual int GetPosition()
const = 0;
68 virtual int GetLineNumber() = 0;
70 virtual int GetColumnNumber() = 0;
73 virtual int GetPromiseIndex()
const = 0;
75 virtual bool IsNative() = 0;
76 virtual bool IsToplevel() = 0;
77 virtual bool IsEval();
78 virtual bool IsAsync()
const = 0;
79 virtual bool IsPromiseAll()
const = 0;
80 virtual bool IsConstructor() = 0;
81 virtual bool IsStrict()
const = 0;
91 virtual bool HasScript()
const = 0;
111 int GetPosition()
const override;
112 int GetLineNumber()
override;
113 int GetColumnNumber()
override;
115 int GetPromiseIndex()
const override;
117 bool IsNative()
override;
118 bool IsToplevel()
override;
119 bool IsAsync()
const override {
return is_async_; }
120 bool IsPromiseAll()
const override {
return is_promise_all_; }
121 bool IsConstructor()
override {
return is_constructor_; }
122 bool IsStrict()
const override {
return is_strict_; }
130 bool HasScript()
const override;
139 bool is_constructor_ : 1;
140 bool is_promise_all_ : 1;
155 Handle<Object> GetScriptNameOrSourceUrl()
override {
return Null(); }
159 int GetPosition()
const override;
160 int GetLineNumber()
override {
return wasm_func_index_; }
161 int GetColumnNumber()
override {
return -1; }
163 int GetPromiseIndex()
const override {
return -1; }
165 bool IsNative()
override {
return false; }
166 bool IsToplevel()
override {
return false; }
167 bool IsAsync()
const override {
return false; }
168 bool IsPromiseAll()
const override {
return false; }
169 bool IsConstructor()
override {
return false; }
170 bool IsStrict()
const override {
return false; }
171 bool IsInterpreted()
const {
return code_ ==
nullptr; }
178 bool HasScript()
const override;
204 int GetPosition()
const override;
205 int GetLineNumber()
override;
206 int GetColumnNumber()
override;
215 bool is_at_number_conversion_;
225 bool HasNext()
const;
254 bool suppress_detailed_trace);
272 static const char* TemplateString(MessageTemplate index);
275 MessageTemplate index,
301 static std::unique_ptr<char[]> GetLocalizedMessage(
Isolate* isolate,
305 static void ReportMessageNoExceptions(
Isolate* isolate,
315 #endif // V8_MESSAGES_H_