| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/parsing/parser.h" | 5 #include "src/parsing/parser.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/ast-expression-rewriter.h" | 9 #include "src/ast/ast-expression-rewriter.h" |
| 10 #include "src/ast/ast-expression-visitor.h" | 10 #include "src/ast/ast-expression-visitor.h" |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 return property != NULL && property->obj()->IsVariableProxy() && | 388 return property != NULL && property->obj()->IsVariableProxy() && |
| 389 property->obj()->AsVariableProxy()->is_this(); | 389 property->obj()->AsVariableProxy()->is_this(); |
| 390 } | 390 } |
| 391 | 391 |
| 392 | 392 |
| 393 bool ParserTraits::IsIdentifier(Expression* expression) { | 393 bool ParserTraits::IsIdentifier(Expression* expression) { |
| 394 VariableProxy* operand = expression->AsVariableProxy(); | 394 VariableProxy* operand = expression->AsVariableProxy(); |
| 395 return operand != NULL && !operand->is_this(); | 395 return operand != NULL && !operand->is_this(); |
| 396 } | 396 } |
| 397 | 397 |
| 398 bool ParserTraits::IsEmptyExpression(Expression* expression) { |
| 399 return expression == nullptr; |
| 400 } |
| 398 | 401 |
| 399 void ParserTraits::PushPropertyName(FuncNameInferrer* fni, | 402 void ParserTraits::PushPropertyName(FuncNameInferrer* fni, |
| 400 Expression* expression) { | 403 Expression* expression) { |
| 401 if (expression->IsPropertyName()) { | 404 if (expression->IsPropertyName()) { |
| 402 fni->PushLiteralName(expression->AsLiteral()->AsRawPropertyName()); | 405 fni->PushLiteralName(expression->AsLiteral()->AsRawPropertyName()); |
| 403 } else { | 406 } else { |
| 404 fni->PushLiteralName( | 407 fni->PushLiteralName( |
| 405 parser_->ast_value_factory()->anonymous_function_string()); | 408 parser_->ast_value_factory()->anonymous_function_string()); |
| 406 } | 409 } |
| 407 } | 410 } |
| (...skipping 6667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7075 node->Print(Isolate::Current()); | 7078 node->Print(Isolate::Current()); |
| 7076 } | 7079 } |
| 7077 #endif // DEBUG | 7080 #endif // DEBUG |
| 7078 | 7081 |
| 7079 #undef CHECK_OK | 7082 #undef CHECK_OK |
| 7080 #undef CHECK_OK_VOID | 7083 #undef CHECK_OK_VOID |
| 7081 #undef CHECK_FAILED | 7084 #undef CHECK_FAILED |
| 7082 | 7085 |
| 7083 } // namespace internal | 7086 } // namespace internal |
| 7084 } // namespace v8 | 7087 } // namespace v8 |
| OLD | NEW |