blob: 09645ee3c412d456db0f508aabef03af9ef59bee [file] [log] [blame]
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001// Copyright 2015 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_WASM_ASM_WASM_BUILDER_H_
6#define V8_WASM_ASM_WASM_BUILDER_H_
7
8#include "src/allocation.h"
Ben Murdoch097c5b22016-05-18 11:27:45 +01009#include "src/objects.h"
Ben Murdochda12d292016-06-02 14:46:10 +010010#include "src/typing-asm.h"
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000011#include "src/wasm/encoder.h"
12#include "src/zone.h"
13
14namespace v8 {
15namespace internal {
16
17class FunctionLiteral;
18
19namespace wasm {
20
21class AsmWasmBuilder {
22 public:
Ben Murdoch097c5b22016-05-18 11:27:45 +010023 explicit AsmWasmBuilder(Isolate* isolate, Zone* zone, FunctionLiteral* root,
Ben Murdochda12d292016-06-02 14:46:10 +010024 Handle<Object> foreign, AsmTyper* typer);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000025 WasmModuleIndex* Run();
26
27 private:
28 Isolate* isolate_;
29 Zone* zone_;
30 FunctionLiteral* literal_;
Ben Murdoch097c5b22016-05-18 11:27:45 +010031 Handle<Object> foreign_;
Ben Murdochda12d292016-06-02 14:46:10 +010032 AsmTyper* typer_;
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000033};
34} // namespace wasm
35} // namespace internal
36} // namespace v8
37
38#endif // V8_WASM_ASM_WASM_BUILDER_H_