Commit Graph

55 Commits

Author SHA1 Message Date
Ryszard Rozak
a764c70b4a
Fix handling of static keyword in methods (#4649) 2023-10-31 08:15:54 -04:00
Geza Lore
30318a6654 C++11 cleanup 2023-10-28 11:26:48 +01:00
Wilson Snyder
b5828a7ce9 Fix header order botched by clang-format in recent commit. 2023-10-18 06:37:46 -04:00
github action
770cd24f27 Apply 'make format' 2023-10-18 02:50:27 +00:00
Wilson Snyder
431bb1ed16
Support compiling Verilator with gcc/clang precompiled headers (#4579) 2023-10-17 22:49:28 -04:00
Mariusz Glebocki
28bd7e5b19
Rework multithreading handling to separate by code units that use/never use it. (#4228) 2023-09-24 22:12:23 -04:00
Wilson Snyder
f94c1b32e5 Internals: Make V3MemberMap to remove member cache (#4350) 2023-07-08 12:40:27 -04:00
Krzysztof Bieganski
5788bc8048
Propagate class timescale to class package (#4348)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2023-07-07 17:27:33 +02:00
Aleksander Kiryk
c248318958
Fix struct redefinition (#4276) 2023-06-06 18:28:35 -04:00
Wilson Snyder
0606a29f13 Fix arrays of unpacked structs (#4173). 2023-05-06 21:41:17 -04:00
Wilson Snyder
add68130b8 Internals: Rename to dumpLevel(), to avoid confusion with make-a-dump() 2023-05-03 18:04:10 -04:00
Wilson Snyder
0307d59c1f Fix unpacked structs under classes (#4102). 2023-04-10 19:40:34 -04:00
Wilson Snyder
ab502c5196 Fix coverage of class methods (#3998). 2023-03-03 19:26:15 -05:00
Wilson Snyder
93517b8378 Support unpacked unions. 2023-01-27 22:41:12 -05:00
Wilson Snyder
b24d7c83d3 Copyright year update 2023-01-01 10:18:39 -05:00
Aleksander Kiryk
c2b09e35f8
Support unpacked structs (#3802) 2022-12-20 19:22:42 -05:00
Larry Doolittle
f27cf4c804
Commentary: Fix spelling in C++ comments (#3797) (#3798) 2022-12-02 18:46:38 -05:00
Geza Lore
65e08f4dbf Make all expressions derive from AstNodeExpr (#3721).
Apart from the representational changes below, this patch renames
AstNodeMath to AstNodeExpr, and AstCMath to AstCExpr.

Now every expression (i.e.: those AstNodes that represent a [possibly
void] value, with value being interpreted in a very general sense) has
AstNodeExpr as a super class. This necessitates the introduction of an
AstStmtExpr, which represents an expression in statement position, e.g :
'foo();' would be represented as AstStmtExpr(AstCCall(foo)). In exchange
we can get rid of isStatement() in AstNodeStmt, which now really always
represent a statement

Peak memory consumption and verilation speed are not measurably changed.

Partial step towards #3420
2022-11-03 16:02:16 +00:00
Geza Lore
63c694f65f Streamline dump control options
- Rename `--dump-treei` option to `--dumpi-tree`, which itself is now a
  special case of `--dumpi-<tag>` where tag can be a magic word, or a
  filename
- Control dumping via static `dump*()` functions, analogous to `debug()`
- Make dumping independent of the value of `debug()` (so dumping always
  works even without the debug flag)
- Add separate `--dumpi-graph` for dumping V3Graphs, which is again a
  special case of `--dumpi-<tag>`
- Alias `--dump-<tag>` to `--dumpi-<tag> 3` as before
2022-09-22 17:24:41 +01:00
Geza Lore
ce03293128 Generate AstNode accessors via astgen
Introduce the @astgen directives parsed by astgen, currently used for
the generation child node (operand) accessors. Please see the updated
internal documentation for details.
2022-09-21 13:56:03 +01:00
Geza Lore
0c70a0dcbf Remove redundant 'virtual' keywords from overridden methods
'virtual' is redundant when 'override' is present, so keep only
'override'.

Add t/t_dist_cppstyle.pl to check for this.
2022-09-16 15:19:38 +01:00
Geza Lore
96a4b3e5a5 Update clang-format config and apply
- Regroup and sort #include directives (like we used to, but automatic)
- Set AlwaysBreakTemplateDeclarations to true
2022-08-05 12:00:24 +01:00
Wilson Snyder
b9d7819faa Internals: Fix some cppcheck issues. Some dump functions fixed. 2022-07-30 10:01:39 -04:00
Krzysztof Bieganski
e018eb7bac
Support AstClass::repairCache() after V3Class (#3431)
This is a pre-PR to #3363.

Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-05-17 09:22:43 -04:00
Geza Lore
9abab2c366 Add separate AstInitialStatic node for static initializers
Static variable initializers run before initial blocks, so use an
explicitly different procedure type for them. This also enables us to
now raise errors for assignments to const variables in initial blocks.
2022-04-23 15:12:49 +01:00
github action
88d7ca01b0 Apply 'make format' 2022-01-02 20:13:16 +00:00
Wilson Snyder
2e2b82c052 Support class static members (#2233). 2022-01-02 15:09:07 -05:00
Wilson Snyder
f1bb0544be Internals: Cleanups towards static class members. No functional change intended. 2022-01-02 15:03:57 -05:00
Wilson Snyder
e6857df5c6 Internals: Rename Ast on non-node classes (#3262). No functional change.
This commit has the following replacements applied:

	s/\bAstUserInUseBase\b/VNUserInUseBase/g;
        s/\bAstAttrType\b/VAttrType/g;
        s/\bAstBasicDTypeKwd\b/VBasicDTypeKwd/g;
        s/\bAstDisplayType\b/VDisplayType/g;
        s/\bAstNDeleter\b/VNDeleter/g;
        s/\bAstNRelinker\b/VNRelinker/g;
        s/\bAstNVisitor\b/VNVisitor/g;
        s/\bAstPragmaType\b/VPragmaType/g;
        s/\bAstType\b/VNType/g;
        s/\bAstUser1InUse\b/VNUser1InUse/g;
        s/\bAstUser2InUse\b/VNUser2InUse/g;
        s/\bAstUser3InUse\b/VNUser3InUse/g;
        s/\bAstUser4InUse\b/VNUser4InUse/g;
        s/\bAstUser5InUse\b/VNUser5InUse/g;
        s/\bAstVarType\b/VVarType/g;
2022-01-02 14:03:20 -05:00
github action
340efe3a3a Apply 'make format' 2022-01-02 14:46:15 +00:00
Wilson Snyder
2342549caf Internals: V3Class cleanup. No functional change. 2022-01-02 09:43:37 -05:00
Wilson Snyder
ca42be982c Copyright year update. 2022-01-01 08:26:40 -05:00
Wilson Snyder
cd737065f2 Internals: More const. No functional change intended. 2021-11-26 17:55:36 -05:00
Wilson Snyder
2742a8c813 Internals: No need for variable name on immediate visitors. No functional change intended. 2021-11-26 10:52:45 -05:00
Wilson Snyder
05e12ab60e Internals: More const. No functional change intended. 2021-11-26 10:52:45 -05:00
Wilson Snyder
37e3c6da70 Internals: Add more const. No functional change intended. 2021-11-13 13:50:44 -05:00
Geza Lore
f5a226a183 Partial clean up of V3Order. No functional change intended.
This is a partial cleanup of V3Order with the aim of increasing clarity:
- Split the initial OrderGraph building and the actual ordering process
into separate classes (OrderVisitor -> OrderBuildVisitor + OrderProcess)
- Remove all the historical cruft from the graph building phase (now in
OrderBuildVisitor), and add more assertions for assumptions.
- Change the dot styling of OrderGraph to use shapes and more easily
distinguishable colors.
- Expand vague comments, remove incorrect comments, and add more.
- Replace some old code with cleaner C++11 constructs.
- Move code about a bit so logically connected sections are closer to
each other, scope some definitions where they are used rather than file
scope.
- The actual ordering process (now in OrderProcess) is still largely
unchanged.

The generated code is identical to before (within the limits of the
exiting non-determinism).
2021-10-24 16:49:05 +01:00
Geza Lore
dae9fa5053 Use VN_AS wherever possible and obvious. No functional change. 2021-10-22 14:06:00 +01:00
Wilson Snyder
8ecdc85cf7 Internals: C++11 style cleanups. No functional change. 2021-07-11 18:42:01 -04:00
Wilson Snyder
689d5b5090 Internals: Add std:: to make_pair. No functional change. 2021-03-12 18:17:49 -05:00
Wilson Snyder
404b323f8c Internals: Remove some unnecessary typedefs. No functional change. 2021-03-12 17:26:53 -05:00
Wilson Snyder
bd602d0e2d Copyright year update 2021-01-01 10:29:54 -05:00
Wilson Snyder
123d1af29d Fix crash on non-class static function 2020-11-27 14:58:50 -05:00
Wilson Snyder
963fd0664d Fix class-in-module issues 2020-11-27 09:42:51 -05:00
Wilson Snyder
e1c45440fc Internals: Rename packagep(). No functional change. 2020-11-24 21:56:03 -05:00
Wilson Snyder
b6ded59c2b Internals: Use and enforce class final for ~5% performance boost. 2020-11-18 21:32:16 -05:00
Krzysztof Bieganski
7c4259bc0a
Support static methods and typedefs in classes (#2615) 2020-11-06 19:51:21 -05:00
Wilson Snyder
bed3101dfc Internals: Use VL_RESTORER class to save/restore vars. No functional change intended. 2020-08-24 21:13:28 -04:00
Wilson Snyder
033e7ac020 C++11: Use member declaration initalizations. No functional change intended. 2020-08-16 11:44:06 -04:00
Wilson Snyder
042d3eed23 C++11: Use override where possible. No functional change. 2020-08-16 11:44:05 -04:00