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

Unified Diff: src/scanner.h

Issue 430503007: Rename ASSERT* to DCHECK*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and fixes Created 6 years, 4 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
« no previous file with comments | « src/sampler.cc ('k') | src/scanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner.h
diff --git a/src/scanner.h b/src/scanner.h
index 3f57a192701a0ffc84874b9f65ba706ab1edd149..d3a6c6b22eebf1327993388bcb0279acf7eab72d 100644
--- a/src/scanner.h
+++ b/src/scanner.h
@@ -211,7 +211,7 @@ class LiteralBuffer {
}
ConvertToTwoByte();
}
- ASSERT(code_unit < 0x10000u);
+ DCHECK(code_unit < 0x10000u);
*reinterpret_cast<uint16_t*>(&backing_store_[position_]) = code_unit;
position_ += kUC16Size;
}
@@ -224,15 +224,15 @@ class LiteralBuffer {
}
Vector<const uint16_t> two_byte_literal() const {
- ASSERT(!is_one_byte_);
- ASSERT((position_ & 0x1) == 0);
+ DCHECK(!is_one_byte_);
+ DCHECK((position_ & 0x1) == 0);
return Vector<const uint16_t>(
reinterpret_cast<const uint16_t*>(backing_store_.start()),
position_ >> 1);
}
Vector<const uint8_t> one_byte_literal() const {
- ASSERT(is_one_byte_);
+ DCHECK(is_one_byte_);
return Vector<const uint8_t>(
reinterpret_cast<const uint8_t*>(backing_store_.start()),
position_);
@@ -268,7 +268,7 @@ class LiteralBuffer {
}
void ConvertToTwoByte() {
- ASSERT(is_one_byte_);
+ DCHECK(is_one_byte_);
Vector<byte> new_store;
int new_content_size = position_ * kUC16Size;
if (new_content_size >= backing_store_.length()) {
@@ -372,11 +372,11 @@ class Scanner {
return current_.literal_chars->length() != source_length;
}
bool is_literal_contextual_keyword(Vector<const char> keyword) {
- ASSERT_NOT_NULL(current_.literal_chars);
+ DCHECK_NOT_NULL(current_.literal_chars);
return current_.literal_chars->is_contextual_keyword(keyword);
}
bool is_next_contextual_keyword(Vector<const char> keyword) {
- ASSERT_NOT_NULL(next_.literal_chars);
+ DCHECK_NOT_NULL(next_.literal_chars);
return next_.literal_chars->is_contextual_keyword(keyword);
}
@@ -491,7 +491,7 @@ class Scanner {
}
INLINE(void AddLiteralChar(uc32 c)) {
- ASSERT_NOT_NULL(next_.literal_chars);
+ DCHECK_NOT_NULL(next_.literal_chars);
next_.literal_chars->AddChar(c);
}
@@ -540,37 +540,37 @@ class Scanner {
// These functions only give the correct result if the literal
// was scanned between calls to StartLiteral() and TerminateLiteral().
Vector<const uint8_t> literal_one_byte_string() {
- ASSERT_NOT_NULL(current_.literal_chars);
+ DCHECK_NOT_NULL(current_.literal_chars);
return current_.literal_chars->one_byte_literal();
}
Vector<const uint16_t> literal_two_byte_string() {
- ASSERT_NOT_NULL(current_.literal_chars);
+ DCHECK_NOT_NULL(current_.literal_chars);
return current_.literal_chars->two_byte_literal();
}
bool is_literal_one_byte() {
- ASSERT_NOT_NULL(current_.literal_chars);
+ DCHECK_NOT_NULL(current_.literal_chars);
return current_.literal_chars->is_one_byte();
}
int literal_length() const {
- ASSERT_NOT_NULL(current_.literal_chars);
+ DCHECK_NOT_NULL(current_.literal_chars);
return current_.literal_chars->length();
}
// Returns the literal string for the next token (the token that
// would be returned if Next() were called).
Vector<const uint8_t> next_literal_one_byte_string() {
- ASSERT_NOT_NULL(next_.literal_chars);
+ DCHECK_NOT_NULL(next_.literal_chars);
return next_.literal_chars->one_byte_literal();
}
Vector<const uint16_t> next_literal_two_byte_string() {
- ASSERT_NOT_NULL(next_.literal_chars);
+ DCHECK_NOT_NULL(next_.literal_chars);
return next_.literal_chars->two_byte_literal();
}
bool is_next_literal_one_byte() {
- ASSERT_NOT_NULL(next_.literal_chars);
+ DCHECK_NOT_NULL(next_.literal_chars);
return next_.literal_chars->is_one_byte();
}
int next_literal_length() const {
- ASSERT_NOT_NULL(next_.literal_chars);
+ DCHECK_NOT_NULL(next_.literal_chars);
return next_.literal_chars->length();
}
« no previous file with comments | « src/sampler.cc ('k') | src/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698