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

Side by Side Diff: src/wasm/wasm-interpreter.cc

Issue 2492793005: [wasm] Fix more -Wsign-compare warnings. (Closed)
Patch Set: 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/ast-decoder.cc ('k') | test/cctest/test-run-wasm-relocation-arm.cc » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/wasm/wasm-interpreter.h" 5 #include "src/wasm/wasm-interpreter.h"
6 6
7 #include "src/utils.h" 7 #include "src/utils.h"
8 #include "src/wasm/ast-decoder.h" 8 #include "src/wasm/ast-decoder.h"
9 #include "src/wasm/decoder.h" 9 #include "src/wasm/decoder.h"
10 #include "src/wasm/wasm-external-refs.h" 10 #include "src/wasm/wasm-external-refs.h"
(...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after
1691 void PopN(int n) { 1691 void PopN(int n) {
1692 DCHECK_GE(stack_.size(), static_cast<size_t>(n)); 1692 DCHECK_GE(stack_.size(), static_cast<size_t>(n));
1693 DCHECK_GT(frames_.size(), 0u); 1693 DCHECK_GT(frames_.size(), 0u);
1694 size_t nsize = stack_.size() - n; 1694 size_t nsize = stack_.size() - n;
1695 DCHECK_GE(nsize, frames_.back().llimit()); // can't pop into locals 1695 DCHECK_GE(nsize, frames_.back().llimit()); // can't pop into locals
1696 stack_.resize(nsize); 1696 stack_.resize(nsize);
1697 } 1697 }
1698 1698
1699 WasmVal PopArity(size_t arity) { 1699 WasmVal PopArity(size_t arity) {
1700 if (arity == 0) return WasmVal(); 1700 if (arity == 0) return WasmVal();
1701 CHECK_EQ(1, arity); 1701 CHECK_EQ(1u, arity);
1702 return Pop(); 1702 return Pop();
1703 } 1703 }
1704 1704
1705 void Push(pc_t pc, WasmVal val) { 1705 void Push(pc_t pc, WasmVal val) {
1706 // TODO(titzer): store PC as well? 1706 // TODO(titzer): store PC as well?
1707 if (val.type != kAstStmt) stack_.push_back(val); 1707 if (val.type != kAstStmt) stack_.push_back(val);
1708 } 1708 }
1709 1709
1710 void TraceStack(const char* phase, pc_t pc) { 1710 void TraceStack(const char* phase, pc_t pc) {
1711 if (FLAG_trace_wasm_interpreter) { 1711 if (FLAG_trace_wasm_interpreter) {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 1885
1886 ControlTransferMap WasmInterpreter::ComputeControlTransfersForTesting( 1886 ControlTransferMap WasmInterpreter::ComputeControlTransfersForTesting(
1887 Zone* zone, const byte* start, const byte* end) { 1887 Zone* zone, const byte* start, const byte* end) {
1888 ControlTransfers targets(zone, nullptr, nullptr, start, end); 1888 ControlTransfers targets(zone, nullptr, nullptr, start, end);
1889 return targets.map_; 1889 return targets.map_;
1890 } 1890 }
1891 1891
1892 } // namespace wasm 1892 } // namespace wasm
1893 } // namespace internal 1893 } // namespace internal
1894 } // namespace v8 1894 } // namespace v8
OLDNEW
« no previous file with comments | « src/wasm/ast-decoder.cc ('k') | test/cctest/test-run-wasm-relocation-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698