| 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 previous_with_nesting_level_(parser->with_nesting_level_), | 529 previous_with_nesting_level_(parser->with_nesting_level_), |
| 530 previous_ast_node_id_(isolate->ast_node_id()) { | 530 previous_ast_node_id_(isolate->ast_node_id()) { |
| 531 parser->top_scope_ = scope; | 531 parser->top_scope_ = scope; |
| 532 parser->lexical_scope_ = this; | 532 parser->lexical_scope_ = this; |
| 533 parser->with_nesting_level_ = 0; | 533 parser->with_nesting_level_ = 0; |
| 534 isolate->set_ast_node_id(AstNode::kFunctionEntryId + 1); | 534 isolate->set_ast_node_id(AstNode::kFunctionEntryId + 1); |
| 535 } | 535 } |
| 536 | 536 |
| 537 | 537 |
| 538 LexicalScope::~LexicalScope() { | 538 LexicalScope::~LexicalScope() { |
| 539 parser_->top_scope_->Leave(); | |
| 540 parser_->top_scope_ = previous_scope_; | 539 parser_->top_scope_ = previous_scope_; |
| 541 parser_->lexical_scope_ = lexical_scope_parent_; | 540 parser_->lexical_scope_ = lexical_scope_parent_; |
| 542 parser_->with_nesting_level_ = previous_with_nesting_level_; | 541 parser_->with_nesting_level_ = previous_with_nesting_level_; |
| 543 parser_->isolate()->set_ast_node_id(previous_ast_node_id_); | 542 parser_->isolate()->set_ast_node_id(previous_ast_node_id_); |
| 544 } | 543 } |
| 545 | 544 |
| 546 | 545 |
| 547 // ---------------------------------------------------------------------------- | 546 // ---------------------------------------------------------------------------- |
| 548 // The CHECK_OK macro is a convenient macro to enforce error | 547 // The CHECK_OK macro is a convenient macro to enforce error |
| 549 // handling for functions that may fail (by returning !*ok). | 548 // handling for functions that may fail (by returning !*ok). |
| (...skipping 4438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4988 info->is_global(), | 4987 info->is_global(), |
| 4989 info->StrictMode()); | 4988 info->StrictMode()); |
| 4990 } | 4989 } |
| 4991 } | 4990 } |
| 4992 | 4991 |
| 4993 info->SetFunction(result); | 4992 info->SetFunction(result); |
| 4994 return (result != NULL); | 4993 return (result != NULL); |
| 4995 } | 4994 } |
| 4996 | 4995 |
| 4997 } } // namespace v8::internal | 4996 } } // namespace v8::internal |
| OLD | NEW |