blob: b99c3effa1e85b3b8ea29185ca31ba3ac379d5cc [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 Murdoch61f157c2016-09-16 13:49:30 +010024 AsmTyper* typer);
25 ZoneBuffer* Run(Handle<FixedArray>* foreign_args);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000026
27 private:
28 Isolate* isolate_;
29 Zone* zone_;
30 FunctionLiteral* literal_;
Ben Murdochda12d292016-06-02 14:46:10 +010031 AsmTyper* typer_;
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000032};
33} // namespace wasm
34} // namespace internal
35} // namespace v8
36
37#endif // V8_WASM_ASM_WASM_BUILDER_H_