| 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 4952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4963 if (allow_harmony_function_name() && | 4963 if (allow_harmony_function_name() && |
| 4964 property_name != ast_value_factory()->constructor_string()) { | 4964 property_name != ast_value_factory()->constructor_string()) { |
| 4965 SetFunctionNameFromPropertyName(property, property_name); | 4965 SetFunctionNameFromPropertyName(property, property_name); |
| 4966 } | 4966 } |
| 4967 } | 4967 } |
| 4968 | 4968 |
| 4969 Expect(Token::RBRACE, CHECK_OK); | 4969 Expect(Token::RBRACE, CHECK_OK); |
| 4970 int end_pos = scanner()->location().end_pos; | 4970 int end_pos = scanner()->location().end_pos; |
| 4971 | 4971 |
| 4972 if (constructor == NULL) { | 4972 if (constructor == NULL) { |
| 4973 constructor = DefaultConstructor(name, extends != NULL, block_scope, pos, | 4973 constructor = DefaultConstructor(name, has_extends, block_scope, pos, |
| 4974 end_pos, block_scope->language_mode()); | 4974 end_pos, block_scope->language_mode()); |
| 4975 } | 4975 } |
| 4976 | 4976 |
| 4977 // Note that we do not finalize this block scope because it is | 4977 // Note that we do not finalize this block scope because it is |
| 4978 // used as a sentinel value indicating an anonymous class. | 4978 // used as a sentinel value indicating an anonymous class. |
| 4979 block_scope->set_end_position(end_pos); | 4979 block_scope->set_end_position(end_pos); |
| 4980 | 4980 |
| 4981 if (name != NULL) { | 4981 if (name != NULL) { |
| 4982 DCHECK_NOT_NULL(proxy); | 4982 DCHECK_NOT_NULL(proxy); |
| 4983 proxy->var()->set_initializer_position(end_pos); | 4983 proxy->var()->set_initializer_position(end_pos); |
| (...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6965 try_block, target); | 6965 try_block, target); |
| 6966 final_loop = target; | 6966 final_loop = target; |
| 6967 } | 6967 } |
| 6968 | 6968 |
| 6969 return final_loop; | 6969 return final_loop; |
| 6970 } | 6970 } |
| 6971 | 6971 |
| 6972 | 6972 |
| 6973 } // namespace internal | 6973 } // namespace internal |
| 6974 } // namespace v8 | 6974 } // namespace v8 |
| OLD | NEW |