| Index: src/code-stub-assembler.cc
|
| diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
|
| index 2d8e55ca29a75ece438945adf38799dc1633f0f5..d3b4d99352cd8df190e906b3c9b23f9ba7916109 100644
|
| --- a/src/code-stub-assembler.cc
|
| +++ b/src/code-stub-assembler.cc
|
| @@ -38,9 +38,7 @@ void CodeStubAssembler::Assert(Node* condition) {
|
| #endif
|
| }
|
|
|
| -Node* CodeStubAssembler::NoContextConstant() {
|
| - return SmiConstant(Smi::FromInt(0));
|
| -}
|
| +Node* CodeStubAssembler::NoContextConstant() { return SmiConstant(Smi::kZero); }
|
|
|
| #define HEAP_CONSTANT_ACCESSOR(rootName, name) \
|
| Node* CodeStubAssembler::name##Constant() { \
|
| @@ -614,7 +612,7 @@ Node* CodeStubAssembler::AllocateRawUnaligned(Node* size_in_bytes,
|
|
|
| Bind(&runtime_call);
|
| // AllocateInTargetSpace does not use the context.
|
| - Node* context = SmiConstant(Smi::FromInt(0));
|
| + Node* context = SmiConstant(Smi::kZero);
|
|
|
| Node* runtime_result;
|
| if (flags & kPretenured) {
|
| @@ -1677,8 +1675,7 @@ void CodeStubAssembler::CopyStringCharacters(compiler::Node* from_string,
|
|
|
| // Nothing to do for zero characters.
|
|
|
| - GotoIf(SmiLessThanOrEqual(character_count, SmiConstant(Smi::FromInt(0))),
|
| - &out);
|
| + GotoIf(SmiLessThanOrEqual(character_count, SmiConstant(Smi::kZero)), &out);
|
|
|
| // Calculate offsets into the strings.
|
|
|
| @@ -2734,7 +2731,7 @@ Node* CodeStubAssembler::SubString(Node* context, Node* string, Node* from,
|
| GotoIf(SmiAbove(substr_length, string_length), &runtime);
|
|
|
| // Equal length - check if {from, to} == {0, str.length}.
|
| - GotoIf(SmiAbove(from, SmiConstant(Smi::FromInt(0))), &runtime);
|
| + GotoIf(SmiAbove(from, SmiConstant(Smi::kZero)), &runtime);
|
|
|
| // Return the original string (substr_length == string_length).
|
|
|
| @@ -3055,7 +3052,7 @@ Node* CodeStubAssembler::ToInteger(Node* context, Node* input,
|
| }
|
|
|
| Bind(&return_zero);
|
| - var_arg.Bind(SmiConstant(Smi::FromInt(0)));
|
| + var_arg.Bind(SmiConstant(Smi::kZero));
|
| Goto(&out);
|
| }
|
|
|
| @@ -5647,7 +5644,7 @@ void CodeStubAssembler::CheckEnumCache(Node* receiver, Label* use_cache,
|
| // For all objects but the receiver, check that the cache is empty.
|
| current_map.Bind(LoadMap(current_js_object.value()));
|
| Node* enum_length = EnumLength(current_map.value());
|
| - Node* zero_constant = SmiConstant(Smi::FromInt(0));
|
| + Node* zero_constant = SmiConstant(Smi::kZero);
|
| BranchIf(WordEqual(enum_length, zero_constant), &loop, use_runtime);
|
| }
|
| }
|
|
|