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

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

Issue 782073002: 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: Fixed patch 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 6342 matching lines...) Expand 10 before | Expand all | Expand 10 after
6353 return HObjectAccess(kInobject, CollectionType::kNumberOfBucketsOffset, 6353 return HObjectAccess(kInobject, CollectionType::kNumberOfBucketsOffset,
6354 Representation::Smi()); 6354 Representation::Smi());
6355 } 6355 }
6356 6356
6357 template <typename CollectionType> 6357 template <typename CollectionType>
6358 static HObjectAccess ForOrderedHashTableNumberOfElements() { 6358 static HObjectAccess ForOrderedHashTableNumberOfElements() {
6359 return HObjectAccess(kInobject, CollectionType::kNumberOfElementsOffset, 6359 return HObjectAccess(kInobject, CollectionType::kNumberOfElementsOffset,
6360 Representation::Smi()); 6360 Representation::Smi());
6361 } 6361 }
6362 6362
6363 template <typename CollectionType>
6364 static HObjectAccess ForOrderedHashTableNumberOfDeletedElements() {
6365 return HObjectAccess(kInobject,
6366 CollectionType::kNumberOfDeletedElementsOffset,
6367 Representation::Smi());
6368 }
6369
6363 inline bool Equals(HObjectAccess that) const { 6370 inline bool Equals(HObjectAccess that) const {
6364 return value_ == that.value_; // portion and offset must match 6371 return value_ == that.value_; // portion and offset must match
6365 } 6372 }
6366 6373
6367 protected: 6374 protected:
6368 void SetGVNFlags(HValue *instr, PropertyAccessType access_type); 6375 void SetGVNFlags(HValue *instr, PropertyAccessType access_type);
6369 6376
6370 private: 6377 private:
6371 // internal use only; different parts of an object or array 6378 // internal use only; different parts of an object or array
6372 enum Portion { 6379 enum Portion {
(...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after
8000 }; 8007 };
8001 8008
8002 8009
8003 8010
8004 #undef DECLARE_INSTRUCTION 8011 #undef DECLARE_INSTRUCTION
8005 #undef DECLARE_CONCRETE_INSTRUCTION 8012 #undef DECLARE_CONCRETE_INSTRUCTION
8006 8013
8007 } } // namespace v8::internal 8014 } } // namespace v8::internal
8008 8015
8009 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 8016 #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