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

Side by Side Diff: src/runtime/runtime-classes.cc

Issue 1314493006: Remove named load from builtin in default super call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment. Created 5 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 unified diff | Download patch
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <limits> 8 #include <limits>
9 9
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 // Prepare the array containing all passed arguments. 544 // Prepare the array containing all passed arguments.
545 int argument_count = frame->GetArgumentsLength(); 545 int argument_count = frame->GetArgumentsLength();
546 Handle<FixedArray> elements = 546 Handle<FixedArray> elements =
547 isolate->factory()->NewUninitializedFixedArray(argument_count); 547 isolate->factory()->NewUninitializedFixedArray(argument_count);
548 for (int i = 0; i < argument_count; ++i) { 548 for (int i = 0; i < argument_count; ++i) {
549 elements->set(i, frame->GetParameter(i)); 549 elements->set(i, frame->GetParameter(i));
550 } 550 }
551 Handle<JSArray> arguments = isolate->factory()->NewJSArrayWithElements( 551 Handle<JSArray> arguments = isolate->factory()->NewJSArrayWithElements(
552 elements, FAST_ELEMENTS, argument_count); 552 elements, FAST_ELEMENTS, argument_count);
553 553
554 // Call $reflectConstruct(<super>, <args>, <new.target>) now. 554 // Call %reflect_construct(<super>, <args>, <new.target>) now.
555 Handle<Object> reflect; 555 Handle<JSFunction> reflect = isolate->reflect_construct();
556 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
557 isolate, reflect,
558 Object::GetProperty(isolate,
559 handle(isolate->native_context()->builtins()),
560 "$reflectConstruct"));
561 RUNTIME_ASSERT(reflect->IsJSFunction()); // Depends on --harmony-reflect.
562 Handle<Object> argv[] = {super_constructor, arguments, original_constructor}; 556 Handle<Object> argv[] = {super_constructor, arguments, original_constructor};
563 Handle<Object> result; 557 Handle<Object> result;
564 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 558 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
565 isolate, result, 559 isolate, result,
566 Execution::Call(isolate, reflect, isolate->factory()->undefined_value(), 560 Execution::Call(isolate, reflect, isolate->factory()->undefined_value(),
567 arraysize(argv), argv)); 561 arraysize(argv), argv));
568 562
569 return *result; 563 return *result;
570 } 564 }
571 } // namespace internal 565 } // namespace internal
572 } // namespace v8 566 } // namespace v8
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698