Use Compartment.p.evaluate instead of eight magic lines
See original GitHub issueCurrently, even on xsnap, we’re building SES essentially the same way we do on normal JS, by running the full SES shim including the eight magic lines built on direct eval
. Currently, XS eval
does not understand the sourceURL directive, so all SES code runs in XS without any tie to a filename. Also, using the eight magic lines, we cannot fix #31
Instead, we could switch to using the XS builtin Compartment.prototype.evaluate
as our safe evaluator, replacing the eight magic lines, while still building the rest of SES using code from the SES shim. This should immediately fix #31 .
In addition, perhaps it is easier to get XS to accept a filename via Compartment.prototype.evaluate
rather than the sourceURL directive in an eval
? Attn @phoddie
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (10 by maintainers)
Top Results From Across the Web
Annotated List of Command-line Options - ImageMagick
Below is list of command-line options recognized by the ImageMagick ... To instead print to your device, use -define auto-threshold:verbose=true .
Read more >Evaluation Matters: Getting the Information You Need from ...
you do and the strategies you use but rather a way to weave evaluation into the design, development, and implementation of your programs...
Read more >TikZ and pgf
The pgf package, where “pgf” is supposed to mean “portable graphics format” (or “pretty, good, functional” if you prefer...), is a package for...
Read more >Math208 Discrete Mathematics - College of Arts & Sciences
table for (p ∧ q) → r, first notice that eight rows will be needed in the table ... Instead of using a...
Read more >The Book Thief - SharpSchool
I am in all truthfulness attempting to be cheerful about this whole topic, though most people find themselves hindered in believing me, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’ll need a follow-up change in SES to feature-detect the suitable XS Compartment and switch the behavior of
performEval
to use that instead of the “three wrongs of with + sloppy + eval that make a right”.For the “sloppy globals” issue, we could painlessly add a dirt simple translator to our repl, replacing a first line matching
with