Skip to content

Commit e28183b

Browse files
skomskiCommit bot
authored andcommitted
Fix compilation with GCC 5.2
Fixes: ../../test/cctest/compiler/test-js-typed-lowering.cc:224:14: error: ‘kJSTypes’ defined but not used [-Werror=unused-variable] static Type* kJSTypes[] = {Type::Undefined(), Type::Null(), Type::Boolean(), ../../src/bignum.cc: In member function ‘void v8::internal::Bignum::AssignDecimalString(Vector<const char>)’: ../../src/bignum.cc:80:6: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow] ../../src/compiler/ia32/code-generator-ia32.cc:1366:3: required from here ../../src/base/logging.h:123:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] DEFINE_CHECK_OP_IMPL(EQ, ==) BUG= Review URL: https://codereview.chromium.org/1371823002 Cr-Commit-Position: refs/heads/master@{#31095}
1 parent e174381 commit e28183b

4 files changed

Lines changed: 5 additions & 7 deletions

File tree

src/bignum.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ static uint64_t ReadUInt64(Vector<const char> buffer,
6868
int from,
6969
int digits_to_read) {
7070
uint64_t result = 0;
71-
for (int i = from; i < from + digits_to_read; ++i) {
71+
int to = from + digits_to_read;
72+
73+
for (int i = from; i < to; ++i) {
7274
int digit = buffer[i] - '0';
7375
DCHECK(0 <= digit && digit <= 9);
7476
result = result * 10 + digit;

src/compiler/ia32/code-generator-ia32.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ void CodeGenerator::AssembleReturn() {
13631363
}
13641364
size_t pop_size = descriptor->StackParameterCount() * kPointerSize;
13651365
// Might need ecx for scratch if pop_size is too big.
1366-
DCHECK_EQ(0, descriptor->CalleeSavedRegisters() & ecx.bit());
1366+
DCHECK_EQ(0u, descriptor->CalleeSavedRegisters() & ecx.bit());
13671367
__ Ret(static_cast<int>(pop_size), ecx);
13681368
}
13691369

src/compiler/x64/code-generator-x64.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ void CodeGenerator::AssembleReturn() {
16181618
}
16191619
size_t pop_size = descriptor->StackParameterCount() * kPointerSize;
16201620
// Might need rcx for scratch if pop_size is too big.
1621-
DCHECK_EQ(0, descriptor->CalleeSavedRegisters() & rcx.bit());
1621+
DCHECK_EQ(0u, descriptor->CalleeSavedRegisters() & rcx.bit());
16221622
__ Ret(static_cast<int>(pop_size), rcx);
16231623
}
16241624

test/cctest/compiler/test-js-typed-lowering.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,6 @@ static Type* kNumberTypes[] = {
219219
Type::OrderedNumber(), Type::PlainNumber(), Type::Number()};
220220

221221

222-
static Type* kJSTypes[] = {Type::Undefined(), Type::Null(), Type::Boolean(),
223-
Type::Number(), Type::String(), Type::Object()};
224-
225-
226222
static Type* I32Type(bool is_signed) {
227223
return is_signed ? Type::Signed32() : Type::Unsigned32();
228224
}

0 commit comments

Comments
 (0)