| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // note: currently the following increment is necessary to avoid a | 176 // note: currently the following increment is necessary to avoid a |
| 177 // test-parser problem! | 177 // test-parser problem! |
| 178 pos_++; | 178 pos_++; |
| 179 return static_cast<uc32>(-1); | 179 return static_cast<uc32>(-1); |
| 180 } | 180 } |
| 181 } | 181 } |
| 182 | 182 |
| 183 | 183 |
| 184 void TwoByteStringUTF16Buffer::PushBack(uc32 ch) { | 184 void TwoByteStringUTF16Buffer::PushBack(uc32 ch) { |
| 185 pos_--; | 185 pos_--; |
| 186 ASSERT(pos_ >= 0 && raw_data_[pos_] == ch); | 186 ASSERT(pos_ >= Scanner::kCharacterLookaheadBufferSize); |
| 187 ASSERT(raw_data_[pos_ - Scanner::kCharacterLookaheadBufferSize] == ch); |
| 187 } | 188 } |
| 188 | 189 |
| 189 | 190 |
| 190 void TwoByteStringUTF16Buffer::SeekForward(int pos) { | 191 void TwoByteStringUTF16Buffer::SeekForward(int pos) { |
| 191 pos_ = pos; | 192 pos_ = pos; |
| 192 } | 193 } |
| 193 | 194 |
| 194 | 195 |
| 195 // ---------------------------------------------------------------------------- | 196 // ---------------------------------------------------------------------------- |
| 196 // Scanner | 197 // Scanner |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 } | 966 } |
| 966 AddCharAdvance(); | 967 AddCharAdvance(); |
| 967 } | 968 } |
| 968 TerminateLiteral(); | 969 TerminateLiteral(); |
| 969 | 970 |
| 970 next_.location.end_pos = source_pos() - 1; | 971 next_.location.end_pos = source_pos() - 1; |
| 971 return true; | 972 return true; |
| 972 } | 973 } |
| 973 | 974 |
| 974 } } // namespace v8::internal | 975 } } // namespace v8::internal |
| OLD | NEW |