Chromium Code Reviews| 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_WASM_MODULE_H_ | 5 #ifndef V8_WASM_MODULE_H_ |
| 6 #define V8_WASM_MODULE_H_ | 6 #define V8_WASM_MODULE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/api.h" | 10 #include "src/api.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 176 uint32_t num_exported_functions = 0; // number of exported functions. | 176 uint32_t num_exported_functions = 0; // number of exported functions. |
| 177 WireBytesRef name = {0, 0}; // module name, if any. | 177 WireBytesRef name = {0, 0}; // module name, if any. |
| 178 // TODO(wasm): Add url here, for spec'ed location information. | 178 // TODO(wasm): Add url here, for spec'ed location information. |
| 179 std::vector<FunctionSig*> signatures; // signatures in this module. | 179 std::vector<FunctionSig*> signatures; // signatures in this module. |
| 180 std::vector<WasmFunction> functions; // functions in this module. | 180 std::vector<WasmFunction> functions; // functions in this module. |
| 181 std::vector<WasmDataSegment> data_segments; // data segments in this module. | 181 std::vector<WasmDataSegment> data_segments; // data segments in this module. |
| 182 std::vector<WasmIndirectFunctionTable> function_tables; // function tables. | 182 std::vector<WasmIndirectFunctionTable> function_tables; // function tables. |
| 183 std::vector<WasmImport> import_table; // import table. | 183 std::vector<WasmImport> import_table; // import table. |
| 184 std::vector<WasmExport> export_table; // export table. | 184 std::vector<WasmExport> export_table; // export table. |
| 185 std::vector<WasmTableInit> table_inits; // initializations of tables | 185 std::vector<WasmTableInit> table_inits; // initializations of tables |
| 186 // We store the semaphore here to extend its lifetime. In <libc-2.21, which we | |
| 187 // use on the try bots, semaphore::Wait() can return while some compilation | |
| 188 // tasks are still executing semaphore::Signal(). If the semaphore is cleaned | |
| 189 // up right after semaphore::Wait() returns, then this can cause an | |
| 190 // invalid-semaphore error in the compilation tasks. | |
| 191 // TODO(wasm): Move this semaphore back to CompileInParallel when the try bots | |
| 192 // switch to libc-2.21 or higher. | |
|
Clemens Hammacher
2017/06/28 11:55:37
I assume you checked that all bots use libc >= 2.2
Clemens Hammacher
2017/06/28 11:57:45
Oh, IC, this field is completely dead now :)
ahaas
2017/06/28 11:58:28
it's more that the semaphore is not used anymore.
| |
| 193 std::unique_ptr<base::Semaphore> pending_tasks; | |
| 194 | 186 |
| 195 WasmModule() : WasmModule(nullptr) {} | 187 WasmModule() : WasmModule(nullptr) {} |
| 196 WasmModule(std::unique_ptr<Zone> owned); | 188 WasmModule(std::unique_ptr<Zone> owned); |
| 197 | 189 |
| 198 ModuleOrigin get_origin() const { return origin_; } | 190 ModuleOrigin get_origin() const { return origin_; } |
| 199 void set_origin(ModuleOrigin new_value) { origin_ = new_value; } | 191 void set_origin(ModuleOrigin new_value) { origin_ = new_value; } |
| 200 bool is_wasm() const { return origin_ == kWasmOrigin; } | 192 bool is_wasm() const { return origin_ == kWasmOrigin; } |
| 201 bool is_asm_js() const { return origin_ == kAsmJsOrigin; } | 193 bool is_asm_js() const { return origin_ == kAsmJsOrigin; } |
| 202 | 194 |
| 203 private: | 195 private: |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 528 int instance_count); | 520 int instance_count); |
| 529 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); | 521 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); |
| 530 void ValidateOrphanedInstance(Isolate* isolate, | 522 void ValidateOrphanedInstance(Isolate* isolate, |
| 531 Handle<WasmInstanceObject> instance); | 523 Handle<WasmInstanceObject> instance); |
| 532 } // namespace testing | 524 } // namespace testing |
| 533 } // namespace wasm | 525 } // namespace wasm |
| 534 } // namespace internal | 526 } // namespace internal |
| 535 } // namespace v8 | 527 } // namespace v8 |
| 536 | 528 |
| 537 #endif // V8_WASM_MODULE_H_ | 529 #endif // V8_WASM_MODULE_H_ |
| OLD | NEW |