| 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> | 8 #include <memory> |
| 9 | 9 |
| 10 // 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. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 wasm::ModuleBytesEnv* module_env, | 61 wasm::ModuleBytesEnv* module_env, |
| 62 const wasm::WasmFunction* function) { | 62 const wasm::WasmFunction* function) { |
| 63 WasmCompilationUnit unit(thrower, isolate, module_env, function, | 63 WasmCompilationUnit unit(thrower, isolate, module_env, function, |
| 64 function->func_index); | 64 function->func_index); |
| 65 unit.ExecuteCompilation(); | 65 unit.ExecuteCompilation(); |
| 66 return unit.FinishCompilation(); | 66 return unit.FinishCompilation(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 SourcePositionTable* BuildGraphForWasmFunction(double* decode_ms); | 70 SourcePositionTable* BuildGraphForWasmFunction(double* decode_ms); |
| 71 char* GetTaggedFunctionName(const wasm::WasmFunction* function); |
| 71 | 72 |
| 72 wasm::ErrorThrower* thrower_; | 73 wasm::ErrorThrower* thrower_; |
| 73 Isolate* isolate_; | 74 Isolate* isolate_; |
| 74 wasm::ModuleBytesEnv* module_env_; | 75 wasm::ModuleBytesEnv* module_env_; |
| 75 const wasm::WasmFunction* function_; | 76 const wasm::WasmFunction* function_; |
| 77 // Function name is tagged with uint32 func_index - wasm#<func_index> |
| 78 char function_name_[16]; |
| 76 // The graph zone is deallocated at the end of ExecuteCompilation. | 79 // The graph zone is deallocated at the end of ExecuteCompilation. |
| 77 std::unique_ptr<Zone> graph_zone_; | 80 std::unique_ptr<Zone> graph_zone_; |
| 78 JSGraph* jsgraph_; | 81 JSGraph* jsgraph_; |
| 79 Zone compilation_zone_; | 82 Zone compilation_zone_; |
| 80 CompilationInfo info_; | 83 CompilationInfo info_; |
| 81 std::unique_ptr<CompilationJob> job_; | 84 std::unique_ptr<CompilationJob> job_; |
| 82 uint32_t index_; | 85 uint32_t index_; |
| 83 wasm::Result<wasm::DecodeStruct*> graph_construction_result_; | 86 wasm::Result<wasm::DecodeStruct*> graph_construction_result_; |
| 84 bool ok_; | 87 bool ok_; |
| 85 ZoneVector<trap_handler::ProtectedInstructionData> | 88 ZoneVector<trap_handler::ProtectedInstructionData> |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 } | 388 } |
| 386 | 389 |
| 387 int AddParameterNodes(Node** args, int pos, int param_count, | 390 int AddParameterNodes(Node** args, int pos, int param_count, |
| 388 wasm::FunctionSig* sig); | 391 wasm::FunctionSig* sig); |
| 389 }; | 392 }; |
| 390 } // namespace compiler | 393 } // namespace compiler |
| 391 } // namespace internal | 394 } // namespace internal |
| 392 } // namespace v8 | 395 } // namespace v8 |
| 393 | 396 |
| 394 #endif // V8_COMPILER_WASM_COMPILER_H_ | 397 #endif // V8_COMPILER_WASM_COMPILER_H_ |
| OLD | NEW |