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

Side by Side Diff: src/scanner-character-streams.cc

Issue 769263002: Add support for enabling DCHECKs in release mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/scanner-character-streams.h" 7 #include "src/scanner-character-streams.h"
8 8
9 #include "include/v8.h" 9 #include "include/v8.h"
10 #include "src/handles.h" 10 #include "src/handles.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 raw_data_length_); 227 raw_data_length_);
228 raw_character_position_ = char_position + i; 228 raw_character_position_ = char_position + i;
229 return i; 229 return i;
230 } 230 }
231 231
232 232
233 static const byte kUtf8MultiByteMask = 0xC0; 233 static const byte kUtf8MultiByteMask = 0xC0;
234 static const byte kUtf8MultiByteCharFollower = 0x80; 234 static const byte kUtf8MultiByteCharFollower = 0x80;
235 235
236 236
237 #ifdef DEBUG 237 #if DCHECK_IS_ON
238 static const byte kUtf8MultiByteCharStart = 0xC0; 238 static const byte kUtf8MultiByteCharStart = 0xC0;
239 static bool IsUtf8MultiCharacterStart(byte first_byte) { 239 static bool IsUtf8MultiCharacterStart(byte first_byte) {
240 return (first_byte & kUtf8MultiByteMask) == kUtf8MultiByteCharStart; 240 return (first_byte & kUtf8MultiByteMask) == kUtf8MultiByteCharStart;
241 } 241 }
242 #endif 242 #endif
243 243
244 244
245 static bool IsUtf8MultiCharacterFollower(byte later_byte) { 245 static bool IsUtf8MultiCharacterFollower(byte later_byte) {
246 return (later_byte & kUtf8MultiByteMask) == kUtf8MultiByteCharFollower; 246 return (later_byte & kUtf8MultiByteMask) == kUtf8MultiByteCharFollower;
247 } 247 }
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 int end_position) 459 int end_position)
460 : Utf16CharacterStream(), 460 : Utf16CharacterStream(),
461 source_(data), 461 source_(data),
462 raw_data_(data->GetTwoByteData(start_position)) { 462 raw_data_(data->GetTwoByteData(start_position)) {
463 buffer_cursor_ = raw_data_, 463 buffer_cursor_ = raw_data_,
464 buffer_end_ = raw_data_ + (end_position - start_position); 464 buffer_end_ = raw_data_ + (end_position - start_position);
465 pos_ = start_position; 465 pos_ = start_position;
466 } 466 }
467 467
468 } } // namespace v8::internal 468 } } // namespace v8::internal
OLDNEW
« src/objects.cc ('K') | « src/runtime/runtime-strings.cc ('k') | src/string-stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698