Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Side by Side Diff: src/builtins/builtins-constructor.cc

Issue 2642933003: Revert of Revert [TypeFeedbackVector] Root literal arrays in function literal slots (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/builtins/arm64/builtins-arm64.cc ('k') | src/builtins/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/builtins/builtins-constructor.h" 5 #include "src/builtins/builtins-constructor.h"
6 #include "src/ast/ast.h" 6 #include "src/ast/ast.h"
7 #include "src/builtins/builtins-utils.h" 7 #include "src/builtins/builtins-utils.h"
8 #include "src/builtins/builtins.h" 8 #include "src/builtins/builtins.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stub-assembler.h" 10 #include "src/code-stub-assembler.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 // Get the function map in the current native context and set that 114 // Get the function map in the current native context and set that
115 // as the map of the allocated object. 115 // as the map of the allocated object.
116 Node* native_context = LoadNativeContext(context); 116 Node* native_context = LoadNativeContext(context);
117 Node* map_slot_value = 117 Node* map_slot_value =
118 LoadFixedArrayElement(native_context, map_index.value()); 118 LoadFixedArrayElement(native_context, map_index.value());
119 StoreMapNoWriteBarrier(result, map_slot_value); 119 StoreMapNoWriteBarrier(result, map_slot_value);
120 120
121 // Initialize the rest of the function. 121 // Initialize the rest of the function.
122 Node* empty_fixed_array = HeapConstant(factory->empty_fixed_array()); 122 Node* empty_fixed_array = HeapConstant(factory->empty_fixed_array());
123 Node* empty_literals_array = HeapConstant(factory->empty_literals_array());
124 StoreObjectFieldNoWriteBarrier(result, JSObject::kPropertiesOffset, 123 StoreObjectFieldNoWriteBarrier(result, JSObject::kPropertiesOffset,
125 empty_fixed_array); 124 empty_fixed_array);
126 StoreObjectFieldNoWriteBarrier(result, JSObject::kElementsOffset, 125 StoreObjectFieldNoWriteBarrier(result, JSObject::kElementsOffset,
127 empty_fixed_array); 126 empty_fixed_array);
127 Node* literals_array = LoadFixedArrayElement(
128 feedback_vector, slot, 0, CodeStubAssembler::SMI_PARAMETERS);
128 StoreObjectFieldNoWriteBarrier(result, JSFunction::kLiteralsOffset, 129 StoreObjectFieldNoWriteBarrier(result, JSFunction::kLiteralsOffset,
129 empty_literals_array); 130 literals_array);
130 StoreObjectFieldNoWriteBarrier( 131 StoreObjectFieldNoWriteBarrier(
131 result, JSFunction::kPrototypeOrInitialMapOffset, TheHoleConstant()); 132 result, JSFunction::kPrototypeOrInitialMapOffset, TheHoleConstant());
132 StoreObjectFieldNoWriteBarrier(result, JSFunction::kSharedFunctionInfoOffset, 133 StoreObjectFieldNoWriteBarrier(result, JSFunction::kSharedFunctionInfoOffset,
133 shared_info); 134 shared_info);
134 StoreObjectFieldNoWriteBarrier(result, JSFunction::kContextOffset, context); 135 StoreObjectFieldNoWriteBarrier(result, JSFunction::kContextOffset, context);
135 Handle<Code> lazy_builtin_handle( 136 Handle<Code> lazy_builtin_handle(
136 isolate->builtins()->builtin(Builtins::kCompileLazy)); 137 isolate->builtins()->builtin(Builtins::kCompileLazy));
137 Node* lazy_builtin = HeapConstant(lazy_builtin_handle); 138 Node* lazy_builtin = HeapConstant(lazy_builtin_handle);
138 Node* lazy_builtin_entry = 139 Node* lazy_builtin_entry =
139 IntPtrAdd(BitcastTaggedToWord(lazy_builtin), 140 IntPtrAdd(BitcastTaggedToWord(lazy_builtin),
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 case 6: 764 case 6:
764 return FastCloneShallowObject6(); 765 return FastCloneShallowObject6();
765 default: 766 default:
766 UNREACHABLE(); 767 UNREACHABLE();
767 } 768 }
768 return Handle<Code>::null(); 769 return Handle<Code>::null();
769 } 770 }
770 771
771 } // namespace internal 772 } // namespace internal
772 } // namespace v8 773 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/arm64/builtins-arm64.cc ('k') | src/builtins/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698