Commit graph

12 commits

Author SHA1 Message Date
Chris Wilson
4be479cc63 [script] Add simple to integer converter
Simple operator to coerce the type of the object on top of the stack to
integer.
2008-12-12 12:00:43 +00:00
Chris Wilson
177a68ef3e [script] Add a few mathematical constants
Just pi and the sqrt(2) for the moment, more to come on demand.
2008-12-12 12:00:42 +00:00
Chris Wilson
5dfaa22a57 [script] Add repeat operator.
Simple operator to repeat procedure n times.
2008-12-12 12:00:42 +00:00
M Joonas Pihlaja
265ebd372a [script] Flesh out the relational comparison operators to be more PostScript-like.
The relational comparison operators can now compare strings vs names
by content as well as performing automatic type promotions on the
numeric types.  For other types relational comparisons succeeed
only if the values compare equal according to the eq operator, and
put the interpreter into a type-error state otherwise.
2008-12-12 12:00:42 +00:00
M Joonas Pihlaja
05afec7a8a [script] Implement the ne operator. 2008-12-12 12:00:41 +00:00
M Joonas Pihlaja
1aeb96dc28 [script] Implement PostScript-like semantics for the eq operator.
The eq operator would only work for some types and put the
interpreter in an error state if passed objects it didn't
know how to compare.  It would also not compare strings
by value nor allow strings to be compared to names.
This patch makes any two objects comparable.
2008-12-12 12:00:41 +00:00
M Joonas Pihlaja
4ba77f7765 [script] Fix dictionary construction to access the right stack slots.
It bound values to themselves and ignored keys.
2008-12-12 12:00:41 +00:00
Chris Wilson
e184bf0d35 Fix compilation with --enable-png=no
Adrian Johnson spotted that the build was broken if the PNG functions were
disabled. Fix.
2008-12-12 10:20:47 +00:00
Chris Wilson
5591cb58fd [script] Only use zlib if available.
Conditionally link against zlib - replaying a script will fail if the
trace uses a compressed format.
2008-11-26 17:43:22 +00:00
Chris Wilson
1f48b36933 [script] Build fix for ! HAS_FT_FONT
Correct the macro definition used when compiling without FreeType.
2008-11-21 09:35:41 +00:00
Chris Wilson
c41b99268d Conditionally include byteswap.h
Fixup compilation by copying the checks from cairo-wideint-private.h to
conditionally include byteswap.h and provide fallback implementations.
2008-11-19 11:59:21 +00:00
Chris Wilson
cdfffc7420 Add CairoScript interpreter
Add a CairoScript interpreter library and use it to replay the test output
for the CairoScript backend. The library is also used by the currently
standalone Sphinx debugger [git://anongit.freedesktop.org/~ickle/sphinx].
The syntax/operator semantics are not yet finalized, but are expected to
mature before the next stable release.
2008-11-13 11:36:55 +00:00