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

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

Issue 2642743002: Revert [TypeFeedbackVector] Root literal arrays in function literal slots (Closed)
Patch Set: Altered test for wasm. 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());
123 StoreObjectFieldNoWriteBarrier(result, JSObject::kPropertiesOffset, 124 StoreObjectFieldNoWriteBarrier(result, JSObject::kPropertiesOffset,
124 empty_fixed_array); 125 empty_fixed_array);
125 StoreObjectFieldNoWriteBarrier(result, JSObject::kElementsOffset, 126 StoreObjectFieldNoWriteBarrier(result, JSObject::kElementsOffset,
126 empty_fixed_array); 127 empty_fixed_array);
127 Node* literals_array = LoadFixedArrayElement(
128 feedback_vector, slot, 0, CodeStubAssembler::SMI_PARAMETERS);
129 StoreObjectFieldNoWriteBarrier(result, JSFunction::kLiteralsOffset, 128 StoreObjectFieldNoWriteBarrier(result, JSFunction::kLiteralsOffset,
130 literals_array); 129 empty_literals_array);
131 StoreObjectFieldNoWriteBarrier( 130 StoreObjectFieldNoWriteBarrier(
132 result, JSFunction::kPrototypeOrInitialMapOffset, TheHoleConstant()); 131 result, JSFunction::kPrototypeOrInitialMapOffset, TheHoleConstant());
133 StoreObjectFieldNoWriteBarrier(result, JSFunction::kSharedFunctionInfoOffset, 132 StoreObjectFieldNoWriteBarrier(result, JSFunction::kSharedFunctionInfoOffset,
134 shared_info); 133 shared_info);
135 StoreObjectFieldNoWriteBarrier(result, JSFunction::kContextOffset, context); 134 StoreObjectFieldNoWriteBarrier(result, JSFunction::kContextOffset, context);
136 Handle<Code> lazy_builtin_handle( 135 Handle<Code> lazy_builtin_handle(
137 isolate->builtins()->builtin(Builtins::kCompileLazy)); 136 isolate->builtins()->builtin(Builtins::kCompileLazy));
138 Node* lazy_builtin = HeapConstant(lazy_builtin_handle); 137 Node* lazy_builtin = HeapConstant(lazy_builtin_handle);
139 Node* lazy_builtin_entry = 138 Node* lazy_builtin_entry =
140 IntPtrAdd(BitcastTaggedToWord(lazy_builtin), 139 IntPtrAdd(BitcastTaggedToWord(lazy_builtin),
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 case 6: 763 case 6:
765 return FastCloneShallowObject6(); 764 return FastCloneShallowObject6();
766 default: 765 default:
767 UNREACHABLE(); 766 UNREACHABLE();
768 } 767 }
769 return Handle<Code>::null(); 768 return Handle<Code>::null();
770 } 769 }
771 770
772 } // namespace internal 771 } // namespace internal
773 } // namespace v8 772 } // 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