| 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 #ifndef V8_PREPARSER_H | 5 #ifndef V8_PREPARSER_H |
| 6 #define V8_PREPARSER_H | 6 #define V8_PREPARSER_H |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1617 // PreParser should not use FuncNameInferrer. | 1617 // PreParser should not use FuncNameInferrer. |
| 1618 UNREACHABLE(); | 1618 UNREACHABLE(); |
| 1619 } | 1619 } |
| 1620 | 1620 |
| 1621 static void CheckFunctionLiteralInsideTopLevelObjectLiteral( | 1621 static void CheckFunctionLiteralInsideTopLevelObjectLiteral( |
| 1622 Scope* scope, PreParserExpression property, bool* has_function) {} | 1622 Scope* scope, PreParserExpression property, bool* has_function) {} |
| 1623 | 1623 |
| 1624 static void CheckAssigningFunctionLiteralToProperty( | 1624 static void CheckAssigningFunctionLiteralToProperty( |
| 1625 PreParserExpression left, PreParserExpression right) {} | 1625 PreParserExpression left, PreParserExpression right) {} |
| 1626 | 1626 |
| 1627 // PreParser doesn't need to keep track of eval calls. | |
| 1628 static void CheckPossibleEvalCall(PreParserExpression expression, | 1627 static void CheckPossibleEvalCall(PreParserExpression expression, |
| 1629 Scope* scope) {} | 1628 Scope* scope) { |
| 1629 if (IsIdentifier(expression) && IsEval(AsIdentifier(expression))) { |
| 1630 scope->DeclarationScope()->RecordEvalCall(); |
| 1631 scope->RecordEvalCall(); |
| 1632 } |
| 1633 } |
| 1630 | 1634 |
| 1631 static PreParserExpression MarkExpressionAsAssigned( | 1635 static PreParserExpression MarkExpressionAsAssigned( |
| 1632 PreParserExpression expression) { | 1636 PreParserExpression expression) { |
| 1633 // TODO(marja): To be able to produce the same errors, the preparser needs | 1637 // TODO(marja): To be able to produce the same errors, the preparser needs |
| 1634 // to start tracking which expressions are variables and which are assigned. | 1638 // to start tracking which expressions are variables and which are assigned. |
| 1635 return expression; | 1639 return expression; |
| 1636 } | 1640 } |
| 1637 | 1641 |
| 1638 bool ShortcutNumericLiteralBinaryExpression(PreParserExpression* x, | 1642 bool ShortcutNumericLiteralBinaryExpression(PreParserExpression* x, |
| 1639 PreParserExpression y, | 1643 PreParserExpression y, |
| (...skipping 2405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4045 *ok = false; | 4049 *ok = false; |
| 4046 return; | 4050 return; |
| 4047 } | 4051 } |
| 4048 has_seen_constructor_ = true; | 4052 has_seen_constructor_ = true; |
| 4049 return; | 4053 return; |
| 4050 } | 4054 } |
| 4051 } | 4055 } |
| 4052 } } // v8::internal | 4056 } } // v8::internal |
| 4053 | 4057 |
| 4054 #endif // V8_PREPARSER_H | 4058 #endif // V8_PREPARSER_H |
| OLD | NEW |