| 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_PARSING_PARSER_BASE_H | 5 #ifndef V8_PARSING_PARSER_BASE_H |
| 6 #define V8_PARSING_PARSER_BASE_H | 6 #define V8_PARSING_PARSER_BASE_H |
| 7 | 7 |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 3134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3145 // The calls that need special treatment are the | 3145 // The calls that need special treatment are the |
| 3146 // direct eval calls. These calls are all of the form eval(...), with | 3146 // direct eval calls. These calls are all of the form eval(...), with |
| 3147 // no explicit receiver. | 3147 // no explicit receiver. |
| 3148 // These calls are marked as potentially direct eval calls. Whether | 3148 // These calls are marked as potentially direct eval calls. Whether |
| 3149 // they are actually direct calls to eval is determined at run time. | 3149 // they are actually direct calls to eval is determined at run time. |
| 3150 Call::PossiblyEval is_possibly_eval = | 3150 Call::PossiblyEval is_possibly_eval = |
| 3151 CheckPossibleEvalCall(result, scope()); | 3151 CheckPossibleEvalCall(result, scope()); |
| 3152 | 3152 |
| 3153 bool is_super_call = result->IsSuperCallReference(); | 3153 bool is_super_call = result->IsSuperCallReference(); |
| 3154 if (spread_pos.IsValid()) { | 3154 if (spread_pos.IsValid()) { |
| 3155 args = impl()->PrepareSpreadArguments(args); | |
| 3156 result = impl()->SpreadCall(result, args, pos); | 3155 result = impl()->SpreadCall(result, args, pos); |
| 3157 } else { | 3156 } else { |
| 3158 result = factory()->NewCall(result, args, pos, is_possibly_eval); | 3157 result = factory()->NewCall(result, args, pos, is_possibly_eval); |
| 3159 } | 3158 } |
| 3160 | 3159 |
| 3161 // Explicit calls to the super constructor using super() perform an | 3160 // Explicit calls to the super constructor using super() perform an |
| 3162 // implicit binding assignment to the 'this' variable. | 3161 // implicit binding assignment to the 'this' variable. |
| 3163 if (is_super_call) { | 3162 if (is_super_call) { |
| 3164 result = impl()->RewriteSuperCall(result); | 3163 result = impl()->RewriteSuperCall(result); |
| 3165 ExpressionT this_expr = impl()->ThisExpression(pos); | 3164 ExpressionT this_expr = impl()->ThisExpression(pos); |
| (...skipping 2331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5497 has_seen_constructor_ = true; | 5496 has_seen_constructor_ = true; |
| 5498 return; | 5497 return; |
| 5499 } | 5498 } |
| 5500 } | 5499 } |
| 5501 | 5500 |
| 5502 | 5501 |
| 5503 } // namespace internal | 5502 } // namespace internal |
| 5504 } // namespace v8 | 5503 } // namespace v8 |
| 5505 | 5504 |
| 5506 #endif // V8_PARSING_PARSER_BASE_H | 5505 #endif // V8_PARSING_PARSER_BASE_H |
| OLD | NEW |