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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 | 90 |
91 class CallSite { | 91 class CallSite { |
92 public: | 92 public: |
93 CallSite(Handle<Object> receiver, Handle<JSFunction> fun, int pos) | 93 CallSite(Handle<Object> receiver, Handle<JSFunction> fun, int pos) |
94 : receiver_(receiver), fun_(fun), pos_(pos) {} | 94 : receiver_(receiver), fun_(fun), pos_(pos) {} |
95 | 95 |
96 Handle<Object> GetFileName(Isolate* isolate); | 96 Handle<Object> GetFileName(Isolate* isolate); |
97 Handle<Object> GetFunctionName(Isolate* isolate); | 97 Handle<Object> GetFunctionName(Isolate* isolate); |
98 Handle<Object> GetScriptNameOrSourceUrl(Isolate* isolate); | 98 Handle<Object> GetScriptNameOrSourceUrl(Isolate* isolate); |
| 99 Handle<Object> GetMethodName(Isolate* isolate); |
99 // Return 1-based line number, including line offset. | 100 // Return 1-based line number, including line offset. |
100 int GetLineNumber(Isolate* isolate); | 101 int GetLineNumber(Isolate* isolate); |
101 // Return 1-based column number, including column offset if first line. | 102 // Return 1-based column number, including column offset if first line. |
102 int GetColumnNumber(Isolate* isolate); | 103 int GetColumnNumber(Isolate* isolate); |
103 bool IsNative(Isolate* isolate); | 104 bool IsNative(Isolate* isolate); |
104 bool IsToplevel(Isolate* isolate); | 105 bool IsToplevel(Isolate* isolate); |
105 bool IsEval(Isolate* isolate); | 106 bool IsEval(Isolate* isolate); |
| 107 bool IsConstructor(Isolate* isolate); |
106 | 108 |
107 private: | 109 private: |
108 Handle<Object> receiver_; | 110 Handle<Object> receiver_; |
109 Handle<JSFunction> fun_; | 111 Handle<JSFunction> fun_; |
110 int pos_; | 112 int pos_; |
111 }; | 113 }; |
112 | 114 |
113 | 115 |
114 #define MESSAGE_TEMPLATES(T) \ | 116 #define MESSAGE_TEMPLATES(T) \ |
115 /* Error */ \ | 117 /* Error */ \ |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 }; | 242 }; |
241 | 243 |
242 static MaybeHandle<String> FormatMessage(int template_index, | 244 static MaybeHandle<String> FormatMessage(int template_index, |
243 Handle<String> arg0, | 245 Handle<String> arg0, |
244 Handle<String> arg1, | 246 Handle<String> arg1, |
245 Handle<String> arg2); | 247 Handle<String> arg2); |
246 }; | 248 }; |
247 } } // namespace v8::internal | 249 } } // namespace v8::internal |
248 | 250 |
249 #endif // V8_MESSAGES_H_ | 251 #endif // V8_MESSAGES_H_ |
OLD | NEW |