Commit ca7668ee authored by lrn@chromium.org's avatar lrn@chromium.org

Fixed typo


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5c80e6a8
......@@ -1321,17 +1321,17 @@ StringRepresentationTag String::map_representation_tag(Map* map) {
bool String::IsFlat() {
String* current = this;
while (true) {
switch (current->representation_tag()) {
case kConsStringTag:
return String::cast(ConsString::cast(current)->second())->length() == 0;
case kSlicedStringTag:
current = String::cast(SlicedString::cast(this)->buffer());
break;
default:
return true;
switch (this->representation_tag()) {
case kConsStringTag:
// Only flattened strings have second part empty.
return String::cast(ConsString::cast(this)->second())->length() == 0;
case kSlicedStringTag: {
String* slice = String::cast(SlicedString::cast(this)->buffer());
StringRepresentationTag tag = slice->representation_tag();
return tag == kSeqStringTag || tag == kExternalStringTag;
}
default:
return true;
}
}
......
......@@ -27,7 +27,7 @@
function f0() {
switch (0) {
// switch deliberatly left empty
// switch deliberately left empty
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment