-
Notifications
You must be signed in to change notification settings - Fork 166
Objects: Complete Rewrite #507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Objects: Complete Rewrite #507
Conversation
Refactor dogeiscutObject to better handle plain objects, arrays and builder state. Add a temporary jwArray stub and ObjectType.forObject/toObject improvements (including handling empty/null strings and plain objects). Change constructor to accept plain object maps, fix toJSON/toString behavior, and add a compact toReporterContent DOM view. Implement ObjectType.fromEntries, adjust get/set to wrap/unwrap values via forObject, and update entries to return jwArray-friendly pairs. Introduce a thread._dogeiscutObjectBuilderIndex stack for builder/compile-time operations and update the compiler source generation for object builders. Also tweak the 'is' opcode to validate JSON objects and mark a deprecated block hidden from the palette.
Implement setPath and merge on the object type and improve getPath normalization. Refactor JS-generation for object forEach in the compiler, adjust runtime forEach helpers (default key now empty string), and tidy up formatting/style across static/extensions/DogeisCut/dogeiscutObject.js (consistency fixes, minor string/whitespace adjustments).
Replace conditional prototype assignments with functions that check feature flags internally and add explanatory comments. Previously the code only assigned jwArray.Type.prototype.toMonitorContent/toReporterContent when flags were true; now the methods are defined consistently but return tableDisplay only if the corresponding dogeiscutObject.tableDisplay flags are enabled. Added a note explaining that arrow-function-style class methods become instance properties (preventing prototype patching) and linked the relevant jwArray implementation line.
Prepare for testing.
|
yk draft prs are a thing right |
|
oops |
|
how do i add reviewers |
Add Iterator support to Objects rewrite
would like to add more but the api REALLY doesnt like the array/object inputs
|
Opening the PR from a draft because nobody has found any bugs with it so far and it's fairly ready to be merged. (Would be nice If I could add some more block switches but the block switching API hates object/array inputs and errors out... I cant get a block with an array input to switch to/from another block with no array input) |
|
@jwklong @RedMan13 and @SharkPool-SP if you guys could take a look that'd be awesome |
|
make sure to merge this other pr after merging this rewrite: #508 |
|
it seems like objects set into variables from the old version are broken in the new version project file in discord: https://discord.com/channels/1033551490331197462/1243430348499451976/1471269738607808756 everything else seems fine |
fixed |








Changes
Images