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
parent a0f41ad3
...@@ -1829,10 +1829,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { ...@@ -1829,10 +1829,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
Expression* subexpr = subexprs->at(i); Expression* subexpr = subexprs->at(i);
// If the subexpression is a literal or a simple materialized literal it // If the subexpression is a literal or a simple materialized literal it
// is already set in the cloned array. // is already set in the cloned array.
if (subexpr->AsLiteral() != NULL || if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
CompileTimeValue::IsCompileTimeValue(subexpr)) {
continue;
}
if (!result_saved) { if (!result_saved) {
__ push(r0); __ push(r0);
......
...@@ -1782,10 +1782,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { ...@@ -1782,10 +1782,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
Expression* subexpr = subexprs->at(i); Expression* subexpr = subexprs->at(i);
// If the subexpression is a literal or a simple materialized literal it // If the subexpression is a literal or a simple materialized literal it
// is already set in the cloned array. // is already set in the cloned array.
if (subexpr->AsLiteral() != NULL || if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
CompileTimeValue::IsCompileTimeValue(subexpr)) {
continue;
}
if (!result_saved) { if (!result_saved) {
__ push(eax); // array literal. __ push(eax); // array literal.
......
...@@ -1834,10 +1834,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { ...@@ -1834,10 +1834,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
Expression* subexpr = subexprs->at(i); Expression* subexpr = subexprs->at(i);
// If the subexpression is a literal or a simple materialized literal it // If the subexpression is a literal or a simple materialized literal it
// is already set in the cloned array. // is already set in the cloned array.
if (subexpr->AsLiteral() != NULL || if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
CompileTimeValue::IsCompileTimeValue(subexpr)) {
continue;
}
if (!result_saved) { if (!result_saved) {
__ push(v0); // array literal __ push(v0); // array literal
......
...@@ -3734,18 +3734,6 @@ bool CompileTimeValue::IsCompileTimeValue(Expression* expression) { ...@@ -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<FixedArray> CompileTimeValue::GetValue(Expression* expression) { Handle<FixedArray> CompileTimeValue::GetValue(Expression* expression) {
Factory* factory = Isolate::Current()->factory(); Factory* factory = Isolate::Current()->factory();
ASSERT(IsCompileTimeValue(expression)); ASSERT(IsCompileTimeValue(expression));
......
...@@ -888,8 +888,6 @@ class CompileTimeValue: public AllStatic { ...@@ -888,8 +888,6 @@ class CompileTimeValue: public AllStatic {
static bool IsCompileTimeValue(Expression* expression); static bool IsCompileTimeValue(Expression* expression);
static bool ArrayLiteralElementNeedsInitialization(Expression* value);
// Get the value as a compile time value. // Get the value as a compile time value.
static Handle<FixedArray> GetValue(Expression* expression); static Handle<FixedArray> GetValue(Expression* expression);
......
...@@ -1806,10 +1806,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { ...@@ -1806,10 +1806,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
Expression* subexpr = subexprs->at(i); Expression* subexpr = subexprs->at(i);
// If the subexpression is a literal or a simple materialized literal it // If the subexpression is a literal or a simple materialized literal it
// is already set in the cloned array. // is already set in the cloned array.
if (subexpr->AsLiteral() != NULL || if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
CompileTimeValue::IsCompileTimeValue(subexpr)) {
continue;
}
if (!result_saved) { if (!result_saved) {
__ push(rax); // array literal __ push(rax); // array literal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment