Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: src/runtime.cc

Issue 527963002: Implement loads and calls from 'super' (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index e6277060732e9d71feb9d592af657a3dff31e406..05593ef1a93d10c7c36bdf82316108d99acc53b1 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -2072,6 +2072,24 @@ RUNTIME_FUNCTION(Runtime_HomeObjectSymbol) {
}
+RUNTIME_FUNCTION(Runtime_LoadFromSuper) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 3);
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, base_value, 0);
+ CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 1);
+ CONVERT_ARG_HANDLE_CHECKED(Name, name, 2);
+
+ LookupIterator it(receiver, name, base_value);
+ Handle<Object> result;
+ if (it.IsFound()) {
Toon Verwaest 2014/09/15 13:16:43 You don't need this it.IsFound() either... GetProp
Dmitry Lomov (no reviews) 2014/09/16 13:15:55 Done.
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
+ Object::GetProperty(&it));
+ return *result;
+ }
+ return isolate->heap()->undefined_value();
+}
+
+
RUNTIME_FUNCTION(Runtime_IsExtensible) {
SealHandleScope shs(isolate);
DCHECK(args.length() == 1);

Powered by Google App Engine
This is Rietveld 408576698