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

Side by Side Diff: src/builtins/builtins-string.cc

Issue 2493553002: Fix -Wsign-compare warnings in parser, scanner, regexp, runtime. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « src/builtins/builtins-regexp.cc ('k') | src/libsampler/sampler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #include "src/builtins/builtins.h" 5 #include "src/builtins/builtins.h"
6 #include "src/builtins/builtins-utils.h" 6 #include "src/builtins/builtins-utils.h"
7 7
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/regexp/regexp-utils.h" 9 #include "src/regexp/regexp-utils.h"
10 10
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 } 594 }
595 595
596 if (index == length) { 596 if (index == length) {
597 RETURN_RESULT_OR_FAILURE(isolate, isolate->factory()->NewStringFromOneByte( 597 RETURN_RESULT_OR_FAILURE(isolate, isolate->factory()->NewStringFromOneByte(
598 one_byte_buffer.ToConstVector())); 598 one_byte_buffer.ToConstVector()));
599 } 599 }
600 600
601 List<uc16> two_byte_buffer(length - index); 601 List<uc16> two_byte_buffer(length - index);
602 602
603 while (true) { 603 while (true) {
604 if (code <= unibrow::Utf16::kMaxNonSurrogateCharCode) { 604 if (code <= static_cast<uc32>(unibrow::Utf16::kMaxNonSurrogateCharCode)) {
605 two_byte_buffer.Add(code); 605 two_byte_buffer.Add(code);
606 } else { 606 } else {
607 two_byte_buffer.Add(unibrow::Utf16::LeadSurrogate(code)); 607 two_byte_buffer.Add(unibrow::Utf16::LeadSurrogate(code));
608 two_byte_buffer.Add(unibrow::Utf16::TrailSurrogate(code)); 608 two_byte_buffer.Add(unibrow::Utf16::TrailSurrogate(code));
609 } 609 }
610 610
611 if (++index == length) { 611 if (++index == length) {
612 break; 612 break;
613 } 613 }
614 code = NextCodePoint(isolate, args, index); 614 code = NextCodePoint(isolate, args, index);
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 Runtime::kThrowIncompatibleMethodReceiver, context, 1427 Runtime::kThrowIncompatibleMethodReceiver, context,
1428 assembler->HeapConstant(assembler->factory()->NewStringFromAsciiChecked( 1428 assembler->HeapConstant(assembler->factory()->NewStringFromAsciiChecked(
1429 "String Iterator.prototype.next", TENURED)), 1429 "String Iterator.prototype.next", TENURED)),
1430 iterator); 1430 iterator);
1431 assembler->Return(result); // Never reached. 1431 assembler->Return(result); // Never reached.
1432 } 1432 }
1433 } 1433 }
1434 1434
1435 } // namespace internal 1435 } // namespace internal
1436 } // namespace v8 1436 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-regexp.cc ('k') | src/libsampler/sampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698