Commit a81bd4c0 authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[cleanup] Refactor code to use boolean literals instead of 0/1.

Fixing clang-tidy warning.

Bug: v8:8015
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ib48ead467519354715e3bc0e3f718cbdda28f989
Reviewed-on: https://chromium-review.googlesource.com/1225704
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55907}
parent ad72d195
...@@ -5951,7 +5951,7 @@ HeapStatistics::HeapStatistics() ...@@ -5951,7 +5951,7 @@ HeapStatistics::HeapStatistics()
malloced_memory_(0), malloced_memory_(0),
external_memory_(0), external_memory_(0),
peak_malloced_memory_(0), peak_malloced_memory_(0),
does_zap_garbage_(0), does_zap_garbage_(false),
number_of_native_contexts_(0), number_of_native_contexts_(0),
number_of_detached_contexts_(0) {} number_of_detached_contexts_(0) {}
......
...@@ -61,7 +61,7 @@ char* itoa_r(intptr_t i, char* buf, size_t sz, int base, size_t padding); ...@@ -61,7 +61,7 @@ char* itoa_r(intptr_t i, char* buf, size_t sz, int base, size_t padding);
namespace { namespace {
volatile sig_atomic_t in_signal_handler = 0; volatile sig_atomic_t in_signal_handler = 0;
bool dump_stack_in_signal_handler = 1; bool dump_stack_in_signal_handler = true;
// The prefix used for mangled symbols, per the Itanium C++ ABI: // The prefix used for mangled symbols, per the Itanium C++ ABI:
// http://www.codesourcery.com/cxx-abi/abi.html#mangling // http://www.codesourcery.com/cxx-abi/abi.html#mangling
......
...@@ -862,7 +862,7 @@ TNode<BoolT> RegExpBuiltinsAssembler::IsFastRegExpWithOriginalExec( ...@@ -862,7 +862,7 @@ TNode<BoolT> RegExpBuiltinsAssembler::IsFastRegExpWithOriginalExec(
TVARIABLE(BoolT, var_result); TVARIABLE(BoolT, var_result);
#ifdef V8_ENABLE_FORCE_SLOW_PATH #ifdef V8_ENABLE_FORCE_SLOW_PATH
var_result = BoolConstant(0); var_result = BoolConstant(false);
GotoIfForceSlowPath(&out); GotoIfForceSlowPath(&out);
#endif #endif
......
...@@ -223,7 +223,7 @@ Object* FutexEmulation::Wait(Isolate* isolate, ...@@ -223,7 +223,7 @@ Object* FutexEmulation::Wait(Isolate* isolate,
} }
wait_list_.Pointer()->RemoveNode(node); wait_list_.Pointer()->RemoveNode(node);
} while (0); } while (false);
isolate->RunAtomicsWaitCallback(callback_result, array_buffer, addr, value, isolate->RunAtomicsWaitCallback(callback_result, array_buffer, addr, value,
rel_timeout_ms, nullptr); rel_timeout_ms, nullptr);
......
...@@ -95,7 +95,7 @@ ICInfo::ICInfo() ...@@ -95,7 +95,7 @@ ICInfo::ICInfo()
is_constructor(false), is_constructor(false),
is_optimized(false), is_optimized(false),
map(nullptr), map(nullptr),
is_dictionary_map(0), is_dictionary_map(false),
number_of_own_descriptors(0) {} number_of_own_descriptors(0) {}
void ICInfo::Reset() { void ICInfo::Reset() {
......
This diff is collapsed.
...@@ -198,8 +198,8 @@ TEST(Run_WasmModule_Global) { ...@@ -198,8 +198,8 @@ TEST(Run_WasmModule_Global) {
TestSignatures sigs; TestSignatures sigs;
WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone); WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
uint32_t global1 = builder->AddGlobal(kWasmI32, 0); uint32_t global1 = builder->AddGlobal(kWasmI32, false);
uint32_t global2 = builder->AddGlobal(kWasmI32, 0); uint32_t global2 = builder->AddGlobal(kWasmI32, false);
WasmFunctionBuilder* f1 = builder->AddFunction(sigs.i_v()); WasmFunctionBuilder* f1 = builder->AddFunction(sigs.i_v());
byte code1[] = { byte code1[] = {
WASM_I32_ADD(WASM_GET_GLOBAL(global1), WASM_GET_GLOBAL(global2))}; WASM_I32_ADD(WASM_GET_GLOBAL(global1), WASM_GET_GLOBAL(global2))};
......
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