v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
asm-js.h
Go to the documentation of this file.
1// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_ASMJS_ASM_JS_H_
6#define V8_ASMJS_ASM_JS_H_
7
8// Clients of this interface shouldn't depend on lots of asmjs internals.
9// Do not include anything from src/asmjs here!
10#include <memory>
11
12#include "src/common/globals.h"
13
14namespace v8 {
15namespace internal {
16
17class AccountingAllocator;
18class AsmWasmData;
19class FunctionLiteral;
20class JSArrayBuffer;
21class ParseInfo;
22class SharedFunctionInfo;
23class UnoptimizedCompilationJob;
24
25// Interface to compile and instantiate for asm.js modules.
26class AsmJs {
27 public:
28 static std::unique_ptr<UnoptimizedCompilationJob> NewCompilationJob(
29 ParseInfo* parse_info, FunctionLiteral* literal,
30 AccountingAllocator* allocator);
35
36 // Special export name used to indicate that the module exports a single
37 // function instead of a JavaScript object holding multiple functions.
38 static const char* const kSingleFunctionName;
39};
40
41} // namespace internal
42} // namespace v8
43
44#endif // V8_ASMJS_ASM_JS_H_
static const char *const kSingleFunctionName
Definition asm-js.h:38
static MaybeDirectHandle< Object > InstantiateAsmWasm(Isolate *isolate, DirectHandle< SharedFunctionInfo >, DirectHandle< AsmWasmData > wasm_data, DirectHandle< JSReceiver > stdlib, DirectHandle< JSReceiver > foreign, DirectHandle< JSArrayBuffer > memory)
Definition asm-js.cc:335
static std::unique_ptr< UnoptimizedCompilationJob > NewCompilationJob(ParseInfo *parse_info, FunctionLiteral *literal, AccountingAllocator *allocator)
Definition asm-js.cc:305
FunctionLiteral * literal
Definition liveedit.cc:294