| 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 28 matching lines...) Expand all Loading... |
| 39 private: | 39 private: |
| 40 Handle<Script> script_; | 40 Handle<Script> script_; |
| 41 int start_pos_; | 41 int start_pos_; |
| 42 int end_pos_; | 42 int end_pos_; |
| 43 Handle<JSFunction> function_; | 43 Handle<JSFunction> function_; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 | 46 |
| 47 class CallSite { | 47 class CallSite { |
| 48 public: | 48 public: |
| 49 CallSite(Handle<Object> receiver, Handle<JSFunction> fun, int pos) | 49 CallSite(Isolate* isolate, Handle<JSObject> call_site_obj); |
| 50 : receiver_(receiver), fun_(fun), pos_(pos) {} | |
| 51 | 50 |
| 52 Handle<Object> GetFileName(Isolate* isolate); | 51 Handle<Object> GetFileName(); |
| 53 Handle<Object> GetFunctionName(Isolate* isolate); | 52 Handle<Object> GetFunctionName(); |
| 54 Handle<Object> GetScriptNameOrSourceUrl(Isolate* isolate); | 53 Handle<Object> GetScriptNameOrSourceUrl(); |
| 55 Handle<Object> GetMethodName(Isolate* isolate); | 54 Handle<Object> GetMethodName(); |
| 56 // Return 1-based line number, including line offset. | 55 // Return 1-based line number, including line offset. |
| 57 int GetLineNumber(Isolate* isolate); | 56 int GetLineNumber(); |
| 58 // Return 1-based column number, including column offset if first line. | 57 // Return 1-based column number, including column offset if first line. |
| 59 int GetColumnNumber(Isolate* isolate); | 58 int GetColumnNumber(); |
| 60 bool IsNative(Isolate* isolate); | 59 bool IsNative(); |
| 61 bool IsToplevel(Isolate* isolate); | 60 bool IsToplevel(); |
| 62 bool IsEval(Isolate* isolate); | 61 bool IsEval(); |
| 63 bool IsConstructor(Isolate* isolate); | 62 bool IsConstructor(); |
| 64 | 63 |
| 65 private: | 64 private: |
| 65 Isolate* isolate_; |
| 66 Handle<Object> receiver_; | 66 Handle<Object> receiver_; |
| 67 Handle<JSFunction> fun_; | 67 Handle<JSFunction> fun_; |
| 68 int pos_; | 68 int pos_; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 | 71 |
| 72 #define MESSAGE_TEMPLATES(T) \ | 72 #define MESSAGE_TEMPLATES(T) \ |
| 73 /* Error */ \ | 73 /* Error */ \ |
| 74 T(None, "") \ | 74 T(None, "") \ |
| 75 T(CyclicProto, "Cyclic __proto__ value") \ | 75 T(CyclicProto, "Cyclic __proto__ value") \ |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 | 480 |
| 481 static MUST_USE_RESULT MaybeHandle<String> GetStringifiedProperty( | 481 static MUST_USE_RESULT MaybeHandle<String> GetStringifiedProperty( |
| 482 Isolate* isolate, LookupIterator* property_lookup, | 482 Isolate* isolate, LookupIterator* property_lookup, |
| 483 Handle<String> default_value); | 483 Handle<String> default_value); |
| 484 | 484 |
| 485 List<Handle<JSObject> > visited_; | 485 List<Handle<JSObject> > visited_; |
| 486 }; | 486 }; |
| 487 } } // namespace v8::internal | 487 } } // namespace v8::internal |
| 488 | 488 |
| 489 #endif // V8_MESSAGES_H_ | 489 #endif // V8_MESSAGES_H_ |
| OLD | NEW |