v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
wasm-js.cc File Reference
Include dependency graph for wasm-js.cc:

Go to the source code of this file.

Classes

class  v8::WasmStreaming::WasmStreamingImpl
 

Namespaces

namespace  v8
 
namespace  v8::internal
 
namespace  v8::internal::wasm
 

Macros

#define GET_FIRST_ARGUMENT_AS(Type)
 
#define EXTRACT_THIS(var, WasmType)
 
#define DEF_WASM_JS_EXTERNAL_REFERENCE(Name)
 

Functions

void v8::internal::ToUtf8Lossy (Isolate *isolate, DirectHandle< String > string, std::string &out)
 
static i::DirectHandle< i::FunctionTemplateInfov8::NewFunctionTemplate (i::Isolate *i_isolate, FunctionCallback func, bool has_prototype, SideEffectType side_effect_type=SideEffectType::kHasSideEffect)
 
static i::DirectHandle< i::ObjectTemplateInfov8::NewObjectTemplate (i::Isolate *i_isolate)
 
std::unique_ptr< WasmStreamingv8::internal::wasm::StartStreamingForTesting (Isolate *isolate, std::shared_ptr< wasm::CompilationResultResolver > resolver)
 

Macro Definition Documentation

◆ DEF_WASM_JS_EXTERNAL_REFERENCE

#define DEF_WASM_JS_EXTERNAL_REFERENCE ( Name)
Value:
void Name(const v8::FunctionCallbackInfo<v8::Value>& info) { \
Name##Impl(info); \
}

Definition at line 3211 of file wasm-js.cc.

◆ EXTRACT_THIS

#define EXTRACT_THIS ( var,
WasmType )
Value:
{ \
Utils::OpenDirectHandle(*info.This()); \
if (!Is##WasmType(*this_arg)) { \
thrower.TypeError("Receiver is not a %s", kName_##WasmType); \
return; \
} \
}
TNode< Object > this_arg
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
Definition casting.h:150

Definition at line 2525 of file wasm-js.cc.

◆ GET_FIRST_ARGUMENT_AS

#define GET_FIRST_ARGUMENT_AS ( Type)
Value:
i::MaybeDirectHandle<i::Wasm##Type##Object> GetFirstArgumentAs##Type( \
ErrorThrower* thrower) { \
i::DirectHandle<i::Object> arg0 = Utils::OpenDirectHandle(*info[0]); \
if (!IsWasm##Type##Object(*arg0)) { \
thrower->TypeError("Argument 0 must be a WebAssembly." #Type); \
return {}; \
} \
}

Definition at line 181 of file wasm-js.cc.