From 6c879c8a3092f7b4f9c7896be91f3e12b91add7f Mon Sep 17 00:00:00 2001 From: "svenpanne@chromium.org" Date: Mon, 24 Jun 2013 14:26:32 +0000 Subject: [PATCH] Removed some useless/dead code regarding CompileTimeValues. R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/17580018 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/full-codegen-arm.cc | 5 +---- src/ia32/full-codegen-ia32.cc | 5 +---- src/mips/full-codegen-mips.cc | 5 +---- src/parser.cc | 12 ------------ src/parser.h | 2 -- src/x64/full-codegen-x64.cc | 5 +---- 6 files changed, 4 insertions(+), 30 deletions(-) diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc index 4c61243..357f0af 100644 --- a/src/arm/full-codegen-arm.cc +++ b/src/arm/full-codegen-arm.cc @@ -1829,10 +1829,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { Expression* subexpr = subexprs->at(i); // If the subexpression is a literal or a simple materialized literal it // is already set in the cloned array. - if (subexpr->AsLiteral() != NULL || - CompileTimeValue::IsCompileTimeValue(subexpr)) { - continue; - } + if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; if (!result_saved) { __ push(r0); diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc index c55554f..d04fdd4 100644 --- a/src/ia32/full-codegen-ia32.cc +++ b/src/ia32/full-codegen-ia32.cc @@ -1782,10 +1782,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { Expression* subexpr = subexprs->at(i); // If the subexpression is a literal or a simple materialized literal it // is already set in the cloned array. - if (subexpr->AsLiteral() != NULL || - CompileTimeValue::IsCompileTimeValue(subexpr)) { - continue; - } + if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; if (!result_saved) { __ push(eax); // array literal. diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc index 7ef9fd6..bf13d91 100644 --- a/src/mips/full-codegen-mips.cc +++ b/src/mips/full-codegen-mips.cc @@ -1834,10 +1834,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { Expression* subexpr = subexprs->at(i); // If the subexpression is a literal or a simple materialized literal it // is already set in the cloned array. - if (subexpr->AsLiteral() != NULL || - CompileTimeValue::IsCompileTimeValue(subexpr)) { - continue; - } + if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; if (!result_saved) { __ push(v0); // array literal diff --git a/src/parser.cc b/src/parser.cc index 2ba36d3..5132679 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -3734,18 +3734,6 @@ bool CompileTimeValue::IsCompileTimeValue(Expression* expression) { } -bool CompileTimeValue::ArrayLiteralElementNeedsInitialization( - Expression* value) { - // If value is a literal the property value is already set in the - // boilerplate object. - if (value->AsLiteral() != NULL) return false; - // If value is a materialized literal the property value is already set - // in the boilerplate object if it is simple. - if (CompileTimeValue::IsCompileTimeValue(value)) return false; - return true; -} - - Handle CompileTimeValue::GetValue(Expression* expression) { Factory* factory = Isolate::Current()->factory(); ASSERT(IsCompileTimeValue(expression)); diff --git a/src/parser.h b/src/parser.h index 38633b0..5f4c686 100644 --- a/src/parser.h +++ b/src/parser.h @@ -888,8 +888,6 @@ class CompileTimeValue: public AllStatic { static bool IsCompileTimeValue(Expression* expression); - static bool ArrayLiteralElementNeedsInitialization(Expression* value); - // Get the value as a compile time value. static Handle GetValue(Expression* expression); diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc index e53c464..7732a1d 100644 --- a/src/x64/full-codegen-x64.cc +++ b/src/x64/full-codegen-x64.cc @@ -1806,10 +1806,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { Expression* subexpr = subexprs->at(i); // If the subexpression is a literal or a simple materialized literal it // is already set in the cloned array. - if (subexpr->AsLiteral() != NULL || - CompileTimeValue::IsCompileTimeValue(subexpr)) { - continue; - } + if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; if (!result_saved) { __ push(rax); // array literal -- 2.7.4