OLD | NEW |
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 6333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6344 | 6344 |
6345 static HObjectAccess ForJSArrayBufferViewByteLength() { | 6345 static HObjectAccess ForJSArrayBufferViewByteLength() { |
6346 return HObjectAccess::ForObservableJSObjectOffset( | 6346 return HObjectAccess::ForObservableJSObjectOffset( |
6347 JSArrayBufferView::kByteLengthOffset); | 6347 JSArrayBufferView::kByteLengthOffset); |
6348 } | 6348 } |
6349 | 6349 |
6350 static HObjectAccess ForGlobalObjectNativeContext() { | 6350 static HObjectAccess ForGlobalObjectNativeContext() { |
6351 return HObjectAccess(kInobject, GlobalObject::kNativeContextOffset); | 6351 return HObjectAccess(kInobject, GlobalObject::kNativeContextOffset); |
6352 } | 6352 } |
6353 | 6353 |
| 6354 static HObjectAccess ForJSCollectionTable() { |
| 6355 return HObjectAccess::ForObservableJSObjectOffset( |
| 6356 JSCollection::kTableOffset); |
| 6357 } |
| 6358 |
| 6359 template <typename CollectionType> |
| 6360 static HObjectAccess ForOrderedHashTableNumberOfBuckets() { |
| 6361 return HObjectAccess(kInobject, CollectionType::kNumberOfBucketsOffset, |
| 6362 Representation::Smi()); |
| 6363 } |
| 6364 |
| 6365 template <typename CollectionType> |
| 6366 static HObjectAccess ForOrderedHashTableNumberOfElements() { |
| 6367 return HObjectAccess(kInobject, CollectionType::kNumberOfElementsOffset, |
| 6368 Representation::Smi()); |
| 6369 } |
| 6370 |
6354 inline bool Equals(HObjectAccess that) const { | 6371 inline bool Equals(HObjectAccess that) const { |
6355 return value_ == that.value_; // portion and offset must match | 6372 return value_ == that.value_; // portion and offset must match |
6356 } | 6373 } |
6357 | 6374 |
6358 protected: | 6375 protected: |
6359 void SetGVNFlags(HValue *instr, PropertyAccessType access_type); | 6376 void SetGVNFlags(HValue *instr, PropertyAccessType access_type); |
6360 | 6377 |
6361 private: | 6378 private: |
6362 // internal use only; different parts of an object or array | 6379 // internal use only; different parts of an object or array |
6363 enum Portion { | 6380 enum Portion { |
(...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7991 }; | 8008 }; |
7992 | 8009 |
7993 | 8010 |
7994 | 8011 |
7995 #undef DECLARE_INSTRUCTION | 8012 #undef DECLARE_INSTRUCTION |
7996 #undef DECLARE_CONCRETE_INSTRUCTION | 8013 #undef DECLARE_CONCRETE_INSTRUCTION |
7997 | 8014 |
7998 } } // namespace v8::internal | 8015 } } // namespace v8::internal |
7999 | 8016 |
8000 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 8017 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |