| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
| 6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
| (...skipping 3707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3718 | 3718 |
| 3719 CodePointIterator(const String& str, intptr_t start, intptr_t length) | 3719 CodePointIterator(const String& str, intptr_t start, intptr_t length) |
| 3720 : str_(str), | 3720 : str_(str), |
| 3721 ch_(0), | 3721 ch_(0), |
| 3722 index_(start - 1), | 3722 index_(start - 1), |
| 3723 end_(start + length) { | 3723 end_(start + length) { |
| 3724 ASSERT(start >= 0); | 3724 ASSERT(start >= 0); |
| 3725 ASSERT(end_ <= str.Length()); | 3725 ASSERT(end_ <= str.Length()); |
| 3726 } | 3726 } |
| 3727 | 3727 |
| 3728 int32_t Current() { | 3728 int32_t Current() const { |
| 3729 ASSERT(index_ >= 0); | 3729 ASSERT(index_ >= 0); |
| 3730 ASSERT(index_ < end_); | 3730 ASSERT(index_ < end_); |
| 3731 return ch_; | 3731 return ch_; |
| 3732 } | 3732 } |
| 3733 | 3733 |
| 3734 bool Next(); | 3734 bool Next(); |
| 3735 | 3735 |
| 3736 private: | 3736 private: |
| 3737 const String& str_; | 3737 const String& str_; |
| 3738 int32_t ch_; | 3738 int32_t ch_; |
| (...skipping 2234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5973 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5973 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
| 5974 return false; | 5974 return false; |
| 5975 } | 5975 } |
| 5976 } | 5976 } |
| 5977 return true; | 5977 return true; |
| 5978 } | 5978 } |
| 5979 | 5979 |
| 5980 } // namespace dart | 5980 } // namespace dart |
| 5981 | 5981 |
| 5982 #endif // VM_OBJECT_H_ | 5982 #endif // VM_OBJECT_H_ |
| OLD | NEW |