Index: src/code-stubs-hydrogen.cc |
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
index a55810ed3feaac6684cce72def057b6987fae9b3..0ede93b4de9f0d68fa4dc22ca38c5cd09e9ff10a 100644 |
--- a/src/code-stubs-hydrogen.cc |
+++ b/src/code-stubs-hydrogen.cc |
@@ -323,10 +323,8 @@ HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { |
// so that it doesn't build and eager frame. |
info()->MarkMustNotHaveEagerFrame(); |
- HInstruction* allocation_site = Add<HLoadKeyed>(GetParameter(0), |
- GetParameter(1), |
- static_cast<HValue*>(NULL), |
- FAST_ELEMENTS); |
+ HInstruction* allocation_site = |
+ Add<HLoadKeyed>(GetParameter(0), GetParameter(1), nullptr, FAST_ELEMENTS); |
IfBuilder checker(this); |
checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site, |
undefined); |
@@ -334,8 +332,8 @@ HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { |
HObjectAccess access = HObjectAccess::ForAllocationSiteOffset( |
AllocationSite::kTransitionInfoOffset); |
- HInstruction* boilerplate = Add<HLoadNamedField>( |
- allocation_site, static_cast<HValue*>(NULL), access); |
+ HInstruction* boilerplate = |
+ Add<HLoadNamedField>(allocation_site, nullptr, access); |
HValue* elements = AddLoadElements(boilerplate); |
HValue* capacity = AddLoadFixedArrayLength(elements); |
IfBuilder zero_capacity(this); |
@@ -387,10 +385,8 @@ template <> |
HValue* CodeStubGraphBuilder<FastCloneShallowObjectStub>::BuildCodeStub() { |
HValue* undefined = graph()->GetConstantUndefined(); |
- HInstruction* allocation_site = Add<HLoadKeyed>(GetParameter(0), |
- GetParameter(1), |
- static_cast<HValue*>(NULL), |
- FAST_ELEMENTS); |
+ HInstruction* allocation_site = |
+ Add<HLoadKeyed>(GetParameter(0), GetParameter(1), nullptr, FAST_ELEMENTS); |
IfBuilder checker(this); |
checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site, |
@@ -399,8 +395,8 @@ HValue* CodeStubGraphBuilder<FastCloneShallowObjectStub>::BuildCodeStub() { |
HObjectAccess access = HObjectAccess::ForAllocationSiteOffset( |
AllocationSite::kTransitionInfoOffset); |
- HInstruction* boilerplate = Add<HLoadNamedField>( |
- allocation_site, static_cast<HValue*>(NULL), access); |
+ HInstruction* boilerplate = |
+ Add<HLoadNamedField>(allocation_site, nullptr, access); |
int length = casted_stub()->length(); |
if (length == 0) { |
@@ -413,12 +409,10 @@ HValue* CodeStubGraphBuilder<FastCloneShallowObjectStub>::BuildCodeStub() { |
size += AllocationMemento::kSize; |
} |
- HValue* boilerplate_map = Add<HLoadNamedField>( |
- boilerplate, static_cast<HValue*>(NULL), |
- HObjectAccess::ForMap()); |
+ HValue* boilerplate_map = |
+ Add<HLoadNamedField>(boilerplate, nullptr, HObjectAccess::ForMap()); |
HValue* boilerplate_size = Add<HLoadNamedField>( |
- boilerplate_map, static_cast<HValue*>(NULL), |
- HObjectAccess::ForMapInstanceSize()); |
+ boilerplate_map, nullptr, HObjectAccess::ForMapInstanceSize()); |
HValue* size_in_words = Add<HConstant>(object_size >> kPointerSizeLog2); |
checker.If<HCompareNumericAndBranch>(boilerplate_size, |
size_in_words, Token::EQ); |
@@ -431,9 +425,8 @@ HValue* CodeStubGraphBuilder<FastCloneShallowObjectStub>::BuildCodeStub() { |
for (int i = 0; i < object_size; i += kPointerSize) { |
HObjectAccess access = HObjectAccess::ForObservableJSObjectOffset(i); |
- Add<HStoreNamedField>( |
- object, access, Add<HLoadNamedField>( |
- boilerplate, static_cast<HValue*>(NULL), access)); |
+ Add<HStoreNamedField>(object, access, |
+ Add<HLoadNamedField>(boilerplate, nullptr, access)); |
} |
DCHECK(FLAG_allocation_site_pretenuring || (size == object_size)); |
@@ -502,9 +495,8 @@ HValue* CodeStubGraphBuilder<CreateAllocationSiteStub>::BuildCodeStub() { |
// Link the object to the allocation site list |
HValue* site_list = Add<HConstant>( |
ExternalReference::allocation_sites_list_address(isolate())); |
- HValue* site = Add<HLoadNamedField>( |
- site_list, static_cast<HValue*>(NULL), |
- HObjectAccess::ForAllocationSiteList()); |
+ HValue* site = Add<HLoadNamedField>(site_list, nullptr, |
+ HObjectAccess::ForAllocationSiteList()); |
// TODO(mvstanton): This is a store to a weak pointer, which we may want to |
// mark as such in order to skip the write barrier, once we have a unified |
// system for weakness. For now we decided to keep it like this because having |
@@ -536,7 +528,7 @@ HValue* CodeStubGraphBuilder<LoadScriptContextFieldStub>::BuildCodeStub() { |
int slot_index = casted_stub()->slot_index(); |
HValue* script_context = BuildGetScriptContext(context_index); |
- return Add<HLoadNamedField>(script_context, static_cast<HValue*>(NULL), |
+ return Add<HLoadNamedField>(script_context, nullptr, |
HObjectAccess::ForContextSlot(slot_index)); |
} |
@@ -593,12 +585,11 @@ HLoadNamedField* CodeStubGraphBuilderBase::BuildLoadNamedField( |
(!FLAG_unbox_double_fields || !index.is_inobject())) { |
// Load the heap number. |
object = Add<HLoadNamedField>( |
- object, static_cast<HValue*>(NULL), |
- access.WithRepresentation(Representation::Tagged())); |
+ object, nullptr, access.WithRepresentation(Representation::Tagged())); |
// Load the double value from it. |
access = HObjectAccess::ForHeapNumberValue(); |
} |
- return Add<HLoadNamedField>(object, static_cast<HValue*>(NULL), access); |
+ return Add<HLoadNamedField>(object, nullptr, access); |
} |
@@ -618,12 +609,10 @@ HValue* CodeStubGraphBuilder<LoadConstantStub>::BuildCodeStub() { |
HValue* map = AddLoadMap(GetParameter(0), NULL); |
HObjectAccess descriptors_access = HObjectAccess::ForObservableJSObjectOffset( |
Map::kDescriptorsOffset, Representation::Tagged()); |
- HValue* descriptors = |
- Add<HLoadNamedField>(map, static_cast<HValue*>(NULL), descriptors_access); |
+ HValue* descriptors = Add<HLoadNamedField>(map, nullptr, descriptors_access); |
HObjectAccess value_access = HObjectAccess::ForObservableJSObjectOffset( |
DescriptorArray::GetValueOffset(casted_stub()->constant_index())); |
- return Add<HLoadNamedField>(descriptors, static_cast<HValue*>(NULL), |
- value_access); |
+ return Add<HLoadNamedField>(descriptors, nullptr, value_access); |
} |
@@ -632,20 +621,19 @@ Handle<Code> LoadConstantStub::GenerateCode() { return DoGenerateCode(this); } |
HValue* CodeStubGraphBuilderBase::UnmappedCase(HValue* elements, HValue* key) { |
HValue* result; |
- HInstruction* backing_store = Add<HLoadKeyed>( |
- elements, graph()->GetConstant1(), static_cast<HValue*>(NULL), |
- FAST_ELEMENTS, ALLOW_RETURN_HOLE); |
+ HInstruction* backing_store = |
+ Add<HLoadKeyed>(elements, graph()->GetConstant1(), nullptr, FAST_ELEMENTS, |
+ ALLOW_RETURN_HOLE); |
Add<HCheckMaps>(backing_store, isolate()->factory()->fixed_array_map()); |
- HValue* backing_store_length = |
- Add<HLoadNamedField>(backing_store, static_cast<HValue*>(NULL), |
- HObjectAccess::ForFixedArrayLength()); |
+ HValue* backing_store_length = Add<HLoadNamedField>( |
+ backing_store, nullptr, HObjectAccess::ForFixedArrayLength()); |
IfBuilder in_unmapped_range(this); |
in_unmapped_range.If<HCompareNumericAndBranch>(key, backing_store_length, |
Token::LT); |
in_unmapped_range.Then(); |
{ |
- result = Add<HLoadKeyed>(backing_store, key, static_cast<HValue*>(NULL), |
- FAST_HOLEY_ELEMENTS, NEVER_RETURN_HOLE); |
+ result = Add<HLoadKeyed>(backing_store, key, nullptr, FAST_HOLEY_ELEMENTS, |
+ NEVER_RETURN_HOLE); |
} |
in_unmapped_range.ElseDeopt("Outside of range"); |
in_unmapped_range.End(); |
@@ -692,19 +680,17 @@ HValue* CodeStubGraphBuilder<KeyedLoadSloppyArgumentsStub>::BuildCodeStub() { |
positive_smi.End(); |
HValue* constant_two = Add<HConstant>(2); |
- HValue* elements = AddLoadElements(receiver, static_cast<HValue*>(NULL)); |
- HValue* elements_length = |
- Add<HLoadNamedField>(elements, static_cast<HValue*>(NULL), |
- HObjectAccess::ForFixedArrayLength()); |
+ HValue* elements = AddLoadElements(receiver, nullptr); |
+ HValue* elements_length = Add<HLoadNamedField>( |
+ elements, nullptr, HObjectAccess::ForFixedArrayLength()); |
HValue* adjusted_length = AddUncasted<HSub>(elements_length, constant_two); |
IfBuilder in_range(this); |
in_range.If<HCompareNumericAndBranch>(key, adjusted_length, Token::LT); |
in_range.Then(); |
{ |
HValue* index = AddUncasted<HAdd>(key, constant_two); |
- HInstruction* mapped_index = |
- Add<HLoadKeyed>(elements, index, static_cast<HValue*>(NULL), |
- FAST_HOLEY_ELEMENTS, ALLOW_RETURN_HOLE); |
+ HInstruction* mapped_index = Add<HLoadKeyed>( |
+ elements, index, nullptr, FAST_HOLEY_ELEMENTS, ALLOW_RETURN_HOLE); |
IfBuilder is_valid(this); |
is_valid.IfNot<HCompareObjectEqAndBranch>(mapped_index, |
@@ -714,13 +700,11 @@ HValue* CodeStubGraphBuilder<KeyedLoadSloppyArgumentsStub>::BuildCodeStub() { |
// TODO(mvstanton): I'd like to assert from this point, that if the |
// mapped_index is not the hole that it is indeed, a smi. An unnecessary |
// smi check is being emitted. |
- HValue* the_context = |
- Add<HLoadKeyed>(elements, graph()->GetConstant0(), |
- static_cast<HValue*>(NULL), FAST_ELEMENTS); |
+ HValue* the_context = Add<HLoadKeyed>(elements, graph()->GetConstant0(), |
+ nullptr, FAST_ELEMENTS); |
DCHECK(Context::kHeaderSize == FixedArray::kHeaderSize); |
- HValue* result = |
- Add<HLoadKeyed>(the_context, mapped_index, static_cast<HValue*>(NULL), |
- FAST_ELEMENTS, ALLOW_RETURN_HOLE); |
+ HValue* result = Add<HLoadKeyed>(the_context, mapped_index, nullptr, |
+ FAST_ELEMENTS, ALLOW_RETURN_HOLE); |
environment()->Push(result); |
} |
is_valid.Else(); |
@@ -778,8 +762,7 @@ void CodeStubGraphBuilderBase::BuildStoreNamedField( |
value = heap_number; |
} else { |
// Load the heap number. |
- object = Add<HLoadNamedField>(object, static_cast<HValue*>(NULL), |
- heap_number_access); |
+ object = Add<HLoadNamedField>(object, nullptr, heap_number_access); |
// Store the double value into it. |
access = HObjectAccess::ForHeapNumberValue(); |
} |
@@ -809,9 +792,8 @@ HValue* CodeStubGraphBuilder<StoreTransitionStub>::BuildCodeStub() { |
switch (casted_stub()->store_mode()) { |
case StoreTransitionStub::ExtendStorageAndStoreMapAndValue: { |
- HValue* properties = |
- Add<HLoadNamedField>(object, static_cast<HValue*>(NULL), |
- HObjectAccess::ForPropertiesPointer()); |
+ HValue* properties = Add<HLoadNamedField>( |
+ object, nullptr, HObjectAccess::ForPropertiesPointer()); |
HValue* length = AddLoadFixedArrayLength(properties); |
HValue* delta = |
Add<HConstant>(static_cast<int32_t>(JSObject::kFieldsAdded)); |
@@ -1345,8 +1327,7 @@ HValue* CodeStubGraphBuilder<StoreGlobalStub>::BuildCodeInitializedStub() { |
HValue* cell = Add<HConstant>(placeholder_cell); |
HObjectAccess access(HObjectAccess::ForCellPayload(isolate())); |
- HValue* cell_contents = Add<HLoadNamedField>( |
- cell, static_cast<HValue*>(NULL), access); |
+ HValue* cell_contents = Add<HLoadNamedField>(cell, nullptr, access); |
if (stub->is_constant()) { |
IfBuilder builder(this); |
@@ -1444,7 +1425,7 @@ void CodeStubGraphBuilderBase::BuildCheckAndInstallOptimizedCode( |
// Now link a function into a list of optimized functions. |
HValue* optimized_functions_list = Add<HLoadNamedField>( |
- native_context, static_cast<HValue*>(NULL), |
+ native_context, nullptr, |
HObjectAccess::ForContextSlot(Context::OPTIMIZED_FUNCTIONS_LIST)); |
Add<HStoreNamedField>(js_function, |
HObjectAccess::ForNextFunctionLinkPointer(), |
@@ -1464,8 +1445,8 @@ void CodeStubGraphBuilderBase::BuildInstallCode(HValue* js_function, |
Add<HStoreNamedField>(js_function, |
HObjectAccess::ForNextFunctionLinkPointer(), |
graph()->GetConstantUndefined()); |
- HValue* code_object = Add<HLoadNamedField>( |
- shared_info, static_cast<HValue*>(NULL), HObjectAccess::ForCodeOffset()); |
+ HValue* code_object = Add<HLoadNamedField>(shared_info, nullptr, |
+ HObjectAccess::ForCodeOffset()); |
Add<HStoreCodeEntry>(js_function, code_object); |
} |
@@ -1482,8 +1463,8 @@ HInstruction* CodeStubGraphBuilderBase::LoadFromOptimizedCodeMap( |
HValue* field_offset_value = Add<HConstant>(field_offset); |
field_slot = AddUncasted<HAdd>(iterator, field_offset_value); |
} |
- HInstruction* field_entry = Add<HLoadKeyed>(optimized_map, field_slot, |
- static_cast<HValue*>(NULL), FAST_ELEMENTS); |
+ HInstruction* field_entry = |
+ Add<HLoadKeyed>(optimized_map, field_slot, nullptr, FAST_ELEMENTS); |
return field_entry; |
} |
@@ -1495,8 +1476,7 @@ void CodeStubGraphBuilderBase::BuildInstallFromOptimizedCodeMap( |
Counters* counters = isolate()->counters(); |
IfBuilder is_optimized(this); |
HInstruction* optimized_map = Add<HLoadNamedField>( |
- shared_info, static_cast<HValue*>(NULL), |
- HObjectAccess::ForOptimizedCodeMap()); |
+ shared_info, nullptr, HObjectAccess::ForOptimizedCodeMap()); |
HValue* null_constant = Add<HConstant>(0); |
is_optimized.If<HCompareObjectEqAndBranch>(optimized_map, null_constant); |
is_optimized.Then(); |
@@ -1529,8 +1509,7 @@ void CodeStubGraphBuilderBase::BuildInstallFromOptimizedCodeMap( |
LoopBuilder::kPostDecrement, |
shared_function_entry_length); |
HValue* array_length = Add<HLoadNamedField>( |
- optimized_map, static_cast<HValue*>(NULL), |
- HObjectAccess::ForFixedArrayLength()); |
+ optimized_map, nullptr, HObjectAccess::ForFixedArrayLength()); |
HValue* start_pos = AddUncasted<HSub>(array_length, |
shared_function_entry_length); |
HValue* slot_iterator = loop_builder.BeginBody(start_pos, |
@@ -1583,9 +1562,8 @@ HValue* CodeStubGraphBuilder<FastNewClosureStub>::BuildCodeStub() { |
// Compute the function map in the current native context and set that |
// as the map of the allocated object. |
HInstruction* native_context = BuildGetNativeContext(); |
- HInstruction* map_slot_value = |
- Add<HLoadNamedField>(native_context, static_cast<HValue*>(NULL), |
- HObjectAccess::ForContextSlot(map_index)); |
+ HInstruction* map_slot_value = Add<HLoadNamedField>( |
+ native_context, nullptr, HObjectAccess::ForContextSlot(map_index)); |
Add<HStoreNamedField>(js_function, HObjectAccess::ForMap(), map_slot_value); |
// Initialize the rest of the function. |
@@ -1652,7 +1630,7 @@ HValue* CodeStubGraphBuilder<FastNewContextStub>::BuildCodeStub() { |
// Copy the global object from the previous context. |
HValue* global_object = Add<HLoadNamedField>( |
- context(), static_cast<HValue*>(NULL), |
+ context(), nullptr, |
HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); |
Add<HStoreNamedField>(function_context, |
HObjectAccess::ForContextSlot( |
@@ -1817,16 +1795,14 @@ HValue* CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildCodeStub() { |
(1 << Map::kHasIndexedInterceptor); |
BuildJSObjectCheck(receiver, bit_field_mask); |
- HValue* map = Add<HLoadNamedField>(receiver, static_cast<HValue*>(NULL), |
- HObjectAccess::ForMap()); |
+ HValue* map = |
+ Add<HLoadNamedField>(receiver, nullptr, HObjectAccess::ForMap()); |
HValue* instance_type = |
- Add<HLoadNamedField>(map, static_cast<HValue*>(NULL), |
- HObjectAccess::ForMapInstanceType()); |
+ Add<HLoadNamedField>(map, nullptr, HObjectAccess::ForMapInstanceType()); |
- HValue* bit_field2 = Add<HLoadNamedField>(map, |
- static_cast<HValue*>(NULL), |
- HObjectAccess::ForMapBitField2()); |
+ HValue* bit_field2 = |
+ Add<HLoadNamedField>(map, nullptr, HObjectAccess::ForMapBitField2()); |
IfBuilder kind_if(this); |
BuildFastElementLoad(&kind_if, receiver, key, instance_type, bit_field2, |
@@ -1916,12 +1892,10 @@ HValue* CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildCodeStub() { |
BuildNonGlobalObjectCheck(receiver); |
HValue* properties = Add<HLoadNamedField>( |
- receiver, static_cast<HValue*>(NULL), |
- HObjectAccess::ForPropertiesPointer()); |
+ receiver, nullptr, HObjectAccess::ForPropertiesPointer()); |
HValue* hash = |
- Add<HLoadNamedField>(key, static_cast<HValue*>(NULL), |
- HObjectAccess::ForNameHashField()); |
+ Add<HLoadNamedField>(key, nullptr, HObjectAccess::ForNameHashField()); |
hash = AddUncasted<HShr>(hash, Add<HConstant>(Name::kHashShift)); |
@@ -1940,8 +1914,8 @@ HValue* CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildCodeStub() { |
ExternalReference::keyed_lookup_cache_keys(isolate()); |
HValue* cache_keys = Add<HConstant>(cache_keys_ref); |
- HValue* map = Add<HLoadNamedField>(receiver, static_cast<HValue*>(NULL), |
- HObjectAccess::ForMap()); |
+ HValue* map = |
+ Add<HLoadNamedField>(receiver, nullptr, HObjectAccess::ForMap()); |
HValue* base_index = AddUncasted<HMul>(hash, Add<HConstant>(2)); |
base_index->ClearFlag(HValue::kCanOverflow); |
@@ -1963,13 +1937,13 @@ HValue* CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildCodeStub() { |
Add<HConstant>(probe_base + KeyedLookupCache::kKeyIndex)); |
key_index->ClearFlag(HValue::kCanOverflow); |
HValue* map_to_check = |
- Add<HLoadKeyed>(cache_keys, map_index, static_cast<HValue*>(NULL), |
- FAST_ELEMENTS, NEVER_RETURN_HOLE, 0); |
+ Add<HLoadKeyed>(cache_keys, map_index, nullptr, FAST_ELEMENTS, |
+ NEVER_RETURN_HOLE, 0); |
lookup_if->If<HCompareObjectEqAndBranch>(map_to_check, map); |
lookup_if->And(); |
HValue* key_to_check = |
- Add<HLoadKeyed>(cache_keys, key_index, static_cast<HValue*>(NULL), |
- FAST_ELEMENTS, NEVER_RETURN_HOLE, 0); |
+ Add<HLoadKeyed>(cache_keys, key_index, nullptr, FAST_ELEMENTS, |
+ NEVER_RETURN_HOLE, 0); |
lookup_if->If<HCompareObjectEqAndBranch>(key_to_check, key); |
lookup_if->Then(); |
{ |
@@ -1979,9 +1953,9 @@ HValue* CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildCodeStub() { |
Add<HConstant>(cache_field_offsets_ref); |
HValue* index = AddUncasted<HAdd>(hash, Add<HConstant>(probe)); |
index->ClearFlag(HValue::kCanOverflow); |
- HValue* property_index = Add<HLoadKeyed>( |
- cache_field_offsets, index, static_cast<HValue*>(NULL), |
- EXTERNAL_INT32_ELEMENTS, NEVER_RETURN_HOLE, 0); |
+ HValue* property_index = |
+ Add<HLoadKeyed>(cache_field_offsets, index, nullptr, |
+ EXTERNAL_INT32_ELEMENTS, NEVER_RETURN_HOLE, 0); |
Push(property_index); |
} |
lookup_if->Else(); |
@@ -2027,9 +2001,8 @@ void CodeStubGraphBuilderBase::TailCallHandler(HValue* receiver, HValue* name, |
// to HLoadKeyed. |
int offset = |
GetDefaultHeaderSizeForElementsKind(FAST_ELEMENTS) + kPointerSize; |
- HValue* handler_code = |
- Add<HLoadKeyed>(array, map_index, static_cast<HValue*>(NULL), |
- FAST_ELEMENTS, NEVER_RETURN_HOLE, offset); |
+ HValue* handler_code = Add<HLoadKeyed>( |
+ array, map_index, nullptr, FAST_ELEMENTS, NEVER_RETURN_HOLE, offset); |
TailCallHandler(receiver, name, slot, vector, handler_code); |
} |
@@ -2067,12 +2040,11 @@ void CodeStubGraphBuilderBase::HandleArrayCases(HValue* array, HValue* receiver, |
HConstant* constant_two = Add<HConstant>(2); |
HConstant* constant_three = Add<HConstant>(3); |
- HValue* receiver_map = AddLoadMap(receiver, static_cast<HValue*>(NULL)); |
+ HValue* receiver_map = AddLoadMap(receiver, nullptr); |
HValue* start = |
keyed_load ? graph()->GetConstant1() : graph()->GetConstant0(); |
- HValue* array_map = |
- Add<HLoadKeyed>(array, start, static_cast<HValue*>(NULL), FAST_ELEMENTS, |
- ALLOW_RETURN_HOLE); |
+ HValue* array_map = Add<HLoadKeyed>(array, start, nullptr, FAST_ELEMENTS, |
+ ALLOW_RETURN_HOLE); |
IfBuilder if_correct_map(this); |
if_correct_map.If<HCompareObjectEqAndBranch>(receiver_map, array_map); |
if_correct_map.Then(); |
@@ -2081,16 +2053,14 @@ void CodeStubGraphBuilderBase::HandleArrayCases(HValue* array, HValue* receiver, |
{ |
// If our array has more elements, the ic is polymorphic. Look for the |
// receiver map in the rest of the array. |
- HValue* length = |
- AddLoadFixedArrayLength(array, static_cast<HValue*>(NULL)); |
+ HValue* length = AddLoadFixedArrayLength(array, nullptr); |
LoopBuilder builder(this, context(), LoopBuilder::kPostIncrement, |
constant_two); |
start = keyed_load ? constant_three : constant_two; |
HValue* key = builder.BeginBody(start, length, Token::LT); |
{ |
- HValue* array_map = |
- Add<HLoadKeyed>(array, key, static_cast<HValue*>(NULL), |
- FAST_ELEMENTS, ALLOW_RETURN_HOLE); |
+ HValue* array_map = Add<HLoadKeyed>(array, key, nullptr, FAST_ELEMENTS, |
+ ALLOW_RETURN_HOLE); |
IfBuilder if_correct_poly_map(this); |
if_correct_poly_map.If<HCompareObjectEqAndBranch>(receiver_map, |
array_map); |
@@ -2113,8 +2083,8 @@ HValue* CodeStubGraphBuilder<VectorLoadStub>::BuildCodeStub() { |
// If the feedback is an array, then the IC is in the monomorphic or |
// polymorphic state. |
- HValue* feedback = Add<HLoadKeyed>(vector, slot, static_cast<HValue*>(NULL), |
- FAST_ELEMENTS, ALLOW_RETURN_HOLE); |
+ HValue* feedback = |
+ Add<HLoadKeyed>(vector, slot, nullptr, FAST_ELEMENTS, ALLOW_RETURN_HOLE); |
IfBuilder array_checker(this); |
array_checker.If<HCompareMap>(feedback, |
isolate()->factory()->fixed_array_map()); |
@@ -2156,8 +2126,8 @@ HValue* CodeStubGraphBuilder<VectorKeyedLoadStub>::BuildCodeStub() { |
// If the feedback is an array, then the IC is in the monomorphic or |
// polymorphic state. |
- HValue* feedback = Add<HLoadKeyed>(vector, slot, static_cast<HValue*>(NULL), |
- FAST_ELEMENTS, ALLOW_RETURN_HOLE); |
+ HValue* feedback = |
+ Add<HLoadKeyed>(vector, slot, nullptr, FAST_ELEMENTS, ALLOW_RETURN_HOLE); |
IfBuilder array_checker(this); |
array_checker.If<HCompareMap>(feedback, |
isolate()->factory()->fixed_array_map()); |
@@ -2165,9 +2135,8 @@ HValue* CodeStubGraphBuilder<VectorKeyedLoadStub>::BuildCodeStub() { |
{ |
// If feedback[0] is 0, then the IC has element handlers and name should be |
// a smi. If feedback[0] is a string, verify that it matches name. |
- HValue* recorded_name = |
- Add<HLoadKeyed>(feedback, zero, static_cast<HValue*>(NULL), |
- FAST_ELEMENTS, ALLOW_RETURN_HOLE); |
+ HValue* recorded_name = Add<HLoadKeyed>(feedback, zero, nullptr, |
+ FAST_ELEMENTS, ALLOW_RETURN_HOLE); |
IfBuilder recorded_name_is_zero(this); |
recorded_name_is_zero.If<HCompareObjectEqAndBranch>(recorded_name, zero); |