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 5112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5123 } | 5123 } |
5124 } else { | 5124 } else { |
5125 current_ = kEndMarker; | 5125 current_ = kEndMarker; |
5126 has_more_ = false; | 5126 has_more_ = false; |
5127 } | 5127 } |
5128 } | 5128 } |
5129 | 5129 |
5130 | 5130 |
5131 void RegExpParser::Reset(int pos) { | 5131 void RegExpParser::Reset(int pos) { |
5132 next_pos_ = pos; | 5132 next_pos_ = pos; |
| 5133 has_more_ = (pos < in()->length()); |
5133 Advance(); | 5134 Advance(); |
5134 } | 5135 } |
5135 | 5136 |
5136 | 5137 |
5137 void RegExpParser::Advance(int dist) { | 5138 void RegExpParser::Advance(int dist) { |
5138 next_pos_ += dist - 1; | 5139 next_pos_ += dist - 1; |
5139 Advance(); | 5140 Advance(); |
5140 } | 5141 } |
5141 | 5142 |
5142 | 5143 |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6025 ASSERT(info()->isolate()->has_pending_exception()); | 6026 ASSERT(info()->isolate()->has_pending_exception()); |
6026 } else { | 6027 } else { |
6027 result = ParseProgram(); | 6028 result = ParseProgram(); |
6028 } | 6029 } |
6029 } | 6030 } |
6030 info()->SetFunction(result); | 6031 info()->SetFunction(result); |
6031 return (result != NULL); | 6032 return (result != NULL); |
6032 } | 6033 } |
6033 | 6034 |
6034 } } // namespace v8::internal | 6035 } } // namespace v8::internal |
OLD | NEW |