// Copyright 2006-2008 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // The infrastructure used for (localized) message reporting in V8. // // Note: there's a big unresolved issue about ownership of the data // structures used by this framework. #ifndef V8_MESSAGES_H_ #define V8_MESSAGES_H_ // Forward declaration of MessageLocation. namespace v8 { namespace internal { class MessageLocation; } } // namespace v8::internal class V8Message { public: V8Message(char* type, v8::internal::Handle args, const v8::internal::MessageLocation* loc) : type_(type), args_(args), loc_(loc) { } char* type() const { return type_; } v8::internal::Handle args() const { return args_; } const v8::internal::MessageLocation* loc() const { return loc_; } private: char* type_; v8::internal::Handle const args_; const v8::internal::MessageLocation* loc_; }; namespace v8 { namespace internal { struct Language; class SourceInfo; class MessageLocation { public: MessageLocation(Handle