Reviewers: Dmitry Lomov (chromium),
Message:
PTAL
Description:
Remove dead code related to new super
Support for `new super` has been removed so this code in the full
code gen is now unreachable.
BUG=None
LOG=N
[email protected]
Please review this at https://codereview.chromium.org/911223002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+17, -48 lines):
M src/arm/full-codegen-arm.cc
M src/arm64/full-codegen-arm64.cc
M src/ia32/full-codegen-ia32.cc
M src/mips/full-codegen-mips.cc
M src/mips64/full-codegen-mips64.cc
M src/ppc/full-codegen-ppc.cc
M src/x64/full-codegen-x64.cc
M src/x87/full-codegen-x87.cc
Index: src/arm/full-codegen-arm.cc
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
index
7508c01e4998473eb00ffd20ab7ce4700241e6a3..6b84eb648e91d6c948e77cf8bb38c539f0c69db4
100644
--- a/src/arm/full-codegen-arm.cc
+++ b/src/arm/full-codegen-arm.cc
@@ -3217,12 +3217,8 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Push constructor on the stack. If it's not a function it's used as
// receiver for CALL_NON_FUNCTION, otherwise the value on the stack is
// ignored.
- if (expr->expression()->IsSuperReference()) {
- EmitLoadSuperConstructor(expr->expression()->AsSuperReference());
- __ Push(result_register());
- } else {
- VisitForStackValue(expr->expression());
- }
+ DCHECK(!expr->expression()->IsSuperReference());
+ VisitForStackValue(expr->expression());
// Push the arguments ("left-to-right") on the stack.
ZoneList<Expression*>* args = expr->arguments();
Index: src/arm64/full-codegen-arm64.cc
diff --git a/src/arm64/full-codegen-arm64.cc
b/src/arm64/full-codegen-arm64.cc
index
1d24b91dbb846fd0e85300c7405c2b143c41f2f0..14a219d2aebd80f05118d648c4c67e3cf32b22fa
100644
--- a/src/arm64/full-codegen-arm64.cc
+++ b/src/arm64/full-codegen-arm64.cc
@@ -2906,12 +2906,8 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Push constructor on the stack. If it's not a function it's used as
// receiver for CALL_NON_FUNCTION, otherwise the value on the stack is
// ignored.
- if (expr->expression()->IsSuperReference()) {
- EmitLoadSuperConstructor(expr->expression()->AsSuperReference());
- __ Push(result_register());
- } else {
- VisitForStackValue(expr->expression());
- }
+ DCHECK(!expr->expression()->IsSuperReference());
+ VisitForStackValue(expr->expression());
// Push the arguments ("left-to-right") on the stack.
ZoneList<Expression*>* args = expr->arguments();
Index: src/ia32/full-codegen-ia32.cc
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
index
950a129499126f0e6f42d58afe7d08ee8571114f..3424ec58d1307c83ea2699564fadfc3dac53b078
100644
--- a/src/ia32/full-codegen-ia32.cc
+++ b/src/ia32/full-codegen-ia32.cc
@@ -3097,12 +3097,8 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Push constructor on the stack. If it's not a function it's used as
// receiver for CALL_NON_FUNCTION, otherwise the value on the stack is
// ignored.
- if (expr->expression()->IsSuperReference()) {
- EmitLoadSuperConstructor(expr->expression()->AsSuperReference());
- __ push(result_register());
- } else {
- VisitForStackValue(expr->expression());
- }
+ DCHECK(!expr->expression()->IsSuperReference());
+ VisitForStackValue(expr->expression());
// Push the arguments ("left-to-right") on the stack.
ZoneList<Expression*>* args = expr->arguments();
Index: src/mips/full-codegen-mips.cc
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
index
8b4645726dc13509f92655ec5f4d9aa7fbe4691b..21e189fab62aad772e1762c09fea7142e3033a84
100644
--- a/src/mips/full-codegen-mips.cc
+++ b/src/mips/full-codegen-mips.cc
@@ -3190,12 +3190,8 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Push constructor on the stack. If it's not a function it's used as
// receiver for CALL_NON_FUNCTION, otherwise the value on the stack is
// ignored.
- if (expr->expression()->IsSuperReference()) {
- EmitLoadSuperConstructor(expr->expression()->AsSuperReference());
- __ Push(result_register());
- } else {
- VisitForStackValue(expr->expression());
- }
+ DCHECK(!expr->expression()->IsSuperReference());
+ VisitForStackValue(expr->expression());
// Push the arguments ("left-to-right") on the stack.
ZoneList<Expression*>* args = expr->arguments();
Index: src/mips64/full-codegen-mips64.cc
diff --git a/src/mips64/full-codegen-mips64.cc
b/src/mips64/full-codegen-mips64.cc
index
900837f7b1dd50ec6cd5d516108ab78c0336c9bf..eed57afc65d43749473ba95c61ffeb6e24617ec4
100644
--- a/src/mips64/full-codegen-mips64.cc
+++ b/src/mips64/full-codegen-mips64.cc
@@ -3189,12 +3189,8 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Push constructor on the stack. If it's not a function it's used as
// receiver for CALL_NON_FUNCTION, otherwise the value on the stack is
// ignored.
- if (expr->expression()->IsSuperReference()) {
- EmitLoadSuperConstructor(expr->expression()->AsSuperReference());
- __ Push(result_register());
- } else {
- VisitForStackValue(expr->expression());
- }
+ DCHECK(!expr->expression()->IsSuperReference());
+ VisitForStackValue(expr->expression());
// Push the arguments ("left-to-right") on the stack.
ZoneList<Expression*>* args = expr->arguments();
@@ -3202,6 +3198,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
for (int i = 0; i < arg_count; i++) {
VisitForStackValue(args->at(i));
}
+
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetSourcePosition(expr->position());
Index: src/ppc/full-codegen-ppc.cc
diff --git a/src/ppc/full-codegen-ppc.cc b/src/ppc/full-codegen-ppc.cc
index
45133617e07c511cda63c8159fbb65a01b0a3adb..f38ee50c1230f5047c4df475035914b6b91563fc
100644
--- a/src/ppc/full-codegen-ppc.cc
+++ b/src/ppc/full-codegen-ppc.cc
@@ -3206,12 +3206,8 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Push constructor on the stack. If it's not a function it's used as
// receiver for CALL_NON_FUNCTION, otherwise the value on the stack is
// ignored.
- if (expr->expression()->IsSuperReference()) {
- EmitLoadSuperConstructor(expr->expression()->AsSuperReference());
- __ Push(result_register());
- } else {
- VisitForStackValue(expr->expression());
- }
+ DCHECK(!expr->expression()->IsSuperReference());
+ VisitForStackValue(expr->expression());
// Push the arguments ("left-to-right") on the stack.
ZoneList<Expression*>* args = expr->arguments();
Index: src/x64/full-codegen-x64.cc
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
index
65e60fb855368667302c9cab27e7dce5c1a3bca7..77d77a6f77528c53b6abdc66f39d3b36d8787d2d
100644
--- a/src/x64/full-codegen-x64.cc
+++ b/src/x64/full-codegen-x64.cc
@@ -3102,12 +3102,8 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Push constructor on the stack. If it's not a function it's used as
// receiver for CALL_NON_FUNCTION, otherwise the value on the stack is
// ignored.
- if (expr->expression()->IsSuperReference()) {
- EmitLoadSuperConstructor(expr->expression()->AsSuperReference());
- __ Push(result_register());
- } else {
- VisitForStackValue(expr->expression());
- }
+ DCHECK(!expr->expression()->IsSuperReference());
+ VisitForStackValue(expr->expression());
// Push the arguments ("left-to-right") on the stack.
ZoneList<Expression*>* args = expr->arguments();
Index: src/x87/full-codegen-x87.cc
diff --git a/src/x87/full-codegen-x87.cc b/src/x87/full-codegen-x87.cc
index
a1c2960b4d70637de8dfaf685d1af06f0e0f281d..5d67e7cf80146ccf63c5b94d92d533597033b014
100644
--- a/src/x87/full-codegen-x87.cc
+++ b/src/x87/full-codegen-x87.cc
@@ -3084,12 +3084,8 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Push constructor on the stack. If it's not a function it's used as
// receiver for CALL_NON_FUNCTION, otherwise the value on the stack is
// ignored.
- if (expr->expression()->IsSuperReference()) {
- EmitLoadSuperConstructor(expr->expression()->AsSuperReference());
- __ push(result_register());
- } else {
- VisitForStackValue(expr->expression());
- }
+ DCHECK(!expr->expression()->IsSuperReference());
+ VisitForStackValue(expr->expression());
// Push the arguments ("left-to-right") on the stack.
ZoneList<Expression*>* args = expr->arguments();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.