| 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_COMPILER_WASM_COMPILER_H_ | 5 #ifndef V8_COMPILER_WASM_COMPILER_H_ |
| 6 #define V8_COMPILER_WASM_COMPILER_H_ | 6 #define V8_COMPILER_WASM_COMPILER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 // Clients of this interface shouldn't depend on lots of compiler internals. | 10 // Clients of this interface shouldn't depend on lots of compiler internals. |
| 9 // Do not include anything from src/compiler here! | 11 // Do not include anything from src/compiler here! |
| 10 #include "src/compiler.h" | 12 #include "src/compiler.h" |
| 11 #include "src/wasm/wasm-opcodes.h" | 13 #include "src/wasm/wasm-opcodes.h" |
| 12 #include "src/wasm/wasm-result.h" | 14 #include "src/wasm/wasm-result.h" |
| 13 #include "src/zone.h" | 15 #include "src/zone.h" |
| 14 | 16 |
| 15 namespace v8 { | 17 namespace v8 { |
| 16 namespace internal { | 18 namespace internal { |
| 17 | 19 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 62 } |
| 61 | 63 |
| 62 private: | 64 private: |
| 63 SourcePositionTable* BuildGraphForWasmFunction(double* decode_ms); | 65 SourcePositionTable* BuildGraphForWasmFunction(double* decode_ms); |
| 64 | 66 |
| 65 wasm::ErrorThrower* thrower_; | 67 wasm::ErrorThrower* thrower_; |
| 66 Isolate* isolate_; | 68 Isolate* isolate_; |
| 67 wasm::ModuleEnv* module_env_; | 69 wasm::ModuleEnv* module_env_; |
| 68 const wasm::WasmFunction* function_; | 70 const wasm::WasmFunction* function_; |
| 69 // The graph zone is deallocated at the end of ExecuteCompilation. | 71 // The graph zone is deallocated at the end of ExecuteCompilation. |
| 70 base::SmartPointer<Zone> graph_zone_; | 72 std::unique_ptr<Zone> graph_zone_; |
| 71 JSGraph* jsgraph_; | 73 JSGraph* jsgraph_; |
| 72 Zone compilation_zone_; | 74 Zone compilation_zone_; |
| 73 CompilationInfo info_; | 75 CompilationInfo info_; |
| 74 base::SmartPointer<CompilationJob> job_; | 76 std::unique_ptr<CompilationJob> job_; |
| 75 uint32_t index_; | 77 uint32_t index_; |
| 76 wasm::Result<wasm::DecodeStruct*> graph_construction_result_; | 78 wasm::Result<wasm::DecodeStruct*> graph_construction_result_; |
| 77 bool ok_; | 79 bool ok_; |
| 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(WasmCompilationUnit); |
| 78 }; | 82 }; |
| 79 | 83 |
| 80 // Wraps a JS function, producing a code object that can be called from WASM. | 84 // Wraps a JS function, producing a code object that can be called from WASM. |
| 81 Handle<Code> CompileWasmToJSWrapper(Isolate* isolate, | 85 Handle<Code> CompileWasmToJSWrapper(Isolate* isolate, |
| 82 Handle<JSFunction> function, | 86 Handle<JSFunction> function, |
| 83 wasm::FunctionSig* sig, uint32_t index, | 87 wasm::FunctionSig* sig, uint32_t index, |
| 84 Handle<String> import_module, | 88 Handle<String> import_module, |
| 85 MaybeHandle<String> import_function); | 89 MaybeHandle<String> import_function); |
| 86 | 90 |
| 87 // Wraps a given wasm code object, producing a code object. | 91 // Wraps a given wasm code object, producing a code object. |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 } | 367 } |
| 364 | 368 |
| 365 // Simd helper functions | 369 // Simd helper functions |
| 366 MachineOperatorBuilder* simd(); | 370 MachineOperatorBuilder* simd(); |
| 367 }; | 371 }; |
| 368 } // namespace compiler | 372 } // namespace compiler |
| 369 } // namespace internal | 373 } // namespace internal |
| 370 } // namespace v8 | 374 } // namespace v8 |
| 371 | 375 |
| 372 #endif // V8_COMPILER_WASM_COMPILER_H_ | 376 #endif // V8_COMPILER_WASM_COMPILER_H_ |
| OLD | NEW |