All checks were successful
ci / fast (linux) (push) Successful in 6m43s
Implement user-facing Object enumeration and prototype methods that were missing from the JS engine: for...in inherited property enumeration, Object.keys/values/entries/create/getPrototypeOf/assign static methods, hasOwnProperty/propertyIsEnumerable instance methods, and non-enumerable property support to prevent builtin methods from leaking into enumeration. Key changes: - Add non_enumerable_keys HashSet to JsObjectData with mark/query methods - Fix for...in to walk prototype chain (all_enumerable_keys) - Mark all builtin prototype methods non-enumerable (Object, Number, String, Boolean, Error, class prototypes) - Add Object.prototype fallback for Function dispatch - 26 new unit tests, 8 new JS262 conformance tests - Test262 pass rate: 385/550 (70%, up from 47.8%) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6 lines
147 B
JavaScript
6 lines
147 B
JavaScript
var obj = { x: 1 };
|
|
console.log(Object.values(obj)[0]);
|
|
var entries = Object.entries(obj);
|
|
console.log(entries[0][0]);
|
|
console.log(entries[0][1]);
|