| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 3083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3094 ReportMessage("unterminated_regexp", Vector<const char*>::empty()); | 3094 ReportMessage("unterminated_regexp", Vector<const char*>::empty()); |
| 3095 *ok = false; | 3095 *ok = false; |
| 3096 return NULL; | 3096 return NULL; |
| 3097 } | 3097 } |
| 3098 | 3098 |
| 3099 int literal_index = temp_scope_->NextMaterializedLiteralIndex(); | 3099 int literal_index = temp_scope_->NextMaterializedLiteralIndex(); |
| 3100 | 3100 |
| 3101 if (is_pre_parsing_) { | 3101 if (is_pre_parsing_) { |
| 3102 // If we're preparsing we just do all the parsing stuff without | 3102 // If we're preparsing we just do all the parsing stuff without |
| 3103 // building anything. | 3103 // building anything. |
| 3104 scanner_.ScanRegExpFlags(); | 3104 if (!scanner_.ScanRegExpFlags()) { |
| 3105 Next(); |
| 3106 ReportMessage("invalid_regexp_flags", Vector<const char*>::empty()); |
| 3107 *ok = false; |
| 3108 return NULL; |
| 3109 } |
| 3105 Next(); | 3110 Next(); |
| 3106 return NULL; | 3111 return NULL; |
| 3107 } | 3112 } |
| 3108 | 3113 |
| 3109 Handle<String> js_pattern = | 3114 Handle<String> js_pattern = |
| 3110 Factory::NewStringFromUtf8(scanner_.next_literal(), TENURED); | 3115 Factory::NewStringFromUtf8(scanner_.next_literal(), TENURED); |
| 3111 scanner_.ScanRegExpFlags(); | 3116 scanner_.ScanRegExpFlags(); |
| 3112 Handle<String> js_flags = | 3117 Handle<String> js_flags = |
| 3113 Factory::NewStringFromUtf8(scanner_.next_literal(), TENURED); | 3118 Factory::NewStringFromUtf8(scanner_.next_literal(), TENURED); |
| 3114 Next(); | 3119 Next(); |
| (...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4391 start_position, | 4396 start_position, |
| 4392 is_expression); | 4397 is_expression); |
| 4393 return result; | 4398 return result; |
| 4394 } | 4399 } |
| 4395 | 4400 |
| 4396 | 4401 |
| 4397 #undef NEW | 4402 #undef NEW |
| 4398 | 4403 |
| 4399 | 4404 |
| 4400 } } // namespace v8::internal | 4405 } } // namespace v8::internal |
| OLD | NEW |