Summary
spock: implement non-trivial example and test on all platforms
Metadata
- Id: a4b1f6376bec9033e693b01ed37db3880d7bba57
- Trac id: 744
- Type: task
- Reporter: felix
- Owner: felix
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty: medium
- Resolution: worksforme
- Priority: major
- Milestone:
- Version: 4.7.x
- Changetime: 2017-11-22 17:07:21 UTC
- Created: 2011-12-13 13:20:36 UTC
- Keywords: spock
Description
We need a non-trivial program that does something interesting and works on all browsers (in particular IE). The test-suite does not work everywhere but this is in part caused by it's sheer size. A confirmation about the fact that basic programs work everywhere would be helpful in deciding whether to put more work into spock.
Changes and comments
[2012-08-24 22:57:24 UTC] felix changed status from new to assigned
[2012-08-24 22:57:24 UTC] felix set owner to felix
[2012-08-24 22:57:24 UTC] felix wrote:
There is a modified implementation in `branches/nothrow` that doesn't use `throw` for unwinding (this makes debugging much easier and also seems to be necessary for IE). I'm not sure wether it works fully, my last attempts were not successful.
Anyway, needs to be merged.
[2012-09-04 22:18:05 UTC] felix wrote:
Marc Feeley suggests replacing calls to `SPOCK.count` with code that inlines the test:
By the way, I think performance would improve if you changed the calls:
function foo(k,a1,a2,a3)
{
SPOCK.check(arguments);
...
}
to
function foo(k,a1,a2,a3)
{
if (--SPOCK.check_count =3D=3D=3D 0) SPOCK.check(foo,k,a1,a2,a3);
...
}
This will avoid using "arguments", which causes most JavaScript VMs to =
not optimize the code, and it will poll intermittently.
This should be benchmarked. Also, the performance difference between the throw and nothrow variants must be measured.