// the V8 DLL USING_V8_SHARED needs to be defined. When either building the V8
// static library or building a program which uses the V8 static library neither
// BUILDING_V8_SHARED nor USING_V8_SHARED should be defined.
-// The reason for having both EXPORT and EXPORT_INLINE is that classes which
-// have their code inside this header file needs to have __declspec(dllexport)
+// The reason for having both V8EXPORT and V8EXPORT_INLINE is that classes which
+// have their code inside this header file need to have __declspec(dllexport)
// when building the DLL but cannot have __declspec(dllimport) when building
// a program which uses the DLL.
#if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
#endif
#ifdef BUILDING_V8_SHARED
-#define EXPORT __declspec(dllexport)
-#define EXPORT_INLINE __declspec(dllexport)
+#define V8EXPORT __declspec(dllexport)
+#define V8EXPORT_INLINE __declspec(dllexport)
#elif USING_V8_SHARED
-#define EXPORT __declspec(dllimport)
-#define EXPORT_INLINE
+#define V8EXPORT __declspec(dllimport)
+#define V8EXPORT_INLINE
#else
-#define EXPORT
-#define EXPORT_INLINE
+#define V8EXPORT
+#define V8EXPORT_INLINE
#endif // BUILDING_V8_SHARED
#else // _WIN32
// the shared or static V8 library as there is on Windows. Therefore there is
// no checking of BUILDING_V8_SHARED and USING_V8_SHARED.
#if defined(__GNUC__) && (__GNUC__ >= 4)
-#define EXPORT __attribute__ ((visibility("default")))
-#define EXPORT_INLINE __attribute__ ((visibility("default")))
+#define V8EXPORT __attribute__ ((visibility("default")))
+#define V8EXPORT_INLINE __attribute__ ((visibility("default")))
#else // defined(__GNUC__) && (__GNUC__ >= 4)
-#define EXPORT
-#define EXPORT_INLINE
+#define V8EXPORT
+#define V8EXPORT_INLINE
#endif // defined(__GNUC__) && (__GNUC__ >= 4)
#endif // _WIN32
* behind the scenes and the same rules apply to these values as to
* their handles.
*/
-template <class T> class EXPORT_INLINE Handle {
+template <class T> class V8EXPORT_INLINE Handle {
public:
/**
* handle scope are destroyed when the handle scope is destroyed. Hence it
* is not necessary to explicitly deallocate local handles.
*/
-template <class T> class EXPORT_INLINE Local : public Handle<T> {
+template <class T> class V8EXPORT_INLINE Local : public Handle<T> {
public:
Local();
template <class S> inline Local(Local<S> that)
* different storage cells but rather two references to the same
* storage cell.
*/
-template <class T> class EXPORT_INLINE Persistent : public Handle<T> {
+template <class T> class V8EXPORT_INLINE Persistent : public Handle<T> {
public:
/**
* handle and may deallocate it. The behavior of accessing a handle
* for which the handle scope has been deleted is undefined.
*/
-class EXPORT HandleScope {
+class V8EXPORT HandleScope {
public:
HandleScope();
// This Data class is accessible internally through a typedef in the
// ImplementationUtilities class.
- class EXPORT Data {
+ class V8EXPORT Data {
public:
int extensions;
void** next;
/**
* The superclass of values and API object templates.
*/
-class EXPORT Data {
+class V8EXPORT Data {
private:
Data();
};
* compiling it, and can be stored between compilations. When script
* data is given to the compile method compilation will be faster.
*/
-class EXPORT ScriptData { // NOLINT
+class V8EXPORT ScriptData { // NOLINT
public:
virtual ~ScriptData() { }
static ScriptData* PreCompile(const char* input, int length);
/**
* The origin, within a file, of a script.
*/
-class EXPORT ScriptOrigin {
+class V8EXPORT ScriptOrigin {
public:
ScriptOrigin(Handle<Value> resource_name,
Handle<Integer> resource_line_offset = Handle<Integer>(),
/**
* A compiled JavaScript script.
*/
-class EXPORT Script {
+class V8EXPORT Script {
public:
/**
/**
* An error message.
*/
-class EXPORT Message {
+class V8EXPORT Message {
public:
Local<String> Get() const;
Local<String> GetSourceLine() const;
/**
* The superclass of all JavaScript values and objects.
*/
-class EXPORT Value : public Data {
+class V8EXPORT Value : public Data {
public:
/**
/**
* The superclass of primitive values. See ECMA-262 4.3.2.
*/
-class EXPORT Primitive : public Value { };
+class V8EXPORT Primitive : public Value { };
/**
* A primitive boolean value (ECMA-262, 4.3.14). Either the true
* or false value.
*/
-class EXPORT Boolean : public Primitive {
+class V8EXPORT Boolean : public Primitive {
public:
bool Value() const;
static inline Handle<Boolean> New(bool value);
/**
* A JavaScript string value (ECMA-262, 4.3.17).
*/
-class EXPORT String : public Primitive {
+class V8EXPORT String : public Primitive {
public:
/**
* ExternalStringResource to manage the life cycle of the underlying
* buffer. Note that the string data must be immutable.
*/
- class EXPORT ExternalStringResource { // NOLINT
+ class V8EXPORT ExternalStringResource { // NOLINT
public:
/**
* Override the destructor to manage the life cycle of the underlying
* Use String::New or convert to 16 bit data for non-ASCII.
*/
- class EXPORT ExternalAsciiStringResource { // NOLINT
+ class V8EXPORT ExternalAsciiStringResource { // NOLINT
public:
/**
* Override the destructor to manage the life cycle of the underlying
* Converts an object to a utf8-encoded character array. Useful if
* you want to print the object.
*/
- class EXPORT Utf8Value {
+ class V8EXPORT Utf8Value {
public:
explicit Utf8Value(Handle<v8::Value> obj);
~Utf8Value();
* Converts an object to an ascii string.
* Useful if you want to print the object.
*/
- class EXPORT AsciiValue {
+ class V8EXPORT AsciiValue {
public:
explicit AsciiValue(Handle<v8::Value> obj);
~AsciiValue();
/**
* Converts an object to a two-byte string.
*/
- class EXPORT Value {
+ class V8EXPORT Value {
public:
explicit Value(Handle<v8::Value> obj);
~Value();
/**
* A JavaScript number value (ECMA-262, 4.3.20)
*/
-class EXPORT Number : public Primitive {
+class V8EXPORT Number : public Primitive {
public:
double Value() const;
static Local<Number> New(double value);
/**
* A JavaScript value representing a signed integer.
*/
-class EXPORT Integer : public Number {
+class V8EXPORT Integer : public Number {
public:
static Local<Integer> New(int32_t value);
int64_t Value() const;
/**
* A JavaScript value representing a 32-bit signed integer.
*/
-class EXPORT Int32 : public Integer {
+class V8EXPORT Int32 : public Integer {
public:
int32_t Value() const;
private:
/**
* A JavaScript value representing a 32-bit unsigned integer.
*/
-class EXPORT Uint32 : public Integer {
+class V8EXPORT Uint32 : public Integer {
public:
uint32_t Value() const;
private:
/**
* An instance of the built-in Date constructor (ECMA-262, 15.9).
*/
-class EXPORT Date : public Value {
+class V8EXPORT Date : public Value {
public:
static Local<Value> New(double time);
/**
* A JavaScript object (ECMA-262, 4.3.3)
*/
-class EXPORT Object : public Value {
+class V8EXPORT Object : public Value {
public:
bool Set(Handle<Value> key,
Handle<Value> value,
/**
* An instance of the built-in array constructor (ECMA-262, 15.4.2).
*/
-class EXPORT Array : public Object {
+class V8EXPORT Array : public Object {
public:
uint32_t Length() const;
/**
* A JavaScript function object (ECMA-262, 15.3).
*/
-class EXPORT Function : public Object {
+class V8EXPORT Function : public Object {
public:
Local<Object> NewInstance() const;
Local<Object> NewInstance(int argc, Handle<Value> argv[]) const;
* mainly used to associate c++ data structures with JavaScript
* objects.
*/
-class EXPORT External : public Value {
+class V8EXPORT External : public Value {
public:
static Local<External> New(void* value);
static External* Cast(Value* obj);
/**
* The superclass of object and function templates.
*/
-class EXPORT Template : public Data {
+class V8EXPORT Template : public Data {
public:
/** Adds a property to each instance created by this template.*/
void Set(Handle<String> name, Handle<Data> value,
* including the receiver, the number and values of arguments, and
* the holder of the function.
*/
-class EXPORT Arguments {
+class V8EXPORT Arguments {
public:
inline int Length() const;
inline Local<Value> operator[](int i) const;
* The information passed to an accessor callback about the context
* of the property access.
*/
-class EXPORT AccessorInfo {
+class V8EXPORT AccessorInfo {
public:
inline AccessorInfo(Local<Object> self,
Local<Value> data,
* child_instance.instance_property == 3;
* \endcode
*/
-class EXPORT FunctionTemplate : public Template {
+class V8EXPORT FunctionTemplate : public Template {
public:
/** Creates a function template.*/
static Local<FunctionTemplate> New(
* Properties added to an ObjectTemplate are added to each object
* created from the ObjectTemplate.
*/
-class EXPORT ObjectTemplate : public Template {
+class V8EXPORT ObjectTemplate : public Template {
public:
/** Creates an ObjectTemplate. */
static Local<ObjectTemplate> New();
* A Signature specifies which receivers and arguments a function can
* legally be called with.
*/
-class EXPORT Signature : public Data {
+class V8EXPORT Signature : public Data {
public:
static Local<Signature> New(Handle<FunctionTemplate> receiver =
Handle<FunctionTemplate>(),
* A utility for determining the type of objects based on the template
* they were constructed from.
*/
-class EXPORT TypeSwitch : public Data {
+class V8EXPORT TypeSwitch : public Data {
public:
static Local<TypeSwitch> New(Handle<FunctionTemplate> type);
static Local<TypeSwitch> New(int argc, Handle<FunctionTemplate> types[]);
/**
* Ignore
*/
-class EXPORT Extension { // NOLINT
+class V8EXPORT Extension { // NOLINT
public:
Extension(const char* name,
const char* source = 0,
};
-void EXPORT RegisterExtension(Extension* extension);
+void V8EXPORT RegisterExtension(Extension* extension);
/**
* Ignore
*/
-class EXPORT DeclareExtension {
+class V8EXPORT DeclareExtension {
public:
inline DeclareExtension(Extension* extension) {
RegisterExtension(extension);
// --- S t a t i c s ---
-Handle<Primitive> EXPORT Undefined();
-Handle<Primitive> EXPORT Null();
-Handle<Boolean> EXPORT True();
-Handle<Boolean> EXPORT False();
+Handle<Primitive> V8EXPORT Undefined();
+Handle<Primitive> V8EXPORT Null();
+Handle<Boolean> V8EXPORT True();
+Handle<Boolean> V8EXPORT False();
/**
* A set of constraints that specifies the limits of the runtime's
* memory use.
*/
-class EXPORT ResourceConstraints {
+class V8EXPORT ResourceConstraints {
public:
ResourceConstraints();
int max_young_space_size() const { return max_young_space_size_; }
* operation; the caller must return immediately and only after the exception
* has been handled does it become legal to invoke JavaScript operations.
*/
-Handle<Value> EXPORT ThrowException(Handle<Value> exception);
+Handle<Value> V8EXPORT ThrowException(Handle<Value> exception);
/**
* Create new error objects by calling the corresponding error object
* constructor with the message.
*/
-class EXPORT Exception {
+class V8EXPORT Exception {
public:
static Local<Value> RangeError(Handle<String> message);
static Local<Value> ReferenceError(Handle<String> message);
/**
* Container class for static utility functions.
*/
-class EXPORT V8 {
+class V8EXPORT V8 {
public:
/** Set the callback to invoke in case of fatal errors. */
static void SetFatalErrorHandler(FatalErrorCallback that);
/**
* An external exception handler.
*/
-class EXPORT TryCatch {
+class V8EXPORT TryCatch {
public:
/**
/**
* Ignore
*/
-class EXPORT ExtensionConfiguration {
+class V8EXPORT ExtensionConfiguration {
public:
ExtensionConfiguration(int name_count, const char* names[])
: name_count_(name_count), names_(names) { }
* A sandboxed execution context with its own set of built-in objects
* and functions.
*/
-class EXPORT Context {
+class V8EXPORT Context {
public:
/** Returns the global object of the context. */
Local<Object> Global();
* Stack-allocated class which sets the execution context for all
* operations executed within a local scope.
*/
- class EXPORT Scope {
+ class V8EXPORT Scope {
public:
inline Scope(Handle<Context> context) : context_(context) {
context_->Enter();
* // V8 Now no longer locked.
* \endcode
*/
-class EXPORT Unlocker {
+class V8EXPORT Unlocker {
public:
Unlocker();
~Unlocker();
};
-class EXPORT Locker {
+class V8EXPORT Locker {
public:
Locker();
~Locker();
} // namespace v8
-#undef EXPORT
-#undef EXPORT_INLINE
+#undef V8EXPORT
+#undef V8EXPORT_INLINE
#undef TYPE_CHECK