Hi,
Trying to implement Template Strings in Rhino, getting pretty close passing all tests of test262.
Rhino supports Object.seal/freeze, but the implementation of that is located within NativeObject.execIdCall
So, I can either:
- duplicate the logic
- try to call the NativeObject.execIdCall somehow
- extract the logic in NativeObject.execIdCall to some setIntegrityLevel method somewhere and refactor the .seal/freeze impl. to use that new setIntegrityLevel method as well
I think the later option is preferred, but what would be a good place to put it? While working on some other new EcmaScript feature impl. I also ran into similar issues, where the spec defines some abstract Object operations, that within Rhino are scattered throughout different classes and/or not 100% spec-compliant.
So I wonder about creating a org.mozilla.javascript.ecma.operations.Objects class in which to place these abstract operations.
Thoughts? Also wondering what the accessibility of these methods ought to be: public of package scoped?
Paul