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 #include "src/signature.h" | 5 #include "src/signature.h" |
6 | 6 |
7 #include "src/handles.h" | 7 #include "src/handles.h" |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 #include "src/zone/zone-containers.h" | 9 #include "src/zone/zone-containers.h" |
10 | 10 |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 } | 527 } |
528 } | 528 } |
529 | 529 |
530 void WasmModuleBuilder::WriteAsmJsOffsetTable(ZoneBuffer& buffer) const { | 530 void WasmModuleBuilder::WriteAsmJsOffsetTable(ZoneBuffer& buffer) const { |
531 // == Emit asm.js offset table =============================================== | 531 // == Emit asm.js offset table =============================================== |
532 buffer.write_size(functions_.size()); | 532 buffer.write_size(functions_.size()); |
533 // Emit the offset table per function. | 533 // Emit the offset table per function. |
534 for (auto function : functions_) { | 534 for (auto function : functions_) { |
535 function->WriteAsmWasmOffsetTable(buffer); | 535 function->WriteAsmWasmOffsetTable(buffer); |
536 } | 536 } |
| 537 // Append a 0 to indicate that this is an encoded table. |
| 538 buffer.write_u8(0); |
537 } | 539 } |
538 } // namespace wasm | 540 } // namespace wasm |
539 } // namespace internal | 541 } // namespace internal |
540 } // namespace v8 | 542 } // namespace v8 |
OLD | NEW |