| 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_ |
| 11 #define V8_MESSAGES_H_ | 11 #define V8_MESSAGES_H_ |
| 12 | 12 |
| 13 #include <memory> | 13 #include <memory> |
| 14 | 14 |
| 15 #include "src/handles.h" | 15 #include "src/handles.h" |
| 16 #include "src/list.h" | 16 #include "src/list.h" |
| 17 | 17 |
| 18 namespace v8 { | 18 namespace v8 { |
| 19 namespace internal { | 19 namespace internal { |
| 20 | 20 |
| 21 // Forward declarations. | 21 // Forward declarations. |
| 22 class AbstractCode; | 22 class AbstractCode; |
| 23 class FrameArray; | 23 class FrameArray; |
| 24 class JSMessageObject; | 24 class JSMessageObject; |
| 25 class LookupIterator; | 25 class LookupIterator; |
| 26 class SharedFunctionInfo; |
| 26 class SourceInfo; | 27 class SourceInfo; |
| 27 | 28 |
| 28 class MessageLocation { | 29 class MessageLocation { |
| 29 public: | 30 public: |
| 30 MessageLocation(Handle<Script> script, int start_pos, int end_pos); | 31 MessageLocation(Handle<Script> script, int start_pos, int end_pos); |
| 31 MessageLocation(Handle<Script> script, int start_pos, int end_pos, | 32 MessageLocation(Handle<Script> script, int start_pos, int end_pos, |
| 32 Handle<JSFunction> function); | 33 Handle<SharedFunctionInfo> shared); |
| 33 MessageLocation(); | 34 MessageLocation(); |
| 34 | 35 |
| 35 Handle<Script> script() const { return script_; } | 36 Handle<Script> script() const { return script_; } |
| 36 int start_pos() const { return start_pos_; } | 37 int start_pos() const { return start_pos_; } |
| 37 int end_pos() const { return end_pos_; } | 38 int end_pos() const { return end_pos_; } |
| 38 Handle<JSFunction> function() const { return function_; } | 39 Handle<SharedFunctionInfo> shared() const { return shared_; } |
| 39 | 40 |
| 40 private: | 41 private: |
| 41 Handle<Script> script_; | 42 Handle<Script> script_; |
| 42 int start_pos_; | 43 int start_pos_; |
| 43 int end_pos_; | 44 int end_pos_; |
| 44 Handle<JSFunction> function_; | 45 Handle<SharedFunctionInfo> shared_; |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 class StackFrameBase { | 48 class StackFrameBase { |
| 48 public: | 49 public: |
| 49 virtual ~StackFrameBase() {} | 50 virtual ~StackFrameBase() {} |
| 50 | 51 |
| 51 virtual Handle<Object> GetReceiver() const = 0; | 52 virtual Handle<Object> GetReceiver() const = 0; |
| 52 virtual Handle<Object> GetFunction() const = 0; | 53 virtual Handle<Object> GetFunction() const = 0; |
| 53 | 54 |
| 54 virtual Handle<Object> GetFileName() = 0; | 55 virtual Handle<Object> GetFileName() = 0; |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 const MessageLocation* loc, | 731 const MessageLocation* loc, |
| 731 Handle<Object> message_obj, | 732 Handle<Object> message_obj, |
| 732 v8::Local<v8::Value> api_exception_obj); | 733 v8::Local<v8::Value> api_exception_obj); |
| 733 }; | 734 }; |
| 734 | 735 |
| 735 | 736 |
| 736 } // namespace internal | 737 } // namespace internal |
| 737 } // namespace v8 | 738 } // namespace v8 |
| 738 | 739 |
| 739 #endif // V8_MESSAGES_H_ | 740 #endif // V8_MESSAGES_H_ |
| OLD | NEW |