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/ic/x64/ic-x64.cc

Issue 757673002: Don't double smi-tag the mask used to check read-only / field mode in the dictionary-store-stub on … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 // If probing finds an entry in the dictionary, scratch0 contains the 113 // If probing finds an entry in the dictionary, scratch0 contains the
114 // index into the dictionary. Check that the value is a normal 114 // index into the dictionary. Check that the value is a normal
115 // property that is not read only. 115 // property that is not read only.
116 __ bind(&done); 116 __ bind(&done);
117 const int kElementsStartOffset = 117 const int kElementsStartOffset =
118 NameDictionary::kHeaderSize + 118 NameDictionary::kHeaderSize +
119 NameDictionary::kElementsStartIndex * kPointerSize; 119 NameDictionary::kElementsStartIndex * kPointerSize;
120 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; 120 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize;
121 const int kTypeAndReadOnlyMask = 121 const int kTypeAndReadOnlyMask =
122 (PropertyDetails::TypeField::kMask | 122 PropertyDetails::TypeField::kMask |
123 PropertyDetails::AttributesField::encode(READ_ONLY)) 123 PropertyDetails::AttributesField::encode(READ_ONLY);
124 << kSmiTagSize;
125 __ Test(Operand(elements, scratch1, times_pointer_size, 124 __ Test(Operand(elements, scratch1, times_pointer_size,
126 kDetailsOffset - kHeapObjectTag), 125 kDetailsOffset - kHeapObjectTag),
127 Smi::FromInt(kTypeAndReadOnlyMask)); 126 Smi::FromInt(kTypeAndReadOnlyMask));
128 __ j(not_zero, miss_label); 127 __ j(not_zero, miss_label);
129 128
130 // Store the value at the masked, scaled index. 129 // Store the value at the masked, scaled index.
131 const int kValueOffset = kElementsStartOffset + kPointerSize; 130 const int kValueOffset = kElementsStartOffset + kPointerSize;
132 __ leap(scratch1, Operand(elements, scratch1, times_pointer_size, 131 __ leap(scratch1, Operand(elements, scratch1, times_pointer_size,
133 kValueOffset - kHeapObjectTag)); 132 kValueOffset - kHeapObjectTag));
134 __ movp(Operand(scratch1, 0), value); 133 __ movp(Operand(scratch1, 0), value);
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 Condition cc = 969 Condition cc =
971 (check == ENABLE_INLINED_SMI_CHECK) 970 (check == ENABLE_INLINED_SMI_CHECK)
972 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 971 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
973 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 972 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
974 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 973 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
975 } 974 }
976 } 975 }
977 } // namespace v8::internal 976 } // namespace v8::internal
978 977
979 #endif // V8_TARGET_ARCH_X64 978 #endif // V8_TARGET_ARCH_X64
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