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

Side by Side Diff: src/code-stub-assembler.cc

Issue 2322283002: [stubs] Fix performance regression on x64 caused by modified double hole check. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | 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/code-stub-assembler.h" 5 #include "src/code-stub-assembler.h"
6 #include "src/code-factory.h" 6 #include "src/code-factory.h"
7 #include "src/frames-inl.h" 7 #include "src/frames-inl.h"
8 #include "src/frames.h" 8 #include "src/frames.h"
9 #include "src/ic/handler-configuration.h" 9 #include "src/ic/handler-configuration.h"
10 #include "src/ic/stub-cache.h" 10 #include "src/ic/stub-cache.h"
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 FixedDoubleArray::kHeaderSize + additional_offset - kHeapObjectTag; 1144 FixedDoubleArray::kHeaderSize + additional_offset - kHeapObjectTag;
1145 Node* offset = ElementOffsetFromIndex(index_node, FAST_HOLEY_DOUBLE_ELEMENTS, 1145 Node* offset = ElementOffsetFromIndex(index_node, FAST_HOLEY_DOUBLE_ELEMENTS,
1146 parameter_mode, header_size); 1146 parameter_mode, header_size);
1147 return LoadDoubleWithHoleCheck(object, offset, if_hole, machine_type); 1147 return LoadDoubleWithHoleCheck(object, offset, if_hole, machine_type);
1148 } 1148 }
1149 1149
1150 Node* CodeStubAssembler::LoadDoubleWithHoleCheck(Node* base, Node* offset, 1150 Node* CodeStubAssembler::LoadDoubleWithHoleCheck(Node* base, Node* offset,
1151 Label* if_hole, 1151 Label* if_hole,
1152 MachineType machine_type) { 1152 MachineType machine_type) {
1153 if (if_hole) { 1153 if (if_hole) {
1154 Node* element_upper = 1154 // TODO(ishell): Compare only the upper part for the hole once the
1155 Load(MachineType::Uint32(), base, 1155 // compiler is able to fold addition of already complex |offset| with
1156 IntPtrAdd(offset, IntPtrConstant(kIeeeDoubleExponentWordOffset))); 1156 // |kIeeeDoubleExponentWordOffset| into one addressing mode.
1157 GotoIf(Word32Equal(element_upper, Int32Constant(kHoleNanUpper32)), if_hole); 1157 if (Is64()) {
1158 Node* element = Load(MachineType::Uint64(), base, offset);
1159 GotoIf(Word64Equal(element, Int64Constant(kHoleNanInt64)), if_hole);
1160 } else {
1161 Node* element_upper = Load(
1162 MachineType::Uint32(), base,
1163 IntPtrAdd(offset, IntPtrConstant(kIeeeDoubleExponentWordOffset)));
1164 GotoIf(Word32Equal(element_upper, Int32Constant(kHoleNanUpper32)),
1165 if_hole);
1166 }
1158 } 1167 }
1159 if (machine_type.IsNone()) { 1168 if (machine_type.IsNone()) {
1160 // This means the actual value is not needed. 1169 // This means the actual value is not needed.
1161 return nullptr; 1170 return nullptr;
1162 } 1171 }
1163 return Load(machine_type, base, offset); 1172 return Load(machine_type, base, offset);
1164 } 1173 }
1165 1174
1166 Node* CodeStubAssembler::LoadNativeContext(Node* context) { 1175 Node* CodeStubAssembler::LoadNativeContext(Node* context) {
1167 return LoadFixedArrayElement(context, 1176 return LoadFixedArrayElement(context,
(...skipping 3037 matching lines...) Expand 10 before | Expand all | Expand 10 after
4205 Heap::kTheHoleValueRootIndex); 4214 Heap::kTheHoleValueRootIndex);
4206 4215
4207 // Store the WeakCell in the feedback vector. 4216 // Store the WeakCell in the feedback vector.
4208 StoreFixedArrayElement(feedback_vector, slot, cell, UPDATE_WRITE_BARRIER, 4217 StoreFixedArrayElement(feedback_vector, slot, cell, UPDATE_WRITE_BARRIER,
4209 CodeStubAssembler::SMI_PARAMETERS); 4218 CodeStubAssembler::SMI_PARAMETERS);
4210 return cell; 4219 return cell;
4211 } 4220 }
4212 4221
4213 } // namespace internal 4222 } // namespace internal
4214 } // namespace v8 4223 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698