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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 buffer.write_size(indirect_functions_.size()); | 357 buffer.write_size(indirect_functions_.size()); |
358 FixupSection(buffer, start); | 358 FixupSection(buffer, start); |
359 } | 359 } |
360 | 360 |
361 // == emit memory declaration ================================================ | 361 // == emit memory declaration ================================================ |
362 { | 362 { |
363 size_t start = EmitSection(kMemorySectionCode, buffer); | 363 size_t start = EmitSection(kMemorySectionCode, buffer); |
364 buffer.write_u8(1); // memory count | 364 buffer.write_u8(1); // memory count |
365 buffer.write_u32v(kResizableMaximumFlag); | 365 buffer.write_u32v(kResizableMaximumFlag); |
366 buffer.write_u32v(16); // min memory size | 366 buffer.write_u32v(16); // min memory size |
367 buffer.write_u32v(16); // max memory size | 367 buffer.write_u32v(32); // max memory size |
368 FixupSection(buffer, start); | 368 FixupSection(buffer, start); |
369 } | 369 } |
370 | 370 |
371 // == Emit globals =========================================================== | 371 // == Emit globals =========================================================== |
372 if (globals_.size() > 0) { | 372 if (globals_.size() > 0) { |
373 size_t start = EmitSection(kGlobalSectionCode, buffer); | 373 size_t start = EmitSection(kGlobalSectionCode, buffer); |
374 buffer.write_size(globals_.size()); | 374 buffer.write_size(globals_.size()); |
375 | 375 |
376 for (auto global : globals_) { | 376 for (auto global : globals_) { |
377 buffer.write_u8(WasmOpcodes::LocalTypeCodeFor(global.type)); | 377 buffer.write_u8(WasmOpcodes::LocalTypeCodeFor(global.type)); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 // == Emit asm.js offset table =============================================== | 526 // == Emit asm.js offset table =============================================== |
527 buffer.write_size(functions_.size()); | 527 buffer.write_size(functions_.size()); |
528 // Emit the offset table per function. | 528 // Emit the offset table per function. |
529 for (auto function : functions_) { | 529 for (auto function : functions_) { |
530 function->WriteAsmWasmOffsetTable(buffer); | 530 function->WriteAsmWasmOffsetTable(buffer); |
531 } | 531 } |
532 } | 532 } |
533 } // namespace wasm | 533 } // namespace wasm |
534 } // namespace internal | 534 } // namespace internal |
535 } // namespace v8 | 535 } // namespace v8 |
OLD | NEW |