Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Side by Side Diff: src/wasm/wasm-module-builder.cc

Issue 2474333003: [wasm] Exported memory should set maximum property when maximum is defined. (Closed)
Patch Set: Remove large allocation, fails on mac Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/mjsunit/regress/wasm/regression-651961.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/mjsunit/regress/wasm/regression-651961.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698