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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 1238743002: [turbofan] Implement super call support in TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-super-2
Patch Set: Revert "Addressed comments." Created 5 years, 5 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/compiler/ast-loop-assignment-analyzer.cc ('k') | test/mjsunit/harmony/super.js » ('j') | 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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 530
531 void JSGenericLowering::LowerJSCreateCatchContext(Node* node) { 531 void JSGenericLowering::LowerJSCreateCatchContext(Node* node) {
532 Unique<String> name = OpParameter<Unique<String>>(node); 532 Unique<String> name = OpParameter<Unique<String>>(node);
533 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(name)); 533 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(name));
534 ReplaceWithRuntimeCall(node, Runtime::kPushCatchContext); 534 ReplaceWithRuntimeCall(node, Runtime::kPushCatchContext);
535 } 535 }
536 536
537 537
538 void JSGenericLowering::LowerJSCallConstruct(Node* node) { 538 void JSGenericLowering::LowerJSCallConstruct(Node* node) {
539 int arity = OpParameter<int>(node); 539 int arity = OpParameter<int>(node);
540 CallConstructStub stub(isolate(), NO_CALL_CONSTRUCTOR_FLAGS); 540 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL);
541 CallInterfaceDescriptor d = stub.GetCallInterfaceDescriptor(); 541 CallInterfaceDescriptor d = stub.GetCallInterfaceDescriptor();
542 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 542 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
543 CallDescriptor* desc = 543 CallDescriptor* desc =
544 Linkage::GetStubCallDescriptor(isolate(), zone(), d, arity - 1, flags); 544 Linkage::GetStubCallDescriptor(isolate(), zone(), d, arity - 1, flags);
545 Node* stub_code = jsgraph()->HeapConstant(stub.GetCode()); 545 Node* stub_code = jsgraph()->HeapConstant(stub.GetCode());
546 Node* actual_construct = NodeProperties::GetValueInput(node, 0); 546 Node* actual_construct = NodeProperties::GetValueInput(node, 0);
547 Node* original_construct = NodeProperties::GetValueInput(node, arity - 1); 547 Node* original_construct = NodeProperties::GetValueInput(node, arity - 1);
548 node->RemoveInput(arity - 1); // Drop original constructor. 548 node->RemoveInput(arity - 1); // Drop original constructor.
549 node->InsertInput(zone(), 0, stub_code); 549 node->InsertInput(zone(), 0, stub_code);
550 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(arity - 2)); 550 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(arity - 2));
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 } 841 }
842 842
843 843
844 MachineOperatorBuilder* JSGenericLowering::machine() const { 844 MachineOperatorBuilder* JSGenericLowering::machine() const {
845 return jsgraph()->machine(); 845 return jsgraph()->machine();
846 } 846 }
847 847
848 } // namespace compiler 848 } // namespace compiler
849 } // namespace internal 849 } // namespace internal
850 } // namespace v8 850 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-loop-assignment-analyzer.cc ('k') | test/mjsunit/harmony/super.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698