Skip to content

Commit 488b6fd

Browse files
committed
Revert removal of codeString from HostEnsureCanCompileStrings
1 parent efac280 commit 488b6fd

File tree

3 files changed

+41
-16
lines changed

3 files changed

+41
-16
lines changed

Diff for: README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- [Motivation](#motivation)
88
- [Problem 1: %eval% does not accept objects in lieu of strings for code](#problem-1-eval-does-not-accept-objects-in-lieu-of-strings-for-code)
99
- [Problem 2: Host callout does not receive type information](#problem-2-host-callout-does-not-receive-type-information)
10+
- [Problem 3: Host callout does not receive the full code to check](#problem-3-host-callout-does-not-receive-the-full-code-to-check)
1011
- [Tests](#tests)
1112

1213
## Status
@@ -18,7 +19,7 @@ Spec: [ecmarkup output][draft spec], [source][]
1819

1920
## TL;DR
2021

21-
Allow hosts to create _code-like_ objects and change _HostEnsureCanCompileStrings( calleeRealm, parameterStrings, bodyString, direct )_ to _HostEnsureCanCompileStrings( calleeRealm, parameterStrings, bodyString, compilationType, parameterArgs, bodyArg )_.
22+
Allow hosts to create _code-like_ objects and change _HostEnsureCanCompileStrings( calleeRealm, parameterStrings, bodyString, direct )_ to _HostEnsureCanCompileStrings( calleeRealm, parameterStrings, bodyString, codeString, compilationType, parameterArgs, bodyArg )_.
2223

2324
## Motivation
2425

@@ -168,6 +169,16 @@ the Function constructor arguments.
168169
- Requires changes to the host callout (see also below):
169170
- Complex host interface; Requires passing objects to the host.
170171

172+
## Problem 3: Host callout does not receive the full code to check
173+
174+
`HostEnsureCanCompileStrings` is called with parameters for the source code, but they're not in a unified string.
175+
176+
### Solution
177+
178+
This proposal updates the host callout to contain the full code string to be executed,
179+
and moves the callout in `CreateDynamicFunction` after the function body is
180+
assembled.
181+
171182
## Tests
172183

173184
Related tests at

0 commit comments

Comments
 (0)