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 9503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9514 // ES6 9.5.6 | 9514 // ES6 9.5.6 |
9515 static bool DefineOwnProperty(Isolate* isolate, Handle<JSProxy> object, | 9515 static bool DefineOwnProperty(Isolate* isolate, Handle<JSProxy> object, |
9516 Handle<Object> key, PropertyDescriptor* desc, | 9516 Handle<Object> key, PropertyDescriptor* desc, |
9517 ShouldThrow should_throw); | 9517 ShouldThrow should_throw); |
9518 | 9518 |
9519 // ES6 9.5.7 | 9519 // ES6 9.5.7 |
9520 MUST_USE_RESULT static Maybe<bool> HasProperty(Isolate* isolate, | 9520 MUST_USE_RESULT static Maybe<bool> HasProperty(Isolate* isolate, |
9521 Handle<JSProxy> proxy, | 9521 Handle<JSProxy> proxy, |
9522 Handle<Name> name); | 9522 Handle<Name> name); |
9523 | 9523 |
| 9524 // ES6 9.5.8 |
| 9525 MUST_USE_RESULT static MaybeHandle<Object> GetProperty( |
| 9526 Isolate* isolate, Handle<JSProxy> proxy, Handle<Name> name, |
| 9527 Handle<Object> receiver, LanguageMode language_mode); |
| 9528 |
| 9529 // ES6 9.5.9 |
| 9530 MUST_USE_RESULT static Maybe<bool> SetProperty(Handle<JSProxy> proxy, |
| 9531 Handle<Name> name, |
| 9532 Handle<Object> value, |
| 9533 Handle<Object> receiver, |
| 9534 LanguageMode language_mode); |
| 9535 |
9524 // ES6 9.5.10 (when passed SLOPPY) | 9536 // ES6 9.5.10 (when passed SLOPPY) |
9525 MUST_USE_RESULT static Maybe<bool> DeletePropertyOrElement( | 9537 MUST_USE_RESULT static Maybe<bool> DeletePropertyOrElement( |
9526 Handle<JSProxy> proxy, Handle<Name> name, LanguageMode language_mode); | 9538 Handle<JSProxy> proxy, Handle<Name> name, LanguageMode language_mode); |
9527 | 9539 |
9528 // ES6 9.5.11 | 9540 // ES6 9.5.11 |
9529 static bool Enumerate(Isolate* isolate, Handle<JSReceiver> receiver, | 9541 static bool Enumerate(Isolate* isolate, Handle<JSReceiver> receiver, |
9530 Handle<JSProxy> proxy, KeyAccumulator* accumulator); | 9542 Handle<JSProxy> proxy, KeyAccumulator* accumulator); |
9531 | 9543 |
9532 // ES6 9.5.12 | 9544 // ES6 9.5.12 |
9533 static bool OwnPropertyKeys(Isolate* isolate, Handle<JSReceiver> receiver, | 9545 static bool OwnPropertyKeys(Isolate* isolate, Handle<JSReceiver> receiver, |
9534 Handle<JSProxy> proxy, KeyFilter filter, | 9546 Handle<JSProxy> proxy, KeyFilter filter, |
9535 Enumerability enum_policy, | 9547 Enumerability enum_policy, |
9536 KeyAccumulator* accumulator); | 9548 KeyAccumulator* accumulator); |
9537 | 9549 |
9538 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithHandler( | 9550 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithHandler( |
9539 Handle<JSProxy> proxy, | 9551 Handle<JSProxy> proxy, |
9540 Handle<Object> receiver, | 9552 Handle<Object> receiver, |
9541 Handle<Name> name); | 9553 Handle<Name> name); |
9542 | 9554 |
9543 MUST_USE_RESULT static Maybe<PropertyAttributes> GetPropertyAttributes( | 9555 MUST_USE_RESULT static Maybe<PropertyAttributes> GetPropertyAttributes( |
9544 LookupIterator* it); | 9556 LookupIterator* it); |
9545 | 9557 |
9546 MUST_USE_RESULT static Maybe<bool> SetProperty(Handle<JSProxy> proxy, | |
9547 Handle<Name> name, | |
9548 Handle<Object> value, | |
9549 Handle<Object> receiver, | |
9550 LanguageMode language_mode); | |
9551 | |
9552 // Dispatched behavior. | 9558 // Dispatched behavior. |
9553 DECLARE_PRINTER(JSProxy) | 9559 DECLARE_PRINTER(JSProxy) |
9554 DECLARE_VERIFIER(JSProxy) | 9560 DECLARE_VERIFIER(JSProxy) |
9555 | 9561 |
9556 // Layout description. We add padding so that a proxy has the same | 9562 // Layout description. We add padding so that a proxy has the same |
9557 // size as a virgin JSObject. This is essential for becoming a JSObject | 9563 // size as a virgin JSObject. This is essential for becoming a JSObject |
9558 // upon freeze. | 9564 // upon freeze. |
9559 static const int kTargetOffset = HeapObject::kHeaderSize; | 9565 static const int kTargetOffset = HeapObject::kHeaderSize; |
9560 static const int kHandlerOffset = kTargetOffset + kPointerSize; | 9566 static const int kHandlerOffset = kTargetOffset + kPointerSize; |
9561 static const int kHashOffset = kHandlerOffset + kPointerSize; | 9567 static const int kHashOffset = kHandlerOffset + kPointerSize; |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10704 } | 10710 } |
10705 return value; | 10711 return value; |
10706 } | 10712 } |
10707 }; | 10713 }; |
10708 | 10714 |
10709 | 10715 |
10710 } // NOLINT, false-positive due to second-order macros. | 10716 } // NOLINT, false-positive due to second-order macros. |
10711 } // NOLINT, false-positive due to second-order macros. | 10717 } // NOLINT, false-positive due to second-order macros. |
10712 | 10718 |
10713 #endif // V8_OBJECTS_H_ | 10719 #endif // V8_OBJECTS_H_ |
OLD | NEW |