v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
message-macros.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  v8
 
namespace  v8::internal
 
namespace  v8::internal::torque
 
namespace  v8::internal::torque::ls
 

Macros

#define JSON_STRING_ACCESSORS(name)
 
#define JSON_BOOL_ACCESSORS(name)
 
#define JSON_INT_ACCESSORS(name)
 
#define JSON_OBJECT_ACCESSORS(type, name)
 
#define JSON_DYNAMIC_OBJECT_ACCESSORS(name)
 
#define JSON_ARRAY_OBJECT_ACCESSORS(type, name)
 

Macro Definition Documentation

◆ JSON_ARRAY_OBJECT_ACCESSORS

#define JSON_ARRAY_OBJECT_ACCESSORS ( type,
name )
Value:
inline type add_##name() { \
JsonObject& new_element = AddObjectElementToArrayProperty(#name); \
return type(new_element); \
} \
inline std::size_t name##_size() { return GetArrayProperty(#name).size(); } \
inline type name(size_t idx) { \
CHECK(idx < name##_size()); \
return type(GetArrayProperty(#name)[idx].ToObject()); \
}
const char * name
Definition builtins.cc:39
wasm::ValueType type

Definition at line 43 of file message-macros.h.

◆ JSON_BOOL_ACCESSORS

#define JSON_BOOL_ACCESSORS ( name)
Value:
inline bool name() const { return object().at(#name).ToBool(); } \
inline void set_##name(bool b) { object()[#name] = JsonValue::From(b); }
ZoneVector< InstructionOperand > * set_

Definition at line 24 of file message-macros.h.

◆ JSON_DYNAMIC_OBJECT_ACCESSORS

#define JSON_DYNAMIC_OBJECT_ACCESSORS ( name)
Value:
template <class T> \
inline T name() { \
return GetObject<T>(#name); \
}

Definition at line 37 of file message-macros.h.

◆ JSON_INT_ACCESSORS

#define JSON_INT_ACCESSORS ( name)
Value:
inline int name() const { return object().at(#name).ToNumber(); } \
inline void set_##name(int n) { \
object()[#name] = JsonValue::From(static_cast<double>(n)); \
}

Definition at line 28 of file message-macros.h.

◆ JSON_OBJECT_ACCESSORS

#define JSON_OBJECT_ACCESSORS ( type,
name )
Value:
inline type name() { return GetObject<type>(#name); }

Definition at line 34 of file message-macros.h.

◆ JSON_STRING_ACCESSORS

#define JSON_STRING_ACCESSORS ( name)
Value:
inline const std::string& name() const { \
return object().at(#name).ToString(); \
} \
inline void set_##name(const std::string& str) { \
object()[#name] = JsonValue::From(str); \
} \
inline bool has_##name() const { \
return object().find(#name) != object().end(); \
}

Definition at line 13 of file message-macros.h.