Commit db1cc0cf authored by marja's avatar marja Committed by Commit bot

Parser / PreParser: remove dead code.

Eval calls are tracked by ParserBase::CheckPossibleEvalCall which
doesn't use (Pre)?Parser::IsDirectEvalCall.

Also we no longer seem to care about IsBinaryOperation (Parser didn't
have it either).

BUG=

Review-Url: https://codereview.chromium.org/2528603003
Cr-Commit-Position: refs/heads/master@{#41216}
parent 86d38086
......@@ -720,12 +720,6 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
return identifier == ast_value_factory()->constructor_string();
}
V8_INLINE bool IsDirectEvalCall(Expression* expression) const {
if (!expression->IsCall()) return false;
expression = expression->AsCall()->expression();
return IsIdentifier(expression) && IsEval(AsIdentifier(expression));
}
V8_INLINE static bool IsBoilerplateProperty(
ObjectLiteral::Property* property) {
return ObjectLiteral::IsBoilerplateProperty(property);
......
......@@ -150,7 +150,7 @@ class PreParserExpression {
static PreParserExpression BinaryOperation(PreParserExpression left,
Token::Value op,
PreParserExpression right) {
return PreParserExpression(TypeField::encode(kBinaryOperationExpression));
return PreParserExpression(TypeField::encode(kExpression));
}
static PreParserExpression Assignment() {
......@@ -284,11 +284,6 @@ class PreParserExpression {
ExpressionTypeField::decode(code_) == kCallEvalExpression);
}
bool IsDirectEvalCall() const {
return TypeField::decode(code_) == kExpression &&
ExpressionTypeField::decode(code_) == kCallEvalExpression;
}
bool IsSuperCallReference() const {
return TypeField::decode(code_) == kExpression &&
ExpressionTypeField::decode(code_) == kSuperCallReference;
......@@ -313,10 +308,6 @@ class PreParserExpression {
PreParserExpression AsFunctionLiteral() { return *this; }
bool IsBinaryOperation() const {
return TypeField::decode(code_) == kBinaryOperationExpression;
}
// Dummy implementation for making expression->somefunc() work in both Parser
// and PreParser.
PreParserExpression* operator->() { return this; }
......@@ -337,7 +328,6 @@ class PreParserExpression {
kExpression,
kIdentifierExpression,
kStringLiteralExpression,
kBinaryOperationExpression,
kSpreadExpression,
kObjectLiteralExpression,
kArrayLiteralExpression
......@@ -1149,10 +1139,6 @@ class PreParser : public ParserBase<PreParser> {
return identifier.IsConstructor();
}
V8_INLINE bool IsDirectEvalCall(PreParserExpression expression) const {
return expression.IsDirectEvalCall();
}
V8_INLINE static bool IsBoilerplateProperty(PreParserExpression property) {
// PreParser doesn't count boilerplate properties.
return false;
......
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