OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 only_simple_this_property_assignments_(false), | 525 only_simple_this_property_assignments_(false), |
526 this_property_assignments_(isolate->factory()->empty_fixed_array()), | 526 this_property_assignments_(isolate->factory()->empty_fixed_array()), |
527 parser_(parser), | 527 parser_(parser), |
528 lexical_scope_parent_(parser->lexical_scope_), | 528 lexical_scope_parent_(parser->lexical_scope_), |
529 previous_scope_(parser->top_scope_), | 529 previous_scope_(parser->top_scope_), |
530 previous_with_nesting_level_(parser->with_nesting_level_), | 530 previous_with_nesting_level_(parser->with_nesting_level_), |
531 previous_ast_node_id_(isolate->ast_node_id()) { | 531 previous_ast_node_id_(isolate->ast_node_id()) { |
532 parser->top_scope_ = scope; | 532 parser->top_scope_ = scope; |
533 parser->lexical_scope_ = this; | 533 parser->lexical_scope_ = this; |
534 parser->with_nesting_level_ = 0; | 534 parser->with_nesting_level_ = 0; |
535 isolate->set_ast_node_id(AstNode::kFunctionEntryId + 1); | 535 isolate->set_ast_node_id(AstNode::kDeclarationsId + 1); |
536 } | 536 } |
537 | 537 |
538 | 538 |
539 LexicalScope::~LexicalScope() { | 539 LexicalScope::~LexicalScope() { |
540 parser_->top_scope_ = previous_scope_; | 540 parser_->top_scope_ = previous_scope_; |
541 parser_->lexical_scope_ = lexical_scope_parent_; | 541 parser_->lexical_scope_ = lexical_scope_parent_; |
542 parser_->with_nesting_level_ = previous_with_nesting_level_; | 542 parser_->with_nesting_level_ = previous_with_nesting_level_; |
543 parser_->isolate()->set_ast_node_id(previous_ast_node_id_); | 543 parser_->isolate()->set_ast_node_id(previous_ast_node_id_); |
544 } | 544 } |
545 | 545 |
(...skipping 4629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5175 result = parser.ParseProgram(source, | 5175 result = parser.ParseProgram(source, |
5176 info->is_global(), | 5176 info->is_global(), |
5177 info->StrictMode()); | 5177 info->StrictMode()); |
5178 } | 5178 } |
5179 } | 5179 } |
5180 info->SetFunction(result); | 5180 info->SetFunction(result); |
5181 return (result != NULL); | 5181 return (result != NULL); |
5182 } | 5182 } |
5183 | 5183 |
5184 } } // namespace v8::internal | 5184 } } // namespace v8::internal |
OLD | NEW |