| 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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 (outer_scope_type == kTopLevelScope && !inside_with && allow_lazy_); | 1078 (outer_scope_type == kTopLevelScope && !inside_with && allow_lazy_); |
| 1079 | 1079 |
| 1080 if (is_lazily_compiled) { | 1080 if (is_lazily_compiled) { |
| 1081 log_->PauseRecording(); | 1081 log_->PauseRecording(); |
| 1082 ParseSourceElements(i::Token::RBRACE, ok); | 1082 ParseSourceElements(i::Token::RBRACE, ok); |
| 1083 log_->ResumeRecording(); | 1083 log_->ResumeRecording(); |
| 1084 if (!*ok) return kUnknownExpression; | 1084 if (!*ok) return kUnknownExpression; |
| 1085 | 1085 |
| 1086 Expect(i::Token::RBRACE, CHECK_OK); | 1086 Expect(i::Token::RBRACE, CHECK_OK); |
| 1087 | 1087 |
| 1088 // Position right after terminal '}'. |
| 1088 int end_pos = scanner_->location().end_pos; | 1089 int end_pos = scanner_->location().end_pos; |
| 1089 log_->LogFunction(function_block_pos, end_pos, | 1090 log_->LogFunction(function_block_pos, end_pos, |
| 1090 function_scope.materialized_literal_count(), | 1091 function_scope.materialized_literal_count(), |
| 1091 function_scope.expected_properties()); | 1092 function_scope.expected_properties()); |
| 1092 } else { | 1093 } else { |
| 1093 ParseSourceElements(i::Token::RBRACE, CHECK_OK); | 1094 ParseSourceElements(i::Token::RBRACE, CHECK_OK); |
| 1094 Expect(i::Token::RBRACE, CHECK_OK); | 1095 Expect(i::Token::RBRACE, CHECK_OK); |
| 1095 } | 1096 } |
| 1096 return kUnknownExpression; | 1097 return kUnknownExpression; |
| 1097 } | 1098 } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1182 if (scanner_->literal_length() == 3) { | 1183 if (scanner_->literal_length() == 3) { |
| 1183 const char* token = scanner_->literal_string(); | 1184 const char* token = scanner_->literal_string(); |
| 1184 *is_get = strncmp(token, "get", 3) == 0; | 1185 *is_get = strncmp(token, "get", 3) == 0; |
| 1185 *is_set = !*is_get && strncmp(token, "set", 3) == 0; | 1186 *is_set = !*is_get && strncmp(token, "set", 3) == 0; |
| 1186 } | 1187 } |
| 1187 return GetIdentifierSymbol(); | 1188 return GetIdentifierSymbol(); |
| 1188 } | 1189 } |
| 1189 | 1190 |
| 1190 #undef CHECK_OK | 1191 #undef CHECK_OK |
| 1191 } } // v8::preparser | 1192 } } // v8::preparser |
| OLD | NEW |