blob: 9b761f9040808f88e578c908572f2fea99077e13 [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 Murdoch4a90d5f2016-03-22 12:00:34 +000010#include "src/wasm/encoder.h"
11#include "src/zone.h"
12
13namespace v8 {
14namespace internal {
15
16class FunctionLiteral;
17
18namespace wasm {
19
20class AsmWasmBuilder {
21 public:
Ben Murdoch097c5b22016-05-18 11:27:45 +010022 explicit AsmWasmBuilder(Isolate* isolate, Zone* zone, FunctionLiteral* root,
23 Handle<Object> foreign);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000024 WasmModuleIndex* Run();
25
26 private:
27 Isolate* isolate_;
28 Zone* zone_;
29 FunctionLiteral* literal_;
Ben Murdoch097c5b22016-05-18 11:27:45 +010030 Handle<Object> foreign_;
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000031};
32} // namespace wasm
33} // namespace internal
34} // namespace v8
35
36#endif // V8_WASM_ASM_WASM_BUILDER_H_