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

Side by Side Diff: src/log.cc

Issue 11818025: Continues Latin-1 support. All tests pass with ENABLE_LATIN_1 flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ARM fix Created 7 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 NameBuffer() { Reset(); } 377 NameBuffer() { Reset(); }
378 378
379 void Reset() { 379 void Reset() {
380 utf8_pos_ = 0; 380 utf8_pos_ = 0;
381 } 381 }
382 382
383 void AppendString(String* str) { 383 void AppendString(String* str) {
384 if (str == NULL) return; 384 if (str == NULL) return;
385 if (str->HasOnlyAsciiChars()) { 385 if (str->HasOnlyAsciiChars()) {
386 int utf8_length = Min(str->length(), kUtf8BufferSize - utf8_pos_); 386 int utf8_length = Min(str->length(), kUtf8BufferSize - utf8_pos_);
387 String::WriteToFlat(str, utf8_buffer_ + utf8_pos_, 0, utf8_length); 387 String::WriteToFlat(str,
388 reinterpret_cast<uint8_t*>(utf8_buffer_ + utf8_pos_),
389 0,
390 utf8_length);
388 utf8_pos_ += utf8_length; 391 utf8_pos_ += utf8_length;
389 return; 392 return;
390 } 393 }
391 int uc16_length = Min(str->length(), kUtf16BufferSize); 394 int uc16_length = Min(str->length(), kUtf16BufferSize);
392 String::WriteToFlat(str, utf16_buffer, 0, uc16_length); 395 String::WriteToFlat(str, utf16_buffer, 0, uc16_length);
393 int previous = unibrow::Utf16::kNoPreviousCharacter; 396 int previous = unibrow::Utf16::kNoPreviousCharacter;
394 for (int i = 0; i < uc16_length && utf8_pos_ < kUtf8BufferSize; ++i) { 397 for (int i = 0; i < uc16_length && utf8_pos_ < kUtf8BufferSize; ++i) {
395 uc16 c = utf16_buffer[i]; 398 uc16 c = utf16_buffer[i];
396 if (c <= unibrow::Utf8::kMaxOneByteChar) { 399 if (c <= unibrow::Utf8::kMaxOneByteChar) {
397 utf8_buffer_[utf8_pos_++] = static_cast<char>(c); 400 utf8_buffer_[utf8_pos_++] = static_cast<char>(c);
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1829 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) { 1832 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) {
1830 ASSERT(sampler->IsActive()); 1833 ASSERT(sampler->IsActive());
1831 ScopedLock lock(active_samplers_mutex); 1834 ScopedLock lock(active_samplers_mutex);
1832 ASSERT(active_samplers_ != NULL); 1835 ASSERT(active_samplers_ != NULL);
1833 bool removed = active_samplers_->RemoveElement(sampler); 1836 bool removed = active_samplers_->RemoveElement(sampler);
1834 ASSERT(removed); 1837 ASSERT(removed);
1835 USE(removed); 1838 USE(removed);
1836 } 1839 }
1837 1840
1838 } } // namespace v8::internal 1841 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698