Index: src/runtime/runtime-classes.cc |
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc |
index 20e98efc64eb0ac6cfbc469455adc4599f29421c..b543b3d46b242a5964a1eb371231873ef252973a 100644 |
--- a/src/runtime/runtime-classes.cc |
+++ b/src/runtime/runtime-classes.cc |
@@ -99,6 +99,7 @@ RUNTIME_FUNCTION(Runtime_LoadKeyedFromSuper) { |
Runtime::ToName(isolate, key)); |
uint32_t index; |
if (name->AsArrayIndex(&index)) { |
+ // TODO(dslomov): Implement. |
return ThrowUnsupportedSuper(isolate); |
} |
return LoadFromSuper(isolate, receiver, home_object, name); |
@@ -134,8 +135,8 @@ RUNTIME_FUNCTION(Runtime_StoreToSuper_Strict) { |
DCHECK(args.length() == 4); |
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); |
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1); |
- CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); |
- CONVERT_ARG_HANDLE_CHECKED(Name, name, 3); |
+ CONVERT_ARG_HANDLE_CHECKED(Name, name, 2); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, value, 3); |
return StoreToSuper(isolate, home_object, receiver, name, value, STRICT); |
} |
@@ -146,10 +147,49 @@ RUNTIME_FUNCTION(Runtime_StoreToSuper_Sloppy) { |
DCHECK(args.length() == 4); |
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); |
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1); |
- CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); |
- CONVERT_ARG_HANDLE_CHECKED(Name, name, 3); |
+ CONVERT_ARG_HANDLE_CHECKED(Name, name, 2); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, value, 3); |
return StoreToSuper(isolate, home_object, receiver, name, value, SLOPPY); |
} |
+ |
+ |
+static Object* StoreKeyedToSuper(Isolate* isolate, Handle<JSObject> home_object, |
+ Handle<Object> receiver, Handle<Object> key, |
+ Handle<Object> value, StrictMode strict_mode) { |
+ Handle<Name> name; |
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, name, |
+ Runtime::ToName(isolate, key)); |
+ uint32_t index; |
+ if (name->AsArrayIndex(&index)) { |
+ // TODO(dslomov): Implement. |
+ return ThrowUnsupportedSuper(isolate); |
+ } |
+ return StoreToSuper(isolate, home_object, receiver, name, value, strict_mode); |
+} |
+ |
+ |
+RUNTIME_FUNCTION(Runtime_StoreKeyedToSuper_Strict) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 4); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); |
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, key, 2); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, value, 3); |
+ |
+ return StoreKeyedToSuper(isolate, home_object, receiver, key, value, STRICT); |
+} |
+ |
+ |
+RUNTIME_FUNCTION(Runtime_StoreKeyedToSuper_Sloppy) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 4); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); |
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, key, 2); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, value, 3); |
+ |
+ return StoreKeyedToSuper(isolate, home_object, receiver, key, value, SLOPPY); |
+} |
} |
} // namespace v8::internal |