OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 expected_property_count_(0), | 489 expected_property_count_(0), |
490 only_simple_this_property_assignments_(false), | 490 only_simple_this_property_assignments_(false), |
491 this_property_assignments_(isolate->factory()->empty_fixed_array()), | 491 this_property_assignments_(isolate->factory()->empty_fixed_array()), |
492 parser_(parser), | 492 parser_(parser), |
493 outer_function_state_(parser->current_function_state_), | 493 outer_function_state_(parser->current_function_state_), |
494 outer_scope_(parser->top_scope_), | 494 outer_scope_(parser->top_scope_), |
495 saved_ast_node_id_(isolate->ast_node_id()), | 495 saved_ast_node_id_(isolate->ast_node_id()), |
496 factory_(isolate, parser->zone()) { | 496 factory_(isolate, parser->zone()) { |
497 parser->top_scope_ = scope; | 497 parser->top_scope_ = scope; |
498 parser->current_function_state_ = this; | 498 parser->current_function_state_ = this; |
499 isolate->set_ast_node_id(AstNode::kDeclarationsId + 1); | 499 isolate->set_ast_node_id(BailoutId::FirstUsable().ToInt()); |
500 } | 500 } |
501 | 501 |
502 | 502 |
503 Parser::FunctionState::~FunctionState() { | 503 Parser::FunctionState::~FunctionState() { |
504 parser_->top_scope_ = outer_scope_; | 504 parser_->top_scope_ = outer_scope_; |
505 parser_->current_function_state_ = outer_function_state_; | 505 parser_->current_function_state_ = outer_function_state_; |
506 if (outer_function_state_ != NULL) { | 506 if (outer_function_state_ != NULL) { |
507 parser_->isolate()->set_ast_node_id(saved_ast_node_id_); | 507 parser_->isolate()->set_ast_node_id(saved_ast_node_id_); |
508 } | 508 } |
509 } | 509 } |
(...skipping 5566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6076 ASSERT(info->isolate()->has_pending_exception()); | 6076 ASSERT(info->isolate()->has_pending_exception()); |
6077 } else { | 6077 } else { |
6078 result = parser.ParseProgram(); | 6078 result = parser.ParseProgram(); |
6079 } | 6079 } |
6080 } | 6080 } |
6081 info->SetFunction(result); | 6081 info->SetFunction(result); |
6082 return (result != NULL); | 6082 return (result != NULL); |
6083 } | 6083 } |
6084 | 6084 |
6085 } } // namespace v8::internal | 6085 } } // namespace v8::internal |
OLD | NEW |