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

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

Issue 2758563002: [gn] Enable stricter build flags (Closed)
Patch Set: Address comment Created 3 years, 9 months 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/value-serializer.cc ('k') | src/wasm/wasm-objects.h » ('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/objects-inl.h" 8 #include "src/objects-inl.h"
9 #include "src/v8.h" 9 #include "src/v8.h"
10 #include "src/zone/zone-containers.h" 10 #include "src/zone/zone-containers.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 FixupSection(buffer, start); 360 FixupSection(buffer, start);
361 } 361 }
362 362
363 // == Emit function signatures =============================================== 363 // == Emit function signatures ===============================================
364 bool has_names = false; 364 bool has_names = false;
365 if (functions_.size() > 0) { 365 if (functions_.size() > 0) {
366 size_t start = EmitSection(kFunctionSectionCode, buffer); 366 size_t start = EmitSection(kFunctionSectionCode, buffer);
367 buffer.write_size(functions_.size()); 367 buffer.write_size(functions_.size());
368 for (auto function : functions_) { 368 for (auto function : functions_) {
369 function->WriteSignature(buffer); 369 function->WriteSignature(buffer);
370 exports += function->exported_names_.size(); 370 exports += static_cast<uint32_t>(function->exported_names_.size());
371 if (function->name_.size() > 0) has_names = true; 371 if (function->name_.size() > 0) has_names = true;
372 } 372 }
373 FixupSection(buffer, start); 373 FixupSection(buffer, start);
374 } 374 }
375 375
376 // == emit function table ==================================================== 376 // == emit function table ====================================================
377 if (indirect_functions_.size() > 0) { 377 if (indirect_functions_.size() > 0) {
378 size_t start = EmitSection(kTableSectionCode, buffer); 378 size_t start = EmitSection(kTableSectionCode, buffer);
379 buffer.write_u8(1); // table count 379 buffer.write_u8(1); // table count
380 buffer.write_u8(kWasmAnyFunctionTypeForm); 380 buffer.write_u8(kWasmAnyFunctionTypeForm);
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // Emit the offset table per function. 557 // Emit the offset table per function.
558 for (auto function : functions_) { 558 for (auto function : functions_) {
559 function->WriteAsmWasmOffsetTable(buffer); 559 function->WriteAsmWasmOffsetTable(buffer);
560 } 560 }
561 // Append a 0 to indicate that this is an encoded table. 561 // Append a 0 to indicate that this is an encoded table.
562 buffer.write_u8(0); 562 buffer.write_u8(0);
563 } 563 }
564 } // namespace wasm 564 } // namespace wasm
565 } // namespace internal 565 } // namespace internal
566 } // namespace v8 566 } // namespace v8
OLDNEW
« no previous file with comments | « src/value-serializer.cc ('k') | src/wasm/wasm-objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698