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

Unified Diff: src/scanner.cc

Issue 559913002: Rename ascii to one-byte where applicable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« src/jsregexp.cc ('K') | « src/scanner.h ('k') | src/serialize.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner.cc
diff --git a/src/scanner.cc b/src/scanner.cc
index 195287f1bb8ec76c70a082050cc9724448dc4da6..0e9de14ca9928659bdffb49a5e44a7cfaa11f0a2 100644
--- a/src/scanner.cc
+++ b/src/scanner.cc
@@ -330,9 +330,9 @@ void Scanner::TryToParseSourceURLComment() {
if (!name.is_one_byte()) return;
Vector<const uint8_t> name_literal = name.one_byte_literal();
LiteralBuffer* value;
- if (name_literal == STATIC_ASCII_VECTOR("sourceURL")) {
+ if (name_literal == STATIC_CHAR_VECTOR("sourceURL")) {
value = &source_url_;
- } else if (name_literal == STATIC_ASCII_VECTOR("sourceMappingURL")) {
+ } else if (name_literal == STATIC_CHAR_VECTOR("sourceMappingURL")) {
value = &source_mapping_url_;
} else {
return;
@@ -1305,7 +1305,7 @@ bool DuplicateFinder::IsNumberCanonical(Vector<const uint8_t> number) {
uint32_t DuplicateFinder::Hash(Vector<const uint8_t> key, bool is_one_byte) {
// Primitive hash function, almost identical to the one used
- // for strings (except that it's seeded by the length and ASCII-ness).
+ // for strings (except that it's seeded by the length and representation).
int length = key.length();
uint32_t hash = (length << 1) | (is_one_byte ? 1 : 0) ;
for (int i = 0; i < length; i++) {
@@ -1319,10 +1319,10 @@ uint32_t DuplicateFinder::Hash(Vector<const uint8_t> key, bool is_one_byte) {
bool DuplicateFinder::Match(void* first, void* second) {
// Decode lengths.
- // Length + ASCII-bit is encoded as base 128, most significant heptet first,
- // with a 8th bit being non-zero while there are more heptets.
+ // Length + representation is encoded as base 128, most significant heptet
+ // first, with a 8th bit being non-zero while there are more heptets.
// The value encodes the number of bytes following, and whether the original
- // was ASCII.
+ // was Latin1.
byte* s1 = reinterpret_cast<byte*>(first);
byte* s2 = reinterpret_cast<byte*>(second);
uint32_t length_one_byte_field = 0;
« src/jsregexp.cc ('K') | « src/scanner.h ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698