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

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

Issue 2964633002: CSA fast path for Map.prototype.(Get|Has) for string keys. (Closed)
Patch Set: Fix Created 3 years, 5 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
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 #include "src/code-stub-assembler.h" 4 #include "src/code-stub-assembler.h"
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/frames-inl.h" 6 #include "src/frames-inl.h"
7 #include "src/frames.h" 7 #include "src/frames.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 } 1213 }
1214 1214
1215 Node* CodeStubAssembler::LoadNameHashField(Node* name) { 1215 Node* CodeStubAssembler::LoadNameHashField(Node* name) {
1216 CSA_ASSERT(this, IsName(name)); 1216 CSA_ASSERT(this, IsName(name));
1217 return LoadObjectField(name, Name::kHashFieldOffset, MachineType::Uint32()); 1217 return LoadObjectField(name, Name::kHashFieldOffset, MachineType::Uint32());
1218 } 1218 }
1219 1219
1220 Node* CodeStubAssembler::LoadNameHash(Node* name, Label* if_hash_not_computed) { 1220 Node* CodeStubAssembler::LoadNameHash(Node* name, Label* if_hash_not_computed) {
1221 Node* hash_field = LoadNameHashField(name); 1221 Node* hash_field = LoadNameHashField(name);
1222 if (if_hash_not_computed != nullptr) { 1222 if (if_hash_not_computed != nullptr) {
1223 GotoIf(IsClearWord32(hash_field, Name::kHashNotComputedMask), 1223 GotoIf(IsSetWord32(hash_field, Name::kHashNotComputedMask),
Camillo Bruni 2017/07/03 14:51:29 doh! that might have been me during a refactoring.
Jarin 2017/07/04 04:24:47 Acknowledged.
1224 if_hash_not_computed); 1224 if_hash_not_computed);
1225 } 1225 }
1226 return Word32Shr(hash_field, Int32Constant(Name::kHashShift)); 1226 return Word32Shr(hash_field, Int32Constant(Name::kHashShift));
1227 } 1227 }
1228 1228
1229 Node* CodeStubAssembler::LoadStringLength(Node* object) { 1229 Node* CodeStubAssembler::LoadStringLength(Node* object) {
1230 CSA_ASSERT(this, IsString(object)); 1230 CSA_ASSERT(this, IsString(object));
1231 return LoadObjectField(object, String::kLengthOffset); 1231 return LoadObjectField(object, String::kLengthOffset);
1232 } 1232 }
1233 1233
(...skipping 8151 matching lines...) Expand 10 before | Expand all | Expand 10 after
9385 formatted.c_str(), TENURED); 9385 formatted.c_str(), TENURED);
9386 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), 9386 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(),
9387 HeapConstant(string)); 9387 HeapConstant(string));
9388 } 9388 }
9389 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); 9389 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value);
9390 #endif 9390 #endif
9391 } 9391 }
9392 9392
9393 } // namespace internal 9393 } // namespace internal
9394 } // namespace v8 9394 } // namespace v8
OLDNEW
« src/builtins/builtins-collections-gen.cc ('K') | « src/builtins/builtins-collections-gen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698