From d6458eb9a5697773ab661becab1825415a1f9252 Mon Sep 17 00:00:00 2001 From: "bmeurer@chromium.org" Date: Wed, 29 Jan 2014 09:48:35 +0000 Subject: [PATCH] Add dependency operand to HLoadNamedField. R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/148523011 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/code-stubs-hydrogen.cc | 57 +++++++++++------- src/hydrogen-instructions.cc | 5 ++ src/hydrogen-instructions.h | 16 +++-- src/hydrogen.cc | 135 ++++++++++++++++++++++++++----------------- 4 files changed, 134 insertions(+), 79 deletions(-) diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc index 11776d8..5d19c5c 100644 --- a/src/code-stubs-hydrogen.cc +++ b/src/code-stubs-hydrogen.cc @@ -351,7 +351,8 @@ HValue* CodeStubGraphBuilder::BuildCodeStub() { HObjectAccess access = HObjectAccess::ForAllocationSiteOffset( AllocationSite::kTransitionInfoOffset); - HInstruction* boilerplate = Add(allocation_site, access); + HInstruction* boilerplate = Add( + allocation_site, static_cast(NULL), access); HValue* push_value; if (mode == FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS) { HValue* elements = AddLoadElements(boilerplate); @@ -421,7 +422,8 @@ HValue* CodeStubGraphBuilder::BuildCodeStub() { HObjectAccess access = HObjectAccess::ForAllocationSiteOffset( AllocationSite::kTransitionInfoOffset); - HInstruction* boilerplate = Add(allocation_site, access); + HInstruction* boilerplate = Add( + allocation_site, static_cast(NULL), access); int size = JSObject::kHeaderSize + casted_stub()->length() * kPointerSize; int object_size = size; @@ -430,9 +432,11 @@ HValue* CodeStubGraphBuilder::BuildCodeStub() { } HValue* boilerplate_map = Add( - boilerplate, HObjectAccess::ForMap()); + boilerplate, static_cast(NULL), + HObjectAccess::ForMap()); HValue* boilerplate_size = Add( - boilerplate_map, HObjectAccess::ForMapInstanceSize()); + boilerplate_map, static_cast(NULL), + HObjectAccess::ForMapInstanceSize()); HValue* size_in_words = Add(object_size >> kPointerSizeLog2); checker.If(boilerplate_size, size_in_words, Token::EQ); @@ -445,9 +449,10 @@ HValue* CodeStubGraphBuilder::BuildCodeStub() { for (int i = 0; i < object_size; i += kPointerSize) { HObjectAccess access = HObjectAccess::ForJSObjectOffset(i); - Add(object, access, - Add(boilerplate, access), - INITIALIZING_STORE); + Add( + object, access, Add( + boilerplate, static_cast(NULL), access), + INITIALIZING_STORE); } ASSERT(FLAG_allocation_site_pretenuring || (size == object_size)); @@ -521,8 +526,9 @@ HValue* CodeStubGraphBuilder::BuildCodeStub() { // Link the object to the allocation site list HValue* site_list = Add( ExternalReference::allocation_sites_list_address(isolate())); - HValue* site = Add(site_list, - HObjectAccess::ForAllocationSiteList()); + HValue* site = Add( + site_list, static_cast(NULL), + HObjectAccess::ForAllocationSiteList()); store = Add(object, HObjectAccess::ForAllocationSiteOffset(AllocationSite::kWeakNextOffset), site, INITIALIZING_STORE); @@ -1069,7 +1075,8 @@ HValue* CodeStubGraphBuilder::BuildCodeInitializedStub() { HValue* cell = Add(placeholder_cell); HObjectAccess access(HObjectAccess::ForCellPayload(isolate())); - HValue* cell_contents = Add(cell, access); + HValue* cell_contents = Add( + cell, static_cast(NULL), access); if (stub->is_constant()) { IfBuilder builder(this); @@ -1147,7 +1154,8 @@ void CodeStubGraphBuilderBase::BuildInstallOptimizedCode( Add(js_function, code_object); // Now link a function into a list of optimized functions. - HValue* optimized_functions_list = Add(native_context, + HValue* optimized_functions_list = Add( + native_context, static_cast(NULL), HObjectAccess::ForContextSlot(Context::OPTIMIZED_FUNCTIONS_LIST)); Add(js_function, HObjectAccess::ForNextFunctionLinkPointer(), @@ -1166,8 +1174,8 @@ void CodeStubGraphBuilderBase::BuildInstallCode(HValue* js_function, HObjectAccess::ForNextFunctionLinkPointer(), graph()->GetConstantUndefined(), INITIALIZING_STORE); - HValue* code_object = Add(shared_info, - HObjectAccess::ForCodeOffset()); + HValue* code_object = Add( + shared_info, static_cast(NULL), HObjectAccess::ForCodeOffset()); Add(js_function, code_object); } @@ -1178,7 +1186,8 @@ void CodeStubGraphBuilderBase::BuildInstallFromOptimizedCodeMap( HValue* native_context) { Counters* counters = isolate()->counters(); IfBuilder is_optimized(this); - HInstruction* optimized_map = Add(shared_info, + HInstruction* optimized_map = Add( + shared_info, static_cast(NULL), HObjectAccess::ForOptimizedCodeMap()); HValue* null_constant = Add(0); is_optimized.If(optimized_map, null_constant); @@ -1193,9 +1202,11 @@ void CodeStubGraphBuilderBase::BuildInstallFromOptimizedCodeMap( // (native context, optimized code, literals). // Map must never be empty, so check the first elements. Label install_optimized; - HValue* first_context_slot = Add(optimized_map, + HValue* first_context_slot = Add( + optimized_map, static_cast(NULL), HObjectAccess::ForFirstContextSlot()); - HValue* first_osr_ast_slot = Add(optimized_map, + HValue* first_osr_ast_slot = Add( + optimized_map, static_cast(NULL), HObjectAccess::ForFirstOsrAstIdSlot()); HValue* osr_ast_id_none = Add(BailoutId::None().ToInt()); IfBuilder already_in(this); @@ -1205,8 +1216,9 @@ void CodeStubGraphBuilderBase::BuildInstallFromOptimizedCodeMap( osr_ast_id_none); already_in.Then(); { - HValue* code_object = Add(optimized_map, - HObjectAccess::ForFirstCodeSlot()); + HValue* code_object = Add( + optimized_map, static_cast(NULL), + HObjectAccess::ForFirstCodeSlot()); BuildInstallOptimizedCode(js_function, native_context, code_object); } already_in.Else(); @@ -1217,7 +1229,8 @@ void CodeStubGraphBuilderBase::BuildInstallFromOptimizedCodeMap( context(), LoopBuilder::kPostDecrement, shared_function_entry_length); - HValue* array_length = Add(optimized_map, + HValue* array_length = Add( + optimized_map, static_cast(NULL), HObjectAccess::ForFixedArrayLength()); HValue* slot_iterator = loop_builder.BeginBody(array_length, graph()->GetConstant0(), @@ -1300,7 +1313,8 @@ HValue* CodeStubGraphBuilder::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(native_context, + HInstruction* map_slot_value = Add( + native_context, static_cast(NULL), HObjectAccess::ForContextSlot(map_index)); Add(js_function, HObjectAccess::ForMap(), map_slot_value, INITIALIZING_STORE); @@ -1370,7 +1384,8 @@ HValue* CodeStubGraphBuilder::BuildCodeStub() { // Copy the global object from the previous context. HValue* global_object = Add( - context(), HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); + context(), static_cast(NULL), + HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); Add(function_context, HObjectAccess::ForContextSlot( Context::GLOBAL_OBJECT_INDEX), diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc index 967bce4..889ebfd 100644 --- a/src/hydrogen-instructions.cc +++ b/src/hydrogen-instructions.cc @@ -3049,6 +3049,11 @@ void HParameter::PrintDataTo(StringStream* stream) { void HLoadNamedField::PrintDataTo(StringStream* stream) { object()->PrintNameTo(stream); access_.PrintTo(stream); + + if (HasDependency()) { + stream->Add(" "); + dependency()->PrintNameTo(stream); + } } diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index a458092..43d3d1a 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -6048,12 +6048,17 @@ class HObjectAccess V8_FINAL { }; -class HLoadNamedField V8_FINAL : public HTemplateInstruction<1> { +class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> { public: - DECLARE_INSTRUCTION_FACTORY_P2(HLoadNamedField, HValue*, HObjectAccess); + DECLARE_INSTRUCTION_FACTORY_P3(HLoadNamedField, HValue*, HValue*, + HObjectAccess); HValue* object() { return OperandAt(0); } - bool HasTypeCheck() { return object()->IsCheckMaps(); } + HValue* dependency() { + ASSERT(HasDependency()); + return OperandAt(1); + } + bool HasDependency() const { return OperandAt(0) != OperandAt(1); } HObjectAccess access() const { return access_; } Representation field_representation() const { return access_.representation(); @@ -6082,9 +6087,12 @@ class HLoadNamedField V8_FINAL : public HTemplateInstruction<1> { } private: - HLoadNamedField(HValue* object, HObjectAccess access) : access_(access) { + HLoadNamedField(HValue* object, + HValue* dependency, + HObjectAccess access) : access_(access) { ASSERT(object != NULL); SetOperandAt(0, object); + SetOperandAt(1, dependency != NULL ? dependency : object); Representation representation = access.representation(); if (representation.IsInteger8() || diff --git a/src/hydrogen.cc b/src/hydrogen.cc index e46fa96..bd3e84b 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -1194,8 +1194,8 @@ void HGraphBuilder::FinishExitCurrentBlock(HControlInstruction* instruction) { void HGraphBuilder::AddIncrementCounter(StatsCounter* counter) { if (FLAG_native_code_counters && counter->Enabled()) { HValue* reference = Add(ExternalReference(counter)); - HValue* old_value = Add(reference, - HObjectAccess::ForCounter()); + HValue* old_value = Add( + reference, static_cast(NULL), HObjectAccess::ForCounter()); HValue* new_value = AddUncasted(old_value, graph()->GetConstant1()); new_value->ClearFlag(HValue::kCanOverflow); // Ignore counter overflow Add(reference, HObjectAccess::ForCounter(), @@ -1413,7 +1413,8 @@ void HGraphBuilder::BuildTransitionElementsKind(HValue* object, HInstruction* elements_length = AddLoadFixedArrayLength(elements); HInstruction* array_length = is_jsarray - ? Add(object, HObjectAccess::ForArrayLength(from_kind)) + ? Add(object, static_cast(NULL), + HObjectAccess::ForArrayLength(from_kind)) : elements_length; BuildGrowElementsCapacity(object, elements, from_kind, to_kind, @@ -1615,15 +1616,17 @@ HValue* HGraphBuilder::BuildNumberToString(HValue* object, Type* type) { } else { // Check if the object is a heap number. IfBuilder if_objectisnumber(this); - if_objectisnumber.If( + HValue* objectisnumber = if_objectisnumber.If( object, isolate()->factory()->heap_number_map()); if_objectisnumber.Then(); { // Compute hash for heap number similar to double_get_hash(). HValue* low = Add( - object, HObjectAccess::ForHeapNumberValueLowestBits()); + object, objectisnumber, + HObjectAccess::ForHeapNumberValueLowestBits()); HValue* high = Add( - object, HObjectAccess::ForHeapNumberValueHighestBits()); + object, objectisnumber, + HObjectAccess::ForHeapNumberValueHighestBits()); HValue* hash = AddUncasted(Token::BIT_XOR, low, high); hash = AddUncasted(Token::BIT_AND, hash, mask); @@ -1636,14 +1639,16 @@ HValue* HGraphBuilder::BuildNumberToString(HValue* object, Type* type) { // Check if key is a heap number (the number string cache contains only // SMIs and heap number, so it is sufficient to do a SMI check here). IfBuilder if_keyisnotsmi(this); - if_keyisnotsmi.IfNot(key); + HValue* keyisnotsmi = if_keyisnotsmi.IfNot(key); if_keyisnotsmi.Then(); { // Check if values of key and object match. IfBuilder if_keyeqobject(this); if_keyeqobject.If( - Add(key, HObjectAccess::ForHeapNumberValue()), - Add(object, HObjectAccess::ForHeapNumberValue()), + Add(key, keyisnotsmi, + HObjectAccess::ForHeapNumberValue()), + Add(object, objectisnumber, + HObjectAccess::ForHeapNumberValue()), Token::EQ); if_keyeqobject.Then(); { @@ -2111,7 +2116,8 @@ HInstruction* HGraphBuilder::BuildUncheckedMonomorphicElementAccess( HInstruction* length = NULL; if (is_js_array) { length = Add( - checked_object, HObjectAccess::ForArrayLength(elements_kind)); + checked_object, static_cast(NULL), + HObjectAccess::ForArrayLength(elements_kind)); } else { length = AddLoadFixedArrayLength(elements); } @@ -2122,7 +2128,8 @@ HInstruction* HGraphBuilder::BuildUncheckedMonomorphicElementAccess( HValue* backing_store; if (IsExternalArrayElementsKind(elements_kind)) { backing_store = Add( - elements, HObjectAccess::ForExternalArrayExternalPointer()); + elements, static_cast(NULL), + HObjectAccess::ForExternalArrayExternalPointer()); } else { backing_store = elements; } @@ -2355,13 +2362,14 @@ HInstruction* HGraphBuilder::AddElementAccess( HLoadNamedField* HGraphBuilder::AddLoadElements(HValue* object) { - return Add(object, HObjectAccess::ForElementsPointer()); + return Add( + object, static_cast(NULL), HObjectAccess::ForElementsPointer()); } HLoadNamedField* HGraphBuilder::AddLoadFixedArrayLength(HValue* object) { - return Add(object, - HObjectAccess::ForFixedArrayLength()); + return Add( + object, static_cast(NULL), HObjectAccess::ForFixedArrayLength()); } @@ -2548,9 +2556,10 @@ HValue* HGraphBuilder::BuildCloneShallowArray(HValue* boilerplate, for (int i = 0; i < JSArray::kSize; i += kPointerSize) { if ((i != JSArray::kElementsOffset) || (length == 0)) { HObjectAccess access = HObjectAccess::ForJSArrayOffset(i); - Add(object, access, - Add(boilerplate, access), - INITIALIZING_STORE); + Add( + object, access, Add( + boilerplate, static_cast(NULL), access), + INITIALIZING_STORE); } } @@ -2578,9 +2587,10 @@ HValue* HGraphBuilder::BuildCloneShallowArray(HValue* boilerplate, // Copy the elements array header. for (int i = 0; i < FixedArrayBase::kHeaderSize; i += kPointerSize) { HObjectAccess access = HObjectAccess::ForFixedArrayHeader(i); - Add(object_elements, access, - Add(boilerplate_elements, access), - INITIALIZING_STORE); + Add( + object_elements, access, Add( + boilerplate_elements, static_cast(NULL), access), + INITIALIZING_STORE); } // Copy the elements array contents. @@ -2666,7 +2676,8 @@ void HGraphBuilder::BuildCreateAllocationMemento( allocation_site, INITIALIZING_STORE); if (FLAG_allocation_site_pretenuring) { HValue* memento_create_count = Add( - allocation_site, HObjectAccess::ForAllocationSiteOffset( + allocation_site, static_cast(NULL), + HObjectAccess::ForAllocationSiteOffset( AllocationSite::kPretenureCreateCountOffset)); memento_create_count = AddUncasted( memento_create_count, graph()->GetConstant1()); @@ -2686,22 +2697,26 @@ void HGraphBuilder::BuildCreateAllocationMemento( HInstruction* HGraphBuilder::BuildGetNativeContext(HValue* closure) { // Get the global context, then the native context HInstruction* context = - Add(closure, HObjectAccess::ForFunctionContextPointer()); - HInstruction* global_object = Add(context, + Add(closure, static_cast(NULL), + HObjectAccess::ForFunctionContextPointer()); + HInstruction* global_object = Add( + context, static_cast(NULL), HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); HObjectAccess access = HObjectAccess::ForJSObjectOffset( GlobalObject::kNativeContextOffset); - return Add(global_object, access); + return Add( + global_object, static_cast(NULL), access); } HInstruction* HGraphBuilder::BuildGetNativeContext() { // Get the global context, then the native context HValue* global_object = Add( - context(), HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); + context(), static_cast(NULL), + HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); return Add( - global_object, HObjectAccess::ForJSObjectOffset( - GlobalObject::kNativeContextOffset)); + global_object, static_cast(NULL), + HObjectAccess::ForJSObjectOffset(GlobalObject::kNativeContextOffset)); } @@ -2898,13 +2913,16 @@ HStoreNamedField* HGraphBuilder::AddStoreMapConstant(HValue *object, HValue* HGraphBuilder::AddLoadJSBuiltin(Builtins::JavaScript builtin) { HValue* global_object = Add( - context(), HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); + context(), static_cast(NULL), + HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); HObjectAccess access = HObjectAccess::ForJSObjectOffset( GlobalObject::kBuiltinsOffset); - HValue* builtins = Add(global_object, access); + HValue* builtins = Add( + global_object, static_cast(NULL), access); HObjectAccess function_access = HObjectAccess::ForJSObjectOffset( JSBuiltinsObject::OffsetOfFunctionWithId(builtin)); - return Add(builtins, function_access); + return Add( + builtins, static_cast(NULL), function_access); } @@ -4780,8 +4798,8 @@ void HOptimizedGraphBuilder::VisitVariableProxy(VariableProxy* expr) { } } else { HValue* global_object = Add( - context(), HObjectAccess::ForContextSlot( - Context::GLOBAL_OBJECT_INDEX)); + context(), static_cast(NULL), + HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); HLoadGlobalGeneric* instr = New(global_object, variable->name(), @@ -5306,8 +5324,8 @@ HInstruction* HOptimizedGraphBuilder::BuildStoreNamedField( heap_number, INITIALIZING_STORE); } else { // Already holds a HeapNumber; load the box and write its value field. - HInstruction* heap_number = Add(checked_object, - heap_number_access); + HInstruction* heap_number = Add( + checked_object, static_cast(NULL), heap_number_access); heap_number->set_type(HType::HeapNumber()); instr = New(heap_number, HObjectAccess::ForHeapNumberValue(), @@ -5526,7 +5544,8 @@ HInstruction* HOptimizedGraphBuilder::BuildLoadMonomorphic( HObjectAccess access = HObjectAccess::ForMap(); // bogus default if (info->GetJSObjectFieldAccess(&access)) { - return New(checked_object, access); + return New( + checked_object, static_cast(NULL), access); } HValue* checked_holder = checked_object; @@ -5906,7 +5925,8 @@ void HOptimizedGraphBuilder::HandleGlobalVariableAssignment( } } else { HValue* global_object = Add( - context(), HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); + context(), static_cast(NULL), + HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); HStoreNamedGeneric* instr = Add(global_object, var->name(), value, function_strict_mode_flag()); @@ -6181,13 +6201,15 @@ HLoadNamedField* HGraphBuilder::BuildLoadNamedField(HValue* object, if (FLAG_track_double_fields && access.representation().IsDouble()) { // load the heap number HLoadNamedField* heap_number = Add( - object, access.WithRepresentation(Representation::Tagged())); + object, static_cast(NULL), + access.WithRepresentation(Representation::Tagged())); heap_number->set_type(HType::HeapNumber()); // load the double value from it return New( - heap_number, HObjectAccess::ForHeapNumberValue()); + heap_number, static_cast(NULL), + HObjectAccess::ForHeapNumberValue()); } - return New(object, access); + return New(object, static_cast(NULL), access); } @@ -6840,7 +6862,8 @@ HInstruction* HOptimizedGraphBuilder::BuildCallConstantFunction( return NewPlainFunctionCall(target, argument_count, dont_adapt_arguments); } else { HValue* param_count_value = Add(formal_parameter_count); - HValue* context = Add(target, + HValue* context = Add( + target, static_cast(NULL), HObjectAccess::ForFunctionContextPointer()); return NewArgumentAdaptorCall(target, context, argument_count, param_count_value); @@ -7673,7 +7696,8 @@ bool HOptimizedGraphBuilder::TryInlineBuiltinMethodCall( elements, isolate()->factory()->fixed_array_map(), top_info()); } HValue* length = Add( - checked_object, HObjectAccess::ForArrayLength(elements_kind)); + checked_object, static_cast(NULL), + HObjectAccess::ForArrayLength(elements_kind)); reduced_length = AddUncasted(length, graph()->GetConstant1()); HValue* bounds_check = Add( graph()->GetConstant0(), length); @@ -7831,13 +7855,13 @@ HValue* HOptimizedGraphBuilder::ImplicitReceiverFor(HValue* function, SharedFunctionInfo* shared = target->shared(); if (shared->is_classic_mode() && !shared->native()) { HValue* context = Add( - function, + function, static_cast(NULL), HObjectAccess::ForJSObjectOffset(JSFunction::kContextOffset)); HValue* global_object = Add( - context, + context, static_cast(NULL), HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); return Add( - global_object, + global_object, static_cast(NULL), HObjectAccess::ForJSObjectOffset( GlobalObject::kGlobalReceiverOffset)); } @@ -7960,8 +7984,8 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) { // Push the global object instead of the global receiver because // code generated by the full code generator expects it. HValue* global_object = Add( - context(), HObjectAccess::ForContextSlot( - Context::GLOBAL_OBJECT_INDEX)); + context(), static_cast(NULL), + HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); Push(global_object); CHECK_ALIVE(VisitExpressions(expr->arguments())); @@ -7993,8 +8017,8 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) { // We're about to install a contextual IC, which expects the global // object as receiver rather than the global proxy. HValue* global_object = Add( - context(), HObjectAccess::ForContextSlot( - Context::GLOBAL_OBJECT_INDEX)); + context(), static_cast(NULL), + HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); const int receiver_index = argument_count - 1; environment()->SetExpressionStackAt(receiver_index, global_object); // When the target has a custom call IC generator, use the IC, @@ -8007,8 +8031,8 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) { } } else { HValue* receiver = Add( - context(), HObjectAccess::ForContextSlot( - Context::GLOBAL_OBJECT_INDEX)); + context(), static_cast(NULL), + HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); Push(Add(receiver)); CHECK_ALIVE(VisitArgumentList(expr->arguments())); @@ -8227,8 +8251,9 @@ void HOptimizedGraphBuilder::VisitCallNew(CallNew* expr) { // Load the initial map from the constructor. HValue* constructor_value = Add(constructor); HValue* initial_map_value = - Add(constructor_value, HObjectAccess::ForJSObjectOffset( - JSFunction::kPrototypeOrInitialMapOffset)); + Add(constructor_value, static_cast(NULL), + HObjectAccess::ForJSObjectOffset( + JSFunction::kPrototypeOrInitialMapOffset)); // Initialize map and fields of the newly allocated object. { NoObservableSideEffectsScope no_effects(this); @@ -8353,7 +8378,8 @@ void HGraphBuilder::BuildArrayBufferViewInitialization( HObjectAccess::ForJSArrayBufferWeakFirstView(); Add(obj, HObjectAccess::ForJSArrayBufferViewWeakNext(), - Add(buffer, weak_first_view_access), + Add(buffer, static_cast(NULL), + weak_first_view_access), INITIALIZING_STORE); Add( buffer, weak_first_view_access, obj, INITIALIZING_STORE); @@ -8460,7 +8486,8 @@ void HOptimizedGraphBuilder::VisitTypedArrayInitialize( AddStoreMapConstant(elements, external_array_map); HValue* backing_store = Add( - buffer, HObjectAccess::ForJSArrayBufferBackingStore()); + buffer, static_cast(NULL), + HObjectAccess::ForJSArrayBufferBackingStore()); HValue* typed_array_start; if (is_zero_byte_offset) { -- 2.7.4