Comments (6)
That's working as intended, and is hard-coded in the syntax, see the grammar. The only way to access a module externally is by invoking an export, so you shouldn't be able to (or need to) observe anything else in a test.
from spec.
That's working as intended, and is hard-coded in the syntax
| AssertEq of string * Ast.expr list * Ast.expr list
?
from spec.
Right, that's the (script) AST. The parsing rule is:
| LPAR ASSERTEQ LPAR INVOKE TEXT expr_list RPAR expr_list RPAR
{ AssertEq ($5, $6 (c0 ()), $8 (c0 ())) @@ at() }
Those expressions are evaluated in an empty dummy context, so you (intentionally) don't have access to any state. IOW, constant expressions only -- this is intended as a declarative assertion about the behaviour of exported functions.
from spec.
OK, I see. So for the purposes of the ml-proto, we're acting as if each module has its own isolated heap (not the unified heap we will have post-dynamic-linking) and it's not exposed externally (unlike what will happen in embedded environments). And to do heap assertions you shove an assertion routine into the module? Awkward but reasonable, I guess. I don't like having to shove test code inside the module being tested :(
from spec.
Yes. @titzer was particularly adamant about not having a richer assertion
language, see the discussion on PR #14.
On 29 August 2015 at 04:05, Katelyn Gadd [email protected] wrote:
OK, I see. So for the purposes of the ml-proto, we're acting as if each
module has its own isolated heap (not the unified heap we will have
post-dynamic-linking) and it's not exposed externally (unlike what will
happen in embedded environments). And to do heap assertions you shove an
assertion routine into the module? Awkward but reasonable, I guess. I don't
like having to shove test code inside the module being tested :(—
Reply to this email directly or view it on GitHub
#34 (comment).
from spec.
@kg Even with dynamic linking, there will not be a single "unified heap" but, rather, explicit linking of new code into existing module instances. In ml-proto, the static-code/loaded-instance distinction is reflected by the Ast.modul
/ Eval.module_instance
types. When we add dynamic linking, the logical extension would be to change Eval.module_instance
to contain a list of Ast.modul
. (To prepare for dynamic linking and to avoid confusion like in #306, I've been thinking we should rename Eval.module_instance
to something that doesn't imply 1:1. Probably should update design
repo first, though.)
from spec.
Related Issues (20)
- build.py doesn't build tests in subdirectories HOT 5
- [Question] Why we have to push a dummy frame when invoking a function? HOT 5
- Activation frames: where's the return arity? HOT 1
- There is something wrong HOT 3
- [JS Generator] Add scope for each wasm instance HOT 1
- Improve SIMD test diversity HOT 1
- web
- Is it different to compile codes from `neon` or `x86` SIMD? HOT 1
- The definition of validation of br_table is inadequate HOT 3
- Question about validation of {element, data} segments HOT 1
- Wrong test cases in memory_init.wast HOT 3
- test case `as-load-operand` have an error HOT 1
- branching on function name HOT 7
- [interpreter] Source locations are broken since menhir switch HOT 2
- SIMD test optimization? HOT 3
- [core] SIMD Compare instructions link to the wrong "execution"/"validation" sections HOT 1
- Add a note indicating that section ids and section ordering do not correspond HOT 2
- Missing ability to access built older versions of the WebAssembly specification in archivable form HOT 2
- Web HOT 1
- [JS API] 'run a host function' and 'create a host function' don't consistently handle completion records HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spec.