| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 (outer_scope_type == kTopLevelScope && !inside_with && allow_lazy_); | 1071 (outer_scope_type == kTopLevelScope && !inside_with && allow_lazy_); |
| 1072 | 1072 |
| 1073 if (is_lazily_compiled) { | 1073 if (is_lazily_compiled) { |
| 1074 log_->PauseRecording(); | 1074 log_->PauseRecording(); |
| 1075 ParseSourceElements(i::Token::RBRACE, ok); | 1075 ParseSourceElements(i::Token::RBRACE, ok); |
| 1076 log_->ResumeRecording(); | 1076 log_->ResumeRecording(); |
| 1077 if (!*ok) return kUnknownExpression; | 1077 if (!*ok) return kUnknownExpression; |
| 1078 | 1078 |
| 1079 Expect(i::Token::RBRACE, CHECK_OK); | 1079 Expect(i::Token::RBRACE, CHECK_OK); |
| 1080 | 1080 |
| 1081 // Position right after terminal '}'. | |
| 1082 int end_pos = scanner_->location().end_pos; | 1081 int end_pos = scanner_->location().end_pos; |
| 1083 log_->LogFunction(function_block_pos, end_pos, | 1082 log_->LogFunction(function_block_pos, end_pos, |
| 1084 function_scope.materialized_literal_count(), | 1083 function_scope.materialized_literal_count(), |
| 1085 function_scope.expected_properties()); | 1084 function_scope.expected_properties()); |
| 1086 } else { | 1085 } else { |
| 1087 ParseSourceElements(i::Token::RBRACE, CHECK_OK); | 1086 ParseSourceElements(i::Token::RBRACE, CHECK_OK); |
| 1088 Expect(i::Token::RBRACE, CHECK_OK); | 1087 Expect(i::Token::RBRACE, CHECK_OK); |
| 1089 } | 1088 } |
| 1090 return kUnknownExpression; | 1089 return kUnknownExpression; |
| 1091 } | 1090 } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 if (scanner_->literal_length() == 3) { | 1175 if (scanner_->literal_length() == 3) { |
| 1177 const char* token = scanner_->literal_string(); | 1176 const char* token = scanner_->literal_string(); |
| 1178 *is_get = strncmp(token, "get", 3) == 0; | 1177 *is_get = strncmp(token, "get", 3) == 0; |
| 1179 *is_set = !*is_get && strncmp(token, "set", 3) == 0; | 1178 *is_set = !*is_get && strncmp(token, "set", 3) == 0; |
| 1180 } | 1179 } |
| 1181 return GetIdentifierSymbol(); | 1180 return GetIdentifierSymbol(); |
| 1182 } | 1181 } |
| 1183 | 1182 |
| 1184 #undef CHECK_OK | 1183 #undef CHECK_OK |
| 1185 } } // v8::preparser | 1184 } } // v8::preparser |
| OLD | NEW |