Commit Graph

73 Commits

Author SHA1 Message Date
Ian McInerney 268dec5c19 Cleanup some build and Coverity warnings 2020-07-31 02:46:05 +01:00
Jeff Young 577c1be391 Report all DRC rule errors, not just the first. 2020-07-30 14:27:42 +01:00
Tomasz Wlostowski fe4695719d libeval_compiler: post-rebase fixes 2020-07-29 23:14:34 +02:00
Tomasz Wlostowski 3c80b98d1c libeval_compiler: CONTEXT runs the UCODE now (thread-safe solution), fixed some memory leaks 2020-07-29 23:14:03 +02:00
Jeff Young 2ea5528cd0 Start compiling identifiers.
We'll need this if we support the "L == foobar" syntax, and besides
it should really be up to the parser client whether or not they use
identifiers with no function call or property reference.

It also allows us to generate error messages for unknown identifers.
2020-07-27 19:53:42 +01:00
Jeff Young 8a010bc23e Null safety for expression variables. 2020-07-27 19:53:42 +01:00
Jeff Young 552dde8976 Fix return value going out of scope.
(From Coverity report.)
2020-07-26 13:41:43 +01:00
Jeff Young bf445c1a95 Performance enhancements.
1) cache pad polygon outlines
   huge improvement in connectivity performance and a decent
   improvement in DRC performance
2) don't pre-allocate CONTEXT stack
   significant improvement in DRC rule performance
2) don't keep re-encoding strings
   decent improvement in DRC rule performance
2020-07-25 13:03:33 +01:00
Jeff Young 6529e339a9 Don't store context in the uCode. (It's not thread-safe.)
Although it does give some pretty funny results when filling zones.
2020-07-23 22:21:13 +01:00
Jeff Young f2812773d4 Better handling of undefined values in Rule expressions.
This is particularly important to keep the user from having to
enter overly verbose statements such as:
A.Type == 'via' && A.Via_Type == 'buried'
when:
A.Via_Type == 'buried'
is perfectly clear.
2020-07-23 16:41:58 +01:00
Jeff Young 84085df82a Fix tokenizer to allow '_' in tokens. 2020-07-23 16:41:58 +01:00
Jeff Young 637571e0be Assume mm if units not given in DRC rules.
This keeps us from internalizing them as nm which appear to have
no effect (at least visually).
2020-07-22 15:11:23 +01:00
Jeff Young 150c781f27 Fixup formatting and coding style. 2020-07-22 14:33:32 +01:00
Jeff Young a6b6084a60 Add preflighting for DRC rule function calls. 2020-07-22 14:33:32 +01:00
Jeff Young 095937563b Hook libeval compiler up to rule parser
- convert expression string tokens to single-quote-delimited
- fix bug where netclass assignments weren't getting updated after
  board setup dialog
- move property manager rebuild to lazy evaluation
- improve performance with wider use of const&
- retire DRC_SELECTOR stuff
- use wxString for GUI stuff (particularly translated stuff)
- fix EqualTo() to return false instead of asserting when op types
  don't match
- fix buffer overruns with fixed-size string buffers
- make expression function calls case-insensitive
- integrate expression errors into rule parser
- produce more and better error messages
- keep BOARD_ITEM ptrs const as long as possible
- fix a couple of uninitialized variables
2020-07-20 22:11:53 +01:00
jean-pierre charras 6d8fb94d86 Fix a few Coverity warnings. 2020-07-20 16:19:19 +02:00
Seth Hillbrand a253c53fe7 Fix buffer overflow in dumpNode
The formatted string buffer doesn't need to be used, so we bypass it
with string concat
2020-07-18 13:33:23 -07:00
Jeff Young bcb29b6bf8 Fix security issue (buffer overrun). 2020-07-18 11:44:12 +01:00
Tomasz Wlostowski 49c37014f7 Updated copyright headers in expression evaluator code 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski 65a1ed96e0 libeval_compiler: silence temporary debug stuff 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski 3268f98fd7 libeval_compiler: support for method calls (e.g. item.onlayer('layer') ) 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski 3005aab444 common: libeval_compiler :virtual method support 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski aaa91655aa libeval_compiler: integrated in common/ 2020-07-05 22:44:38 +02:00
Renamed from qa/libeval_compiler/libeval_compiler.cpp (Browse further)