Section 15.2.4 of ECMA-262
Created attachment 4942 [details] Implement propertyIsEnumerable
Comment on attachment 4942 [details] Implement propertyIsEnumerable isPropertyEnumerable should just call ObjectImp::get instead of doing the lookup manually. The putDirect calls need spaces after the commas, per our style guidelines. r- because of the above. I think it would be clearer if you named the C++ function propertyIsEnumerable instead of isPropertyEnumerable, to match the name of the corresponding (admittedly poorly named) JS function. I'll leave that decision up to you.
(In reply to comment #2) > (From update of attachment 4942 [details] [edit]) > isPropertyEnumerable should just call ObjectImp::get instead of doing the > lookup manually. > The problem is that ObjectImp::get doesn't return the property flags. ObjectImp::canPut does the same thing in order to get the flags. > The putDirect calls need spaces after the commas, per our style guidelines. OK. I was just following the style that was in the file. > > r- because of the above. > > I think it would be clearer if you named the C++ function propertyIsEnumerable > instead of isPropertyEnumerable, to match the name of the corresponding > (admittedly poorly named) JS function. I'll leave that decision up to you. > Sounds like a good idea.
Created attachment 4949 [details] Address comments
Comment on attachment 4949 [details] Address comments ggaren: andersca: [3:10pm] ggaren: + return !(attributes & DontEnum); [3:10pm] ggaren: is backwards, no? [3:12pm] ggaren: + putDirect(valueOfPropertyName, new ObjectProtoFuncImp(exec, funcProto, ObjectProtoFuncImp::ValueOf, 0), DontEnum); [3:12pm] ggaren: has an extra space Otherwise, looks great.
Comment on attachment 4949 [details] Address comments My bad. Not Don't Enum == enumberable. r=me