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

Go to the source code of this file.

Classes

class  v8::internal::BuiltinArguments
 

Namespaces

namespace  v8
 
namespace  v8::internal
 

Macros

#define BUILTIN_RCS(name)
 
#define BUILTIN_NO_RCS(name)
 
#define BUILTIN(name)
 
#define CHECK_RECEIVER(Type, name, method)
 
#define TO_THIS_STRING(name, method)
 

Macro Definition Documentation

◆ BUILTIN

#define BUILTIN ( name)
Value:
#define BUILTIN_NO_RCS(name)

Definition at line 152 of file builtins-utils.h.

◆ BUILTIN_NO_RCS

#define BUILTIN_NO_RCS ( name)
Value:
V8_WARN_UNUSED_RESULT static Tagged<Object> Builtin_Impl_##name( \
BuiltinArguments args, Isolate* isolate); \
\
V8_WARN_UNUSED_RESULT Address Builtin_##name( \
int args_length, Address* args_object, Isolate* isolate) { \
DCHECK(isolate->context().is_null() || IsContext(isolate->context())); \
BuiltinArguments args(args_length, args_object); \
return BUILTIN_CONVERT_RESULT(Builtin_Impl_##name(args, isolate)); \
} \
\
V8_WARN_UNUSED_RESULT static Tagged<Object> Builtin_Impl_##name( \
BuiltinArguments args, Isolate* isolate)
const char * name
Definition builtins.cc:39
#define BUILTIN_CONVERT_RESULT(x)
Definition arguments.h:158
base::Vector< const DirectHandle< Object > > args
Definition execution.cc:74
#define V8_WARN_UNUSED_RESULT
Definition v8config.h:671

Definition at line 135 of file builtins-utils.h.

◆ BUILTIN_RCS

#define BUILTIN_RCS ( name)
Value:
V8_WARN_UNUSED_RESULT static Tagged<Object> Builtin_Impl_##name( \
BuiltinArguments args, Isolate* isolate); \
\
V8_NOINLINE static Address Builtin_Impl_Stats_##name( \
int args_length, Address* args_object, Isolate* isolate) { \
BuiltinArguments args(args_length, args_object); \
RCS_SCOPE(isolate, RuntimeCallCounterId::kBuiltin_##name); \
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.runtime"), \
"V8.Builtin_" #name); \
return BUILTIN_CONVERT_RESULT(Builtin_Impl_##name(args, isolate)); \
} \
\
V8_WARN_UNUSED_RESULT Address Builtin_##name( \
int args_length, Address* args_object, Isolate* isolate) { \
DCHECK(isolate->context().is_null() || IsContext(isolate->context())); \
if (V8_UNLIKELY(TracingFlags::is_runtime_stats_enabled())) { \
return Builtin_Impl_Stats_##name(args_length, args_object, isolate); \
} \
BuiltinArguments args(args_length, args_object); \
return BUILTIN_CONVERT_RESULT(Builtin_Impl_##name(args, isolate)); \
} \
\
V8_WARN_UNUSED_RESULT static Tagged<Object> Builtin_Impl_##name( \
BuiltinArguments args, Isolate* isolate)
#define TRACE_DISABLED_BY_DEFAULT(name)
#define V8_UNLIKELY(condition)
Definition v8config.h:660
#define V8_NOINLINE
Definition v8config.h:586

Definition at line 109 of file builtins-utils.h.

◆ CHECK_RECEIVER

#define CHECK_RECEIVER ( Type,
name,
method )
Value:
if (!Is##Type(*args.receiver())) { \
THROW_NEW_ERROR_RETURN_FAILURE( \
isolate, \
NewTypeError(MessageTemplate::kIncompatibleMethodReceiver, \
isolate->factory()->NewStringFromAsciiChecked(method), \
args.receiver())); \
} \
auto name = Cast<Type>(args.receiver())
Symbol method

Definition at line 156 of file builtins-utils.h.

◆ TO_THIS_STRING

#define TO_THIS_STRING ( name,
method )
Value:
if (IsNullOrUndefined(*args.receiver(), isolate)) { \
THROW_NEW_ERROR_RETURN_FAILURE( \
isolate, \
NewTypeError(MessageTemplate::kCalledOnNullOrUndefined, \
isolate->factory()->NewStringFromAsciiChecked(method))); \
} \
DirectHandle<String> name; \
ASSIGN_RETURN_FAILURE_ON_EXCEPTION( \
isolate, name, Object::ToString(isolate, args.receiver()))

Definition at line 169 of file builtins-utils.h.