Commit 3896c047 authored by Ben Smith's avatar Ben Smith Committed by Commit Bot

[wasm] Use uint32_t instead of unsigned

The style guide says that only `int` should be used of the builtin
integer types. Instead, we should use the stdint types.

See https://google.github.io/styleguide/cppguide.html#Integer_Types

Change-Id: I1af53a3bceefbfed85589b74a602c8ebe1c7ee25
Reviewed-on: https://chromium-review.googlesource.com/c/1342663Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57851}
parent 9266bc24
...@@ -134,7 +134,7 @@ template <Decoder::ValidateFlag validate> ...@@ -134,7 +134,7 @@ template <Decoder::ValidateFlag validate>
struct LocalIndexImmediate { struct LocalIndexImmediate {
uint32_t index; uint32_t index;
ValueType type = kWasmStmt; ValueType type = kWasmStmt;
unsigned length; uint32_t length;
inline LocalIndexImmediate(Decoder* decoder, const byte* pc) { inline LocalIndexImmediate(Decoder* decoder, const byte* pc) {
index = decoder->read_u32v<validate>(pc + 1, &length, "local index"); index = decoder->read_u32v<validate>(pc + 1, &length, "local index");
...@@ -145,7 +145,7 @@ template <Decoder::ValidateFlag validate> ...@@ -145,7 +145,7 @@ template <Decoder::ValidateFlag validate>
struct ExceptionIndexImmediate { struct ExceptionIndexImmediate {
uint32_t index; uint32_t index;
const WasmException* exception = nullptr; const WasmException* exception = nullptr;
unsigned length; uint32_t length;
inline ExceptionIndexImmediate(Decoder* decoder, const byte* pc) { inline ExceptionIndexImmediate(Decoder* decoder, const byte* pc) {
index = decoder->read_u32v<validate>(pc + 1, &length, "exception index"); index = decoder->read_u32v<validate>(pc + 1, &length, "exception index");
...@@ -155,7 +155,7 @@ struct ExceptionIndexImmediate { ...@@ -155,7 +155,7 @@ struct ExceptionIndexImmediate {
template <Decoder::ValidateFlag validate> template <Decoder::ValidateFlag validate>
struct ImmI32Immediate { struct ImmI32Immediate {
int32_t value; int32_t value;
unsigned length; uint32_t length;
inline ImmI32Immediate(Decoder* decoder, const byte* pc) { inline ImmI32Immediate(Decoder* decoder, const byte* pc) {
value = decoder->read_i32v<validate>(pc + 1, &length, "immi32"); value = decoder->read_i32v<validate>(pc + 1, &length, "immi32");
} }
...@@ -164,7 +164,7 @@ struct ImmI32Immediate { ...@@ -164,7 +164,7 @@ struct ImmI32Immediate {
template <Decoder::ValidateFlag validate> template <Decoder::ValidateFlag validate>
struct ImmI64Immediate { struct ImmI64Immediate {
int64_t value; int64_t value;
unsigned length; uint32_t length;
inline ImmI64Immediate(Decoder* decoder, const byte* pc) { inline ImmI64Immediate(Decoder* decoder, const byte* pc) {
value = decoder->read_i64v<validate>(pc + 1, &length, "immi64"); value = decoder->read_i64v<validate>(pc + 1, &length, "immi64");
} }
...@@ -173,7 +173,7 @@ struct ImmI64Immediate { ...@@ -173,7 +173,7 @@ struct ImmI64Immediate {
template <Decoder::ValidateFlag validate> template <Decoder::ValidateFlag validate>
struct ImmF32Immediate { struct ImmF32Immediate {
float value; float value;
unsigned length = 4; uint32_t length = 4;
inline ImmF32Immediate(Decoder* decoder, const byte* pc) { inline ImmF32Immediate(Decoder* decoder, const byte* pc) {
// Avoid bit_cast because it might not preserve the signalling bit of a NaN. // Avoid bit_cast because it might not preserve the signalling bit of a NaN.
uint32_t tmp = decoder->read_u32<validate>(pc + 1, "immf32"); uint32_t tmp = decoder->read_u32<validate>(pc + 1, "immf32");
...@@ -184,7 +184,7 @@ struct ImmF32Immediate { ...@@ -184,7 +184,7 @@ struct ImmF32Immediate {
template <Decoder::ValidateFlag validate> template <Decoder::ValidateFlag validate>
struct ImmF64Immediate { struct ImmF64Immediate {
double value; double value;
unsigned length = 8; uint32_t length = 8;
inline ImmF64Immediate(Decoder* decoder, const byte* pc) { inline ImmF64Immediate(Decoder* decoder, const byte* pc) {
// Avoid bit_cast because it might not preserve the signalling bit of a NaN. // Avoid bit_cast because it might not preserve the signalling bit of a NaN.
uint64_t tmp = decoder->read_u64<validate>(pc + 1, "immf64"); uint64_t tmp = decoder->read_u64<validate>(pc + 1, "immf64");
...@@ -197,7 +197,7 @@ struct GlobalIndexImmediate { ...@@ -197,7 +197,7 @@ struct GlobalIndexImmediate {
uint32_t index; uint32_t index;
ValueType type = kWasmStmt; ValueType type = kWasmStmt;
const WasmGlobal* global = nullptr; const WasmGlobal* global = nullptr;
unsigned length; uint32_t length;
inline GlobalIndexImmediate(Decoder* decoder, const byte* pc) { inline GlobalIndexImmediate(Decoder* decoder, const byte* pc) {
index = decoder->read_u32v<validate>(pc + 1, &length, "global index"); index = decoder->read_u32v<validate>(pc + 1, &length, "global index");
...@@ -206,7 +206,7 @@ struct GlobalIndexImmediate { ...@@ -206,7 +206,7 @@ struct GlobalIndexImmediate {
template <Decoder::ValidateFlag validate> template <Decoder::ValidateFlag validate>
struct BlockTypeImmediate { struct BlockTypeImmediate {
unsigned length = 1; uint32_t length = 1;
ValueType type = kWasmStmt; ValueType type = kWasmStmt;
uint32_t sig_index = 0; uint32_t sig_index = 0;
FunctionSig* sig = nullptr; FunctionSig* sig = nullptr;
...@@ -289,7 +289,7 @@ struct BlockTypeImmediate { ...@@ -289,7 +289,7 @@ struct BlockTypeImmediate {
template <Decoder::ValidateFlag validate> template <Decoder::ValidateFlag validate>
struct BreakDepthImmediate { struct BreakDepthImmediate {
uint32_t depth; uint32_t depth;
unsigned length; uint32_t length;
inline BreakDepthImmediate(Decoder* decoder, const byte* pc) { inline BreakDepthImmediate(Decoder* decoder, const byte* pc) {
depth = decoder->read_u32v<validate>(pc + 1, &length, "break depth"); depth = decoder->read_u32v<validate>(pc + 1, &length, "break depth");
} }
...@@ -300,9 +300,9 @@ struct CallIndirectImmediate { ...@@ -300,9 +300,9 @@ struct CallIndirectImmediate {
uint32_t table_index; uint32_t table_index;
uint32_t sig_index; uint32_t sig_index;
FunctionSig* sig = nullptr; FunctionSig* sig = nullptr;
unsigned length = 0; uint32_t length = 0;
inline CallIndirectImmediate(Decoder* decoder, const byte* pc) { inline CallIndirectImmediate(Decoder* decoder, const byte* pc) {
unsigned len = 0; uint32_t len = 0;
sig_index = decoder->read_u32v<validate>(pc + 1, &len, "signature index"); sig_index = decoder->read_u32v<validate>(pc + 1, &len, "signature index");
if (!VALIDATE(decoder->ok())) return; if (!VALIDATE(decoder->ok())) return;
table_index = decoder->read_u8<validate>(pc + 1 + len, "table index"); table_index = decoder->read_u8<validate>(pc + 1 + len, "table index");
...@@ -318,7 +318,7 @@ template <Decoder::ValidateFlag validate> ...@@ -318,7 +318,7 @@ template <Decoder::ValidateFlag validate>
struct CallFunctionImmediate { struct CallFunctionImmediate {
uint32_t index; uint32_t index;
FunctionSig* sig = nullptr; FunctionSig* sig = nullptr;
unsigned length; uint32_t length;
inline CallFunctionImmediate(Decoder* decoder, const byte* pc) { inline CallFunctionImmediate(Decoder* decoder, const byte* pc) {
index = decoder->read_u32v<validate>(pc + 1, &length, "function index"); index = decoder->read_u32v<validate>(pc + 1, &length, "function index");
} }
...@@ -327,7 +327,7 @@ struct CallFunctionImmediate { ...@@ -327,7 +327,7 @@ struct CallFunctionImmediate {
template <Decoder::ValidateFlag validate> template <Decoder::ValidateFlag validate>
struct MemoryIndexImmediate { struct MemoryIndexImmediate {
uint32_t index; uint32_t index;
unsigned length = 1; uint32_t length = 1;
inline MemoryIndexImmediate(Decoder* decoder, const byte* pc) { inline MemoryIndexImmediate(Decoder* decoder, const byte* pc) {
index = decoder->read_u8<validate>(pc + 1, "memory index"); index = decoder->read_u8<validate>(pc + 1, "memory index");
if (!VALIDATE(index == 0)) { if (!VALIDATE(index == 0)) {
...@@ -356,7 +356,7 @@ struct BranchTableImmediate { ...@@ -356,7 +356,7 @@ struct BranchTableImmediate {
inline BranchTableImmediate(Decoder* decoder, const byte* pc) { inline BranchTableImmediate(Decoder* decoder, const byte* pc) {
DCHECK_EQ(kExprBrTable, decoder->read_u8<validate>(pc, "opcode")); DCHECK_EQ(kExprBrTable, decoder->read_u8<validate>(pc, "opcode"));
start = pc + 1; start = pc + 1;
unsigned len = 0; uint32_t len = 0;
table_count = decoder->read_u32v<validate>(pc + 1, &len, "table count"); table_count = decoder->read_u32v<validate>(pc + 1, &len, "table count");
table = pc + 1 + len; table = pc + 1 + len;
} }
...@@ -366,12 +366,12 @@ struct BranchTableImmediate { ...@@ -366,12 +366,12 @@ struct BranchTableImmediate {
template <Decoder::ValidateFlag validate> template <Decoder::ValidateFlag validate>
class BranchTableIterator { class BranchTableIterator {
public: public:
unsigned cur_index() { return index_; } uint32_t cur_index() { return index_; }
bool has_next() { return VALIDATE(decoder_->ok()) && index_ <= table_count_; } bool has_next() { return VALIDATE(decoder_->ok()) && index_ <= table_count_; }
uint32_t next() { uint32_t next() {
DCHECK(has_next()); DCHECK(has_next());
index_++; index_++;
unsigned length; uint32_t length;
uint32_t result = uint32_t result =
decoder_->read_u32v<validate>(pc_, &length, "branch table entry"); decoder_->read_u32v<validate>(pc_, &length, "branch table entry");
pc_ += length; pc_ += length;
...@@ -379,9 +379,9 @@ class BranchTableIterator { ...@@ -379,9 +379,9 @@ class BranchTableIterator {
} }
// length, including the length of the {BranchTableImmediate}, but not the // length, including the length of the {BranchTableImmediate}, but not the
// opcode. // opcode.
unsigned length() { uint32_t length() {
while (has_next()) next(); while (has_next()) next();
return static_cast<unsigned>(pc_ - start_); return static_cast<uint32_t>(pc_ - start_);
} }
const byte* pc() { return pc_; } const byte* pc() { return pc_; }
...@@ -404,10 +404,10 @@ template <Decoder::ValidateFlag validate> ...@@ -404,10 +404,10 @@ template <Decoder::ValidateFlag validate>
struct MemoryAccessImmediate { struct MemoryAccessImmediate {
uint32_t alignment; uint32_t alignment;
uint32_t offset; uint32_t offset;
unsigned length = 0; uint32_t length = 0;
inline MemoryAccessImmediate(Decoder* decoder, const byte* pc, inline MemoryAccessImmediate(Decoder* decoder, const byte* pc,
uint32_t max_alignment) { uint32_t max_alignment) {
unsigned alignment_length; uint32_t alignment_length;
alignment = alignment =
decoder->read_u32v<validate>(pc + 1, &alignment_length, "alignment"); decoder->read_u32v<validate>(pc + 1, &alignment_length, "alignment");
if (!VALIDATE(alignment <= max_alignment)) { if (!VALIDATE(alignment <= max_alignment)) {
...@@ -417,7 +417,7 @@ struct MemoryAccessImmediate { ...@@ -417,7 +417,7 @@ struct MemoryAccessImmediate {
max_alignment, alignment); max_alignment, alignment);
} }
if (!VALIDATE(decoder->ok())) return; if (!VALIDATE(decoder->ok())) return;
unsigned offset_length; uint32_t offset_length;
offset = decoder->read_u32v<validate>(pc + 1 + alignment_length, offset = decoder->read_u32v<validate>(pc + 1 + alignment_length,
&offset_length, "offset"); &offset_length, "offset");
length = alignment_length + offset_length; length = alignment_length + offset_length;
...@@ -428,7 +428,7 @@ struct MemoryAccessImmediate { ...@@ -428,7 +428,7 @@ struct MemoryAccessImmediate {
template <Decoder::ValidateFlag validate> template <Decoder::ValidateFlag validate>
struct SimdLaneImmediate { struct SimdLaneImmediate {
uint8_t lane; uint8_t lane;
unsigned length = 1; uint32_t length = 1;
inline SimdLaneImmediate(Decoder* decoder, const byte* pc) { inline SimdLaneImmediate(Decoder* decoder, const byte* pc) {
lane = decoder->read_u8<validate>(pc + 2, "lane"); lane = decoder->read_u8<validate>(pc + 2, "lane");
...@@ -439,7 +439,7 @@ struct SimdLaneImmediate { ...@@ -439,7 +439,7 @@ struct SimdLaneImmediate {
template <Decoder::ValidateFlag validate> template <Decoder::ValidateFlag validate>
struct SimdShiftImmediate { struct SimdShiftImmediate {
uint8_t shift; uint8_t shift;
unsigned length = 1; uint32_t length = 1;
inline SimdShiftImmediate(Decoder* decoder, const byte* pc) { inline SimdShiftImmediate(Decoder* decoder, const byte* pc) {
shift = decoder->read_u8<validate>(pc + 2, "shift"); shift = decoder->read_u8<validate>(pc + 2, "shift");
...@@ -842,7 +842,7 @@ class WasmDecoder : public Decoder { ...@@ -842,7 +842,7 @@ class WasmDecoder : public Decoder {
// Iteratively process all AST nodes nested inside the loop. // Iteratively process all AST nodes nested inside the loop.
while (pc < decoder->end() && VALIDATE(decoder->ok())) { while (pc < decoder->end() && VALIDATE(decoder->ok())) {
WasmOpcode opcode = static_cast<WasmOpcode>(*pc); WasmOpcode opcode = static_cast<WasmOpcode>(*pc);
unsigned length = 1; uint32_t length = 1;
switch (opcode) { switch (opcode) {
case kExprLoop: case kExprLoop:
case kExprIf: case kExprIf:
...@@ -1109,7 +1109,7 @@ class WasmDecoder : public Decoder { ...@@ -1109,7 +1109,7 @@ class WasmDecoder : public Decoder {
return true; return true;
} }
static unsigned OpcodeLength(Decoder* decoder, const byte* pc) { static uint32_t OpcodeLength(Decoder* decoder, const byte* pc) {
WasmOpcode opcode = static_cast<WasmOpcode>(*pc); WasmOpcode opcode = static_cast<WasmOpcode>(*pc);
switch (opcode) { switch (opcode) {
#define DECLARE_OPCODE_CASE(name, opcode, sig) case kExpr##name: #define DECLARE_OPCODE_CASE(name, opcode, sig) case kExpr##name:
...@@ -1590,7 +1590,7 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -1590,7 +1590,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
} }
while (this->pc_ < this->end_) { // decoding loop. while (this->pc_ < this->end_) { // decoding loop.
unsigned len = 1; uint32_t len = 1;
WasmOpcode opcode = static_cast<WasmOpcode>(*this->pc_); WasmOpcode opcode = static_cast<WasmOpcode>(*this->pc_);
CALL_INTERFACE_IF_REACHABLE(NextInstruction, opcode); CALL_INTERFACE_IF_REACHABLE(NextInstruction, opcode);
...@@ -2243,7 +2243,7 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2243,7 +2243,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
merge->vals.first = get_val(0); merge->vals.first = get_val(0);
} else if (arity > 1) { } else if (arity > 1) {
merge->vals.array = zone_->NewArray<Value>(arity); merge->vals.array = zone_->NewArray<Value>(arity);
for (unsigned i = 0; i < arity; i++) { for (uint32_t i = 0; i < arity; i++) {
merge->vals.array[i] = get_val(i); merge->vals.array[i] = get_val(i);
} }
} }
...@@ -2330,7 +2330,7 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2330,7 +2330,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
return imm.length; return imm.length;
} }
unsigned SimdExtractLane(WasmOpcode opcode, ValueType type) { uint32_t SimdExtractLane(WasmOpcode opcode, ValueType type) {
SimdLaneImmediate<validate> imm(this, this->pc_); SimdLaneImmediate<validate> imm(this, this->pc_);
if (this->Validate(this->pc_, opcode, imm)) { if (this->Validate(this->pc_, opcode, imm)) {
Value inputs[] = {Pop(0, kWasmS128)}; Value inputs[] = {Pop(0, kWasmS128)};
...@@ -2341,7 +2341,7 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2341,7 +2341,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
return imm.length; return imm.length;
} }
unsigned SimdReplaceLane(WasmOpcode opcode, ValueType type) { uint32_t SimdReplaceLane(WasmOpcode opcode, ValueType type) {
SimdLaneImmediate<validate> imm(this, this->pc_); SimdLaneImmediate<validate> imm(this, this->pc_);
if (this->Validate(this->pc_, opcode, imm)) { if (this->Validate(this->pc_, opcode, imm)) {
Value inputs[2]; Value inputs[2];
...@@ -2354,7 +2354,7 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2354,7 +2354,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
return imm.length; return imm.length;
} }
unsigned SimdShiftOp(WasmOpcode opcode) { uint32_t SimdShiftOp(WasmOpcode opcode) {
SimdShiftImmediate<validate> imm(this, this->pc_); SimdShiftImmediate<validate> imm(this, this->pc_);
if (this->Validate(this->pc_, opcode, imm)) { if (this->Validate(this->pc_, opcode, imm)) {
auto input = Pop(0, kWasmS128); auto input = Pop(0, kWasmS128);
...@@ -2364,7 +2364,7 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2364,7 +2364,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
return imm.length; return imm.length;
} }
unsigned Simd8x16ShuffleOp() { uint32_t Simd8x16ShuffleOp() {
Simd8x16ShuffleImmediate<validate> imm(this, this->pc_); Simd8x16ShuffleImmediate<validate> imm(this, this->pc_);
if (this->Validate(this->pc_, imm)) { if (this->Validate(this->pc_, imm)) {
auto input1 = Pop(1, kWasmS128); auto input1 = Pop(1, kWasmS128);
...@@ -2376,8 +2376,8 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2376,8 +2376,8 @@ class WasmFullDecoder : public WasmDecoder<validate> {
return 16; return 16;
} }
unsigned DecodeSimdOpcode(WasmOpcode opcode) { uint32_t DecodeSimdOpcode(WasmOpcode opcode) {
unsigned len = 0; uint32_t len = 0;
switch (opcode) { switch (opcode) {
case kExprF32x4ExtractLane: { case kExprF32x4ExtractLane: {
len = SimdExtractLane(opcode, kWasmF32); len = SimdExtractLane(opcode, kWasmF32);
...@@ -2436,8 +2436,8 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2436,8 +2436,8 @@ class WasmFullDecoder : public WasmDecoder<validate> {
return len; return len;
} }
unsigned DecodeAtomicOpcode(WasmOpcode opcode) { uint32_t DecodeAtomicOpcode(WasmOpcode opcode) {
unsigned len = 0; uint32_t len = 0;
ValueType ret_type; ValueType ret_type;
FunctionSig* sig = WasmOpcodes::Signature(opcode); FunctionSig* sig = WasmOpcodes::Signature(opcode);
if (sig != nullptr) { if (sig != nullptr) {
...@@ -2584,7 +2584,7 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2584,7 +2584,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
if (merge->arity == 1) { if (merge->arity == 1) {
stack_.push_back(merge->vals.first); stack_.push_back(merge->vals.first);
} else { } else {
for (unsigned i = 0; i < merge->arity; i++) { for (uint32_t i = 0; i < merge->arity; i++) {
stack_.push_back(merge->vals.array[i]); stack_.push_back(merge->vals.array[i]);
} }
} }
......
...@@ -203,7 +203,7 @@ bool PrintRawWasmCode(AccountingAllocator* allocator, const FunctionBody& body, ...@@ -203,7 +203,7 @@ bool PrintRawWasmCode(AccountingAllocator* allocator, const FunctionBody& body,
i.pc()); i.pc());
os << " // @" << i.pc_offset(); os << " // @" << i.pc_offset();
if (decoder.Complete(imm)) { if (decoder.Complete(imm)) {
for (unsigned i = 0; i < imm.out_arity(); i++) { for (uint32_t i = 0; i < imm.out_arity(); i++) {
os << " " << ValueTypes::TypeName(imm.out_type(i)); os << " " << ValueTypes::TypeName(imm.out_type(i));
} }
} }
......
...@@ -157,7 +157,7 @@ class WasmGraphBuildingInterface { ...@@ -157,7 +157,7 @@ class WasmGraphBuildingInterface {
ssa_env_->SetNotMerged(); ssa_env_->SetNotMerged();
if (!decoder->ok()) return; if (!decoder->ok()) return;
// Wrap input merge into phis. // Wrap input merge into phis.
for (unsigned i = 0; i < block->start_merge.arity; ++i) { for (uint32_t i = 0; i < block->start_merge.arity; ++i) {
Value& val = block->start_merge[i]; Value& val = block->start_merge[i];
val.node = builder_->Phi(val.type, 1, &val.node, block->end_env->control); val.node = builder_->Phi(val.type, 1, &val.node, block->end_env->control);
} }
...@@ -248,7 +248,7 @@ class WasmGraphBuildingInterface { ...@@ -248,7 +248,7 @@ class WasmGraphBuildingInterface {
for (size_t i = 0; i < num_values; ++i) { for (size_t i = 0; i < num_values; ++i) {
buffer[i] = values[i].node; buffer[i] = values[i].node;
} }
BUILD(Return, static_cast<unsigned>(values.size()), buffer); BUILD(Return, static_cast<uint32_t>(values.size()), buffer);
} }
void GetLocal(FullDecoder* decoder, Value* result, void GetLocal(FullDecoder* decoder, Value* result,
......
...@@ -1305,7 +1305,7 @@ class ModuleDecoderImpl : public Decoder { ...@@ -1305,7 +1305,7 @@ class ModuleDecoderImpl : public Decoder {
const byte* pos = pc(); const byte* pos = pc();
uint8_t opcode = consume_u8("opcode"); uint8_t opcode = consume_u8("opcode");
WasmInitExpr expr; WasmInitExpr expr;
unsigned len = 0; uint32_t len = 0;
switch (opcode) { switch (opcode) {
case kExprGetGlobal: { case kExprGetGlobal: {
GlobalIndexImmediate<Decoder::kValidate> imm(this, pc() - 1); GlobalIndexImmediate<Decoder::kValidate> imm(this, pc() - 1);
...@@ -1686,7 +1686,7 @@ AsmJsOffsetsResult DecodeAsmJsOffsets(const byte* tables_start, ...@@ -1686,7 +1686,7 @@ AsmJsOffsetsResult DecodeAsmJsOffsets(const byte* tables_start,
Decoder decoder(tables_start, tables_end); Decoder decoder(tables_start, tables_end);
uint32_t functions_count = decoder.consume_u32v("functions count"); uint32_t functions_count = decoder.consume_u32v("functions count");
// Reserve space for the entries, taking care of invalid input. // Reserve space for the entries, taking care of invalid input.
if (functions_count < static_cast<unsigned>(tables_end - tables_start)) { if (functions_count < static_cast<uint32_t>(tables_end - tables_start)) {
table.reserve(functions_count); table.reserve(functions_count);
} }
......
...@@ -1244,7 +1244,7 @@ class ThreadImpl { ...@@ -1244,7 +1244,7 @@ class ThreadImpl {
pc_t pc; pc_t pc;
sp_t sp; sp_t sp;
size_t fp; size_t fp;
unsigned arity; uint32_t arity;
}; };
friend class InterpretedFrameImpl; friend class InterpretedFrameImpl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment