Chromium Code Reviews| 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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1204 MUST_USE_RESULT static MaybeHandle<Object> BitwiseOr( | 1204 MUST_USE_RESULT static MaybeHandle<Object> BitwiseOr( |
| 1205 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, | 1205 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
| 1206 Strength strength = Strength::WEAK); | 1206 Strength strength = Strength::WEAK); |
| 1207 MUST_USE_RESULT static MaybeHandle<Object> BitwiseXor( | 1207 MUST_USE_RESULT static MaybeHandle<Object> BitwiseXor( |
| 1208 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, | 1208 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
| 1209 Strength strength = Strength::WEAK); | 1209 Strength strength = Strength::WEAK); |
| 1210 | 1210 |
| 1211 MUST_USE_RESULT static MaybeHandle<Object> GetProperty( | 1211 MUST_USE_RESULT static MaybeHandle<Object> GetProperty( |
| 1212 LookupIterator* it, LanguageMode language_mode = SLOPPY); | 1212 LookupIterator* it, LanguageMode language_mode = SLOPPY); |
| 1213 | 1213 |
| 1214 // GetProperty, but allows custom behaviour when an access check fails | |
| 1215 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyEx( | |
| 1216 LookupIterator* it, bool& access_check_failed, | |
| 1217 LanguageMode language_mode = SLOPPY); | |
|
Toon Verwaest
2015/10/02 08:05:27
This declaration can now be dropped.
caitp (gmail)
2015/10/02 10:01:15
Acknowledged.
caitp (gmail)
2015/10/02 10:41:56
Done.
| |
| 1218 | |
| 1214 // Implementation of [[Put]], ECMA-262 5th edition, section 8.12.5. | 1219 // Implementation of [[Put]], ECMA-262 5th edition, section 8.12.5. |
| 1215 MUST_USE_RESULT static MaybeHandle<Object> SetProperty( | 1220 MUST_USE_RESULT static MaybeHandle<Object> SetProperty( |
| 1216 Handle<Object> object, Handle<Name> name, Handle<Object> value, | 1221 Handle<Object> object, Handle<Name> name, Handle<Object> value, |
| 1217 LanguageMode language_mode, | 1222 LanguageMode language_mode, |
| 1218 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); | 1223 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); |
| 1219 | 1224 |
| 1220 MUST_USE_RESULT static MaybeHandle<Object> SetProperty( | 1225 MUST_USE_RESULT static MaybeHandle<Object> SetProperty( |
| 1221 LookupIterator* it, Handle<Object> value, LanguageMode language_mode, | 1226 LookupIterator* it, Handle<Object> value, LanguageMode language_mode, |
| 1222 StoreFromKeyed store_mode); | 1227 StoreFromKeyed store_mode); |
| 1223 | 1228 |
| (...skipping 7144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8368 public: | 8373 public: |
| 8369 // [name]: The print name of a symbol, or undefined if none. | 8374 // [name]: The print name of a symbol, or undefined if none. |
| 8370 DECL_ACCESSORS(name, Object) | 8375 DECL_ACCESSORS(name, Object) |
| 8371 | 8376 |
| 8372 DECL_INT_ACCESSORS(flags) | 8377 DECL_INT_ACCESSORS(flags) |
| 8373 | 8378 |
| 8374 // [is_private]: Whether this is a private symbol. Private symbols can only | 8379 // [is_private]: Whether this is a private symbol. Private symbols can only |
| 8375 // be used to designate own properties of objects. | 8380 // be used to designate own properties of objects. |
| 8376 DECL_BOOLEAN_ACCESSORS(is_private) | 8381 DECL_BOOLEAN_ACCESSORS(is_private) |
| 8377 | 8382 |
| 8383 // [is_well_known_symbol]: Whether this is a spec-defined well-known symbol, | |
| 8384 // or not. Well-known symbols do not throw when an access check fails during | |
| 8385 // a load. | |
| 8386 DECL_BOOLEAN_ACCESSORS(is_well_known_symbol) | |
| 8387 | |
| 8378 DECLARE_CAST(Symbol) | 8388 DECLARE_CAST(Symbol) |
| 8379 | 8389 |
| 8380 // Dispatched behavior. | 8390 // Dispatched behavior. |
| 8381 DECLARE_PRINTER(Symbol) | 8391 DECLARE_PRINTER(Symbol) |
| 8382 DECLARE_VERIFIER(Symbol) | 8392 DECLARE_VERIFIER(Symbol) |
| 8383 | 8393 |
| 8384 // Layout description. | 8394 // Layout description. |
| 8385 static const int kNameOffset = Name::kSize; | 8395 static const int kNameOffset = Name::kSize; |
| 8386 static const int kFlagsOffset = kNameOffset + kPointerSize; | 8396 static const int kFlagsOffset = kNameOffset + kPointerSize; |
| 8387 static const int kSize = kFlagsOffset + kPointerSize; | 8397 static const int kSize = kFlagsOffset + kPointerSize; |
| 8388 | 8398 |
| 8389 typedef FixedBodyDescriptor<kNameOffset, kFlagsOffset, kSize> BodyDescriptor; | 8399 typedef FixedBodyDescriptor<kNameOffset, kFlagsOffset, kSize> BodyDescriptor; |
| 8390 | 8400 |
| 8391 void SymbolShortPrint(std::ostream& os); | 8401 void SymbolShortPrint(std::ostream& os); |
| 8392 | 8402 |
| 8393 private: | 8403 private: |
| 8394 static const int kPrivateBit = 0; | 8404 static const int kPrivateBit = 0; |
| 8405 static const int kWellKnownSymbolBit = 1; | |
| 8395 | 8406 |
| 8396 const char* PrivateSymbolToName() const; | 8407 const char* PrivateSymbolToName() const; |
| 8397 | 8408 |
| 8398 #if TRACE_MAPS | 8409 #if TRACE_MAPS |
| 8399 friend class Name; // For PrivateSymbolToName. | 8410 friend class Name; // For PrivateSymbolToName. |
| 8400 #endif | 8411 #endif |
| 8401 | 8412 |
| 8402 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol); | 8413 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol); |
| 8403 }; | 8414 }; |
| 8404 | 8415 |
| (...skipping 2218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10623 Handle<FixedArray> keys_; | 10634 Handle<FixedArray> keys_; |
| 10624 Handle<OrderedHashSet> set_; | 10635 Handle<OrderedHashSet> set_; |
| 10625 int length_; | 10636 int length_; |
| 10626 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); | 10637 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); |
| 10627 }; | 10638 }; |
| 10628 | 10639 |
| 10629 } // NOLINT, false-positive due to second-order macros. | 10640 } // NOLINT, false-positive due to second-order macros. |
| 10630 } // NOLINT, false-positive due to second-order macros. | 10641 } // NOLINT, false-positive due to second-order macros. |
| 10631 | 10642 |
| 10632 #endif // V8_OBJECTS_H_ | 10643 #endif // V8_OBJECTS_H_ |
| OLD | NEW |