| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_ASMJS_ASM_WASM_BUILDER_H_ | 5 #ifndef V8_ASMJS_ASM_WASM_BUILDER_H_ |
| 6 #define V8_ASMJS_ASM_WASM_BUILDER_H_ | 6 #define V8_ASMJS_ASM_WASM_BUILDER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/asmjs/asm-typer.h" | 9 #include "src/asmjs/asm-typer.h" |
| 10 #include "src/objects.h" | 10 #include "src/objects.h" |
| 11 #include "src/wasm/wasm-module-builder.h" | 11 #include "src/wasm/wasm-module-builder.h" |
| 12 #include "src/zone/zone.h" | 12 #include "src/zone/zone.h" |
| 13 | 13 |
| 14 namespace v8 { | 14 namespace v8 { |
| 15 namespace internal { | 15 namespace internal { |
| 16 | 16 |
| 17 class FunctionLiteral; | 17 class FunctionLiteral; |
| 18 class Script; |
| 18 | 19 |
| 19 namespace wasm { | 20 namespace wasm { |
| 20 | 21 |
| 21 class AsmWasmBuilder { | 22 class AsmWasmBuilder { |
| 22 public: | 23 public: |
| 23 explicit AsmWasmBuilder(Isolate* isolate, Zone* zone, FunctionLiteral* root, | 24 explicit AsmWasmBuilder(Isolate* isolate, Zone* zone, Script* script, |
| 24 AsmTyper* typer); | 25 FunctionLiteral* root); |
| 25 ZoneBuffer* Run(Handle<FixedArray>* foreign_args); | 26 ZoneBuffer* Run(Handle<FixedArray>* foreign_args); |
| 27 AsmTyper* typer() { return &typer_; } |
| 26 | 28 |
| 27 static const char* foreign_init_name; | 29 static const char* foreign_init_name; |
| 28 static const char* single_function_name; | 30 static const char* single_function_name; |
| 29 | 31 |
| 30 private: | 32 private: |
| 31 Isolate* isolate_; | 33 Isolate* isolate_; |
| 32 Zone* zone_; | 34 Zone* zone_; |
| 35 Script* script_; |
| 33 FunctionLiteral* literal_; | 36 FunctionLiteral* literal_; |
| 34 AsmTyper* typer_; | 37 AsmTyper typer_; |
| 35 }; | 38 }; |
| 36 } // namespace wasm | 39 } // namespace wasm |
| 37 } // namespace internal | 40 } // namespace internal |
| 38 } // namespace v8 | 41 } // namespace v8 |
| 39 | 42 |
| 40 #endif // V8_WASM_ASM_WASM_BUILDER_H_ | 43 #endif // V8_WASM_ASM_WASM_BUILDER_H_ |
| OLD | NEW |