| 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 3617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3628 if (end_pos <= function_block_pos) { | 3628 if (end_pos <= function_block_pos) { |
| 3629 // End position greater than end of stream is safe, and hard to check. | 3629 // End position greater than end of stream is safe, and hard to check. |
| 3630 ReportInvalidPreparseData(name, CHECK_OK); | 3630 ReportInvalidPreparseData(name, CHECK_OK); |
| 3631 } | 3631 } |
| 3632 isolate()->counters()->total_preparse_skipped()->Increment( | 3632 isolate()->counters()->total_preparse_skipped()->Increment( |
| 3633 end_pos - function_block_pos); | 3633 end_pos - function_block_pos); |
| 3634 // Seek to position just before terminal '}'. | 3634 // Seek to position just before terminal '}'. |
| 3635 scanner().SeekForward(end_pos - 1); | 3635 scanner().SeekForward(end_pos - 1); |
| 3636 materialized_literal_count = entry.literal_count(); | 3636 materialized_literal_count = entry.literal_count(); |
| 3637 expected_property_count = entry.property_count(); | 3637 expected_property_count = entry.property_count(); |
| 3638 if (entry.strict_mode()) top_scope_->EnableStrictMode(); |
| 3638 only_simple_this_property_assignments = false; | 3639 only_simple_this_property_assignments = false; |
| 3639 this_property_assignments = isolate()->factory()->empty_fixed_array(); | 3640 this_property_assignments = isolate()->factory()->empty_fixed_array(); |
| 3640 Expect(Token::RBRACE, CHECK_OK); | 3641 Expect(Token::RBRACE, CHECK_OK); |
| 3641 } else { | 3642 } else { |
| 3642 ParseSourceElements(body, Token::RBRACE, CHECK_OK); | 3643 ParseSourceElements(body, Token::RBRACE, CHECK_OK); |
| 3643 | 3644 |
| 3644 materialized_literal_count = lexical_scope.materialized_literal_count(); | 3645 materialized_literal_count = lexical_scope.materialized_literal_count(); |
| 3645 expected_property_count = lexical_scope.expected_property_count(); | 3646 expected_property_count = lexical_scope.expected_property_count(); |
| 3646 only_simple_this_property_assignments = | 3647 only_simple_this_property_assignments = |
| 3647 lexical_scope.only_simple_this_property_assignments(); | 3648 lexical_scope.only_simple_this_property_assignments(); |
| (...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4990 info->is_global(), | 4991 info->is_global(), |
| 4991 info->StrictMode()); | 4992 info->StrictMode()); |
| 4992 } | 4993 } |
| 4993 } | 4994 } |
| 4994 | 4995 |
| 4995 info->SetFunction(result); | 4996 info->SetFunction(result); |
| 4996 return (result != NULL); | 4997 return (result != NULL); |
| 4997 } | 4998 } |
| 4998 | 4999 |
| 4999 } } // namespace v8::internal | 5000 } } // namespace v8::internal |
| OLD | NEW |