Thanks. Yeah, const is not at all nice.

http://codereview.chromium.org/6519050/diff/1/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/6519050/diff/1/src/runtime.cc#newcode1085
src/runtime.cc:1085: if (lookup.IsProperty()) {
On 2011/02/17 16:01:17, Kevin Millikin wrote:
I think you can now write this as:

if (lookup.IsProperty() &&
     lookup.type() != INTERCEPTOR &&
     (lookup.IsReadOnly() || is_const_property)) {
   const char* type = (lookup.IsReadOnly()) ? "const" : "var";
   return ThrowRedeclarationError(type, name);
}
RETURN_IF_EMPTY_HANDLE(SetProperty(.....));

Done.

http://codereview.chromium.org/6519050/

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

Reply via email to