Remove named load from builtin in default super call.
authormstarzinger <mstarzinger@chromium.org>
Wed, 26 Aug 2015 15:33:25 +0000 (08:33 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 26 Aug 2015 15:33:40 +0000 (15:33 +0000)
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/1314493006

Cr-Commit-Position: refs/heads/master@{#30389}

src/parser.cc
src/runtime/runtime-classes.cc

index 7ddd0fce0c804b2924ce422307c0e0b12110ed07..71b1e558c29411a009c1382492b3643e5a365bf4 100644 (file)
@@ -6060,7 +6060,7 @@ Expression* Parser::SpreadCall(Expression* function,
                                int pos) {
   if (function->IsSuperCallReference()) {
     // Super calls
-    // %ReflectConstruct(%GetPrototype(<this-function>), args, new.target))
+    // %reflect_construct(%GetPrototype(<this-function>), args, new.target))
     ZoneList<Expression*>* tmp = new (zone()) ZoneList<Expression*>(1, zone());
     tmp->Add(function->AsSuperCallReference()->this_function_var(), zone());
     Expression* get_prototype =
index 8692b9b80054cd81831cf2bfa102d420da1af452..c485759a191ba7fbab6e5755293830a53f5b6108 100644 (file)
@@ -551,14 +551,8 @@ RUNTIME_FUNCTION(Runtime_DefaultConstructorCallSuper) {
   Handle<JSArray> arguments = isolate->factory()->NewJSArrayWithElements(
       elements, FAST_ELEMENTS, argument_count);
 
-  // Call $reflectConstruct(<super>, <args>, <new.target>) now.
-  Handle<Object> reflect;
-  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
-      isolate, reflect,
-      Object::GetProperty(isolate,
-                          handle(isolate->native_context()->builtins()),
-                          "$reflectConstruct"));
-  RUNTIME_ASSERT(reflect->IsJSFunction());  // Depends on --harmony-reflect.
+  // Call %reflect_construct(<super>, <args>, <new.target>) now.
+  Handle<JSFunction> reflect = isolate->reflect_construct();
   Handle<Object> argv[] = {super_constructor, arguments, original_constructor};
   Handle<Object> result;
   ASSIGN_RETURN_FAILURE_ON_EXCEPTION(