LGTM too modulo the same issue.

http://codereview.chromium.org/6991007/diff/6001/src/objects-inl.h
File src/objects-inl.h (right):

http://codereview.chromium.org/6991007/diff/6001/src/objects-inl.h#newcode2029
src/objects-inl.h:2029: if (this->IsFlat()) {
I agree that this is confusing. IsFlat is usually called to avoid
flattening or before getting a vector of chars. I think ConsString
should have a new IsFlattenedCons predicate and other usages of IsFlat
should be replaced with more specific predicates.

http://codereview.chromium.org/6991007/diff/6001/src/objects.cc
File src/objects.cc (right):

http://codereview.chromium.org/6991007/diff/6001/src/objects.cc#newcode5220
src/objects.cc:5220: int recurse_limit = 7;
Make this a (documented) constant in ConsString.

http://codereview.chromium.org/6991007/diff/6001/src/objects.cc#newcode5236
src/objects.cc:5236: cursor =
String::cast(flatten_result->ToObjectUnchecked());
It's more straightforward to simply return
Smi::FromInt(String::cast(flatten_result->ToObjectUnchecked())->Get(index))
here.

http://codereview.chromium.org/6991007/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to