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

Side by Side Diff: src/hydrogen-instructions.h

Issue 777663003: Optimize add/set/delete operations for string keys in Maps and Sets (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 | « src/hydrogen.cc ('k') | src/objects.h » ('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 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 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 6338 matching lines...) Expand 10 before | Expand all | Expand 10 after
6349 return HObjectAccess(kInobject, CollectionType::kNumberOfBucketsOffset, 6349 return HObjectAccess(kInobject, CollectionType::kNumberOfBucketsOffset,
6350 Representation::Smi()); 6350 Representation::Smi());
6351 } 6351 }
6352 6352
6353 template <typename CollectionType> 6353 template <typename CollectionType>
6354 static HObjectAccess ForOrderedHashTableNumberOfElements() { 6354 static HObjectAccess ForOrderedHashTableNumberOfElements() {
6355 return HObjectAccess(kInobject, CollectionType::kNumberOfElementsOffset, 6355 return HObjectAccess(kInobject, CollectionType::kNumberOfElementsOffset,
6356 Representation::Smi()); 6356 Representation::Smi());
6357 } 6357 }
6358 6358
6359 template <typename CollectionType>
6360 static HObjectAccess ForOrderedHashTableNumberOfDeletedElements() {
6361 return HObjectAccess(kInobject,
6362 CollectionType::kNumberOfDeletedElementsOffset,
6363 Representation::Smi());
6364 }
6365
6359 inline bool Equals(HObjectAccess that) const { 6366 inline bool Equals(HObjectAccess that) const {
6360 return value_ == that.value_; // portion and offset must match 6367 return value_ == that.value_; // portion and offset must match
6361 } 6368 }
6362 6369
6363 protected: 6370 protected:
6364 void SetGVNFlags(HValue *instr, PropertyAccessType access_type); 6371 void SetGVNFlags(HValue *instr, PropertyAccessType access_type);
6365 6372
6366 private: 6373 private:
6367 // internal use only; different parts of an object or array 6374 // internal use only; different parts of an object or array
6368 enum Portion { 6375 enum Portion {
(...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after
7996 }; 8003 };
7997 8004
7998 8005
7999 8006
8000 #undef DECLARE_INSTRUCTION 8007 #undef DECLARE_INSTRUCTION
8001 #undef DECLARE_CONCRETE_INSTRUCTION 8008 #undef DECLARE_CONCRETE_INSTRUCTION
8002 8009
8003 } } // namespace v8::internal 8010 } } // namespace v8::internal
8004 8011
8005 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 8012 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698