Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Side by Side Diff: src/objects-inl.h

Issue 1968953002: [runtime] Implement encodeURI as single runtime function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix isalnum() bug Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 3633 matching lines...) Expand 10 before | Expand all | Expand 10 after
3644 } 3644 }
3645 3645
3646 3646
3647 uint16_t SeqOneByteString::SeqOneByteStringGet(int index) { 3647 uint16_t SeqOneByteString::SeqOneByteStringGet(int index) {
3648 DCHECK(index >= 0 && index < length()); 3648 DCHECK(index >= 0 && index < length());
3649 return READ_BYTE_FIELD(this, kHeaderSize + index * kCharSize); 3649 return READ_BYTE_FIELD(this, kHeaderSize + index * kCharSize);
3650 } 3650 }
3651 3651
3652 3652
3653 void SeqOneByteString::SeqOneByteStringSet(int index, uint16_t value) { 3653 void SeqOneByteString::SeqOneByteStringSet(int index, uint16_t value) {
3654 DCHECK(index >= 0 && index < length() && value <= kMaxOneByteCharCode); 3654 DCHECK(index >= 0 && index < length());
3655 DCHECK(value <= kMaxOneByteCharCode);
3655 WRITE_BYTE_FIELD(this, kHeaderSize + index * kCharSize, 3656 WRITE_BYTE_FIELD(this, kHeaderSize + index * kCharSize,
3656 static_cast<byte>(value)); 3657 static_cast<byte>(value));
3657 } 3658 }
3658 3659
3659 3660
3660 Address SeqOneByteString::GetCharsAddress() { 3661 Address SeqOneByteString::GetCharsAddress() {
3661 return FIELD_ADDR(this, kHeaderSize); 3662 return FIELD_ADDR(this, kHeaderSize);
3662 } 3663 }
3663 3664
3664 3665
(...skipping 4186 matching lines...) Expand 10 before | Expand all | Expand 10 after
7851 #undef WRITE_INT64_FIELD 7852 #undef WRITE_INT64_FIELD
7852 #undef READ_BYTE_FIELD 7853 #undef READ_BYTE_FIELD
7853 #undef WRITE_BYTE_FIELD 7854 #undef WRITE_BYTE_FIELD
7854 #undef NOBARRIER_READ_BYTE_FIELD 7855 #undef NOBARRIER_READ_BYTE_FIELD
7855 #undef NOBARRIER_WRITE_BYTE_FIELD 7856 #undef NOBARRIER_WRITE_BYTE_FIELD
7856 7857
7857 } // namespace internal 7858 } // namespace internal
7858 } // namespace v8 7859 } // namespace v8
7859 7860
7860 #endif // V8_OBJECTS_INL_H_ 7861 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698