Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 2f1405f57d10825a38899967a80d41ffca23d5cd..3692a1a530bc304fbb7881cf88b4b561aa4a0c6a 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -859,6 +859,7 @@ class LookupIterator; |
class ObjectHashTable; |
class ObjectVisitor; |
class PropertyCell; |
+class PropertyDescriptor; |
class SafepointEntry; |
class SharedFunctionInfo; |
class StringStream; |
@@ -1816,6 +1817,33 @@ class JSReceiver: public HeapObject { |
Handle<JSReceiver> object, uint32_t index, |
LanguageMode language_mode = SLOPPY); |
+ MUST_USE_RESULT static Object* DefineProperty(Isolate* isolate, |
+ Handle<Object> o, |
Toon Verwaest
2015/10/06 15:55:18
Please write out o as object
Jakob Kummerow
2015/10/09 13:46:12
Done. (I was following the spec's naming.)
|
+ Handle<Object> name, |
Toon Verwaest
2015/10/06 15:55:18
Whenever type is object, I'd rather talk about "ke
Jakob Kummerow
2015/10/09 13:46:12
Done.
|
+ Handle<Object> attributes); |
+ MUST_USE_RESULT static Object* DefineProperties(Isolate* isolate, |
+ Handle<Object> o, |
+ Handle<Object> properties); |
+ |
+ // "virtual" dispatcher to the correct [[DefineOwnProperty]] implementation. |
+ static bool DefineOwnProperty(Isolate* isolate, Handle<JSObject> obj, |
+ Handle<Object> name, PropertyDescriptor* desc, |
+ bool should_throw); |
+ |
+ static bool OrdinaryDefineOwnProperty(Isolate* isolate, Handle<JSObject> o, |
+ Handle<Object> name, |
+ PropertyDescriptor* desc, |
+ bool should_throw); |
Toon Verwaest
2015/10/06 15:55:18
replace bool should_throw with enum
Jakob Kummerow
2015/10/09 13:46:12
Done.
|
+ static bool OrdinaryDefineOwnProperty(LookupIterator* it, |
+ PropertyDescriptor* desc, |
+ bool should_throw); |
+ |
+ static bool GetOwnPropertyDescriptor(Isolate* isolate, Handle<JSObject> obj, |
Toon Verwaest
2015/10/06 15:55:18
obj -> object
Jakob Kummerow
2015/10/09 13:46:12
Done.
|
+ Handle<Object> name, |
+ PropertyDescriptor* desc); |
+ static bool GetOwnPropertyDescriptor(LookupIterator* it, |
+ PropertyDescriptor* desc); |
+ |
// Tests for the fast common case for property enumeration. |
bool IsSimpleEnum(); |
@@ -2062,6 +2090,10 @@ class JSObject: public JSReceiver { |
Handle<Object> getter, |
Handle<Object> setter, |
PropertyAttributes attributes); |
+ static MaybeHandle<Object> DefineAccessor(LookupIterator* it, |
+ Handle<Object> getter, |
+ Handle<Object> setter, |
+ PropertyAttributes attributes); |
// Defines an AccessorInfo property on the given object. |
MUST_USE_RESULT static MaybeHandle<Object> SetAccessor( |
@@ -10021,6 +10053,13 @@ class JSArray: public JSObject { |
static inline void SetContent(Handle<JSArray> array, |
Handle<FixedArrayBase> storage); |
+ static bool DefineOwnProperty(Isolate* isolate, Handle<JSArray> o, |
+ Handle<Object> name, PropertyDescriptor* desc, |
+ bool should_throw); |
+ |
+ static bool ArraySetLength(Isolate* isolate, Handle<JSArray> a, |
+ PropertyDescriptor* desc, bool should_throw); |
+ |
DECLARE_CAST(JSArray) |
// Dispatched behavior. |