Index: src/builtins/builtins-constructor.cc |
diff --git a/src/builtins/builtins-constructor.cc b/src/builtins/builtins-constructor.cc |
index db3ffb0b91c4ee7b712aeac68cc26257c7fecfcc..0ef352c9ecfed01744f866b05532b57a7e231bb3 100644 |
--- a/src/builtins/builtins-constructor.cc |
+++ b/src/builtins/builtins-constructor.cc |
@@ -120,13 +120,14 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewClosure(Node* shared_info, |
// Initialize the rest of the function. |
Node* empty_fixed_array = HeapConstant(factory->empty_fixed_array()); |
- Node* empty_literals_array = HeapConstant(factory->empty_literals_array()); |
+ Node* empty_feedback_vector = |
+ HeapConstant(factory->empty_type_feedback_vector()); |
StoreObjectFieldNoWriteBarrier(result, JSObject::kPropertiesOffset, |
empty_fixed_array); |
StoreObjectFieldNoWriteBarrier(result, JSObject::kElementsOffset, |
empty_fixed_array); |
- StoreObjectFieldNoWriteBarrier(result, JSFunction::kLiteralsOffset, |
- empty_literals_array); |
+ StoreObjectFieldNoWriteBarrier(result, JSFunction::kFeedbackVectorOffset, |
+ empty_feedback_vector); |
StoreObjectFieldNoWriteBarrier( |
result, JSFunction::kPrototypeOrInitialMapOffset, TheHoleConstant()); |
StoreObjectFieldNoWriteBarrier(result, JSFunction::kSharedFunctionInfoOffset, |
@@ -400,11 +401,10 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneRegExp(Node* closure, |
Variable result(this, MachineRepresentation::kTagged); |
- Node* literals_array = LoadObjectField(closure, JSFunction::kLiteralsOffset); |
- Node* boilerplate = |
- LoadFixedArrayElement(literals_array, literal_index, |
- LiteralsArray::kFirstLiteralIndex * kPointerSize, |
- CodeStubAssembler::SMI_PARAMETERS); |
+ Node* vector_array = |
+ LoadObjectField(closure, JSFunction::kFeedbackVectorOffset); |
+ Node* boilerplate = LoadFixedArrayElement(vector_array, literal_index, 0, |
+ CodeStubAssembler::SMI_PARAMETERS); |
GotoIf(IsUndefined(boilerplate), &call_runtime); |
{ |
@@ -484,17 +484,14 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowArray( |
return_result(this); |
Variable result(this, MachineRepresentation::kTagged); |
- Node* literals_array = LoadObjectField(closure, JSFunction::kLiteralsOffset); |
- Node* allocation_site = |
- LoadFixedArrayElement(literals_array, literal_index, |
- LiteralsArray::kFirstLiteralIndex * kPointerSize, |
- CodeStubAssembler::SMI_PARAMETERS); |
+ Node* vector_array = |
+ LoadObjectField(closure, JSFunction::kFeedbackVectorOffset); |
+ Node* allocation_site = LoadFixedArrayElement( |
+ vector_array, literal_index, 0, CodeStubAssembler::SMI_PARAMETERS); |
GotoIf(IsUndefined(allocation_site), call_runtime); |
- allocation_site = |
- LoadFixedArrayElement(literals_array, literal_index, |
- LiteralsArray::kFirstLiteralIndex * kPointerSize, |
- CodeStubAssembler::SMI_PARAMETERS); |
+ allocation_site = LoadFixedArrayElement(vector_array, literal_index, 0, |
+ CodeStubAssembler::SMI_PARAMETERS); |
Node* boilerplate = |
LoadObjectField(allocation_site, AllocationSite::kTransitionInfoOffset); |
@@ -645,11 +642,10 @@ int ConstructorBuiltinsAssembler::FastCloneShallowObjectPropertiesCount( |
Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowObject( |
CodeAssemblerLabel* call_runtime, Node* closure, Node* literals_index, |
Node* properties_count) { |
- Node* literals_array = LoadObjectField(closure, JSFunction::kLiteralsOffset); |
- Node* allocation_site = |
- LoadFixedArrayElement(literals_array, literals_index, |
- LiteralsArray::kFirstLiteralIndex * kPointerSize, |
- CodeStubAssembler::SMI_PARAMETERS); |
+ Node* vector_array = |
+ LoadObjectField(closure, JSFunction::kFeedbackVectorOffset); |
+ Node* allocation_site = LoadFixedArrayElement( |
+ vector_array, literals_index, 0, CodeStubAssembler::SMI_PARAMETERS); |
GotoIf(IsUndefined(allocation_site), call_runtime); |
// Calculate the object and allocation size based on the properties count. |