Commit Graph

633 Commits

Author SHA1 Message Date
Stephen Williams 156644d91e Detect and complain about some constructor chain errors
This.new is not allowed.

super.new beyond the first statement is not allowed.

And while I'm at it, clean up the use of "@" and "#" in
the code as tokens for this and super.
2020-11-22 15:31:40 -08:00
Martin Whitaker 0fada92389 Fix expression type for packed struct member access (GitHub issue #386)
A NetESelect is used for accessing packed struct members and also for
accessing dynamic array elements. In these cases the expr_type() and
enumeration() methods should reflect the member/element type.
2020-11-20 16:50:11 +00:00
Cary R 112ebb48d8 Add file/line information to procedural warnings and darray fixes
When -pfileline=1 is used the queue procedural warnings have file
and line information added to the messages. Also switch the trace
debugging to be off by default.

Also, Add some preliminary missing darray functionality.
2020-08-10 22:01:55 -07:00
Cary R 61884e559c Add support for assigning a queue using a normal concatenation 2020-08-09 21:10:30 -07:00
Cary R 2530041a38 Add support for assign array patterns to a queue 2020-07-30 19:52:38 -07:00
Cary R 520d5b392a Add support for pop_back/front without () 2020-07-25 22:16:54 -07:00
Cary R 6ecd43d947 Add/update queue compile time error messages 2020-07-25 16:33:30 -07:00
Cary R c003bcc59a Add support for <-> in constant and procedural contexts 2020-07-07 23:29:19 -07:00
Stephen Williams d718e7b468 Handle case that strings are arguments of functions/tasks.
When strings are arguments to functions/tasks, that doesn't suddenly
make them implicitly scalar. Strings are vectors and should be treated
that was, even if they are IMPLICIT_REG.
2019-10-29 22:58:48 -07:00
Martin Whitaker 1069a0ef02 Don't evaluate built-in system functions if they are overridden.
We don't support evaluating user-defined system functions at compile
time. If possible, defer evaluation until run time. If used in a
constant expression, output a "sorry" message.
2019-10-19 16:12:17 +01:00
Martin Whitaker 9f7dc732ab Add error recovery for invalid cast expressions. 2019-10-11 19:04:23 +01:00
Martin Whitaker d56e90c3f4 Fix casts to integer types.
Casting from signed to unsigned types and vice versa is legal in SV,
as is casting from a larger to a smaller size. Obey Verilog rules
for expression bit width and signedness.
2019-10-10 23:48:11 +01:00
Martin Whitaker f2ca63a5a1 Disable debug output when debug_elaborate is not set. 2019-10-06 18:10:58 +01:00
Martin Whitaker de54a58991 Fix issue #265 - emit a sensible error message when an explicit cast is needed. 2019-10-06 17:54:44 +01:00
Cary R e4ef928751 Fix some space issues 2019-09-29 17:11:19 -07:00
Stephen Williams 7b66de0711 Handle nested packed strucdts in r-values. 2019-09-24 15:05:39 -07:00
Martin Whitaker 02ee1c65d0 Support dynamic array initialisation in variable declarations. 2019-09-16 20:35:27 +01:00
Martin Whitaker 34bb98676a Fix assertion failure on illegal SV cast.
Bug reported on iverilog-devel on 2018-02027.
2019-09-07 14:35:19 +01:00
Martin Whitaker c4f71db00a Update some comments. 2019-05-10 20:00:04 +01:00
Martin Whitaker 230f0bc13c Fix GitHub issue #219 and #220 - incorrect results from SV size cast. 2018-12-15 11:11:35 +00:00
Martin Whitaker e71a76a1e2 Fix signed/unsigned comparison warning. 2018-10-06 20:40:54 +01:00
Martin Whitaker f1608e163f Fix implicit fallthrough warnings when building with recent GCC. 2018-10-06 20:15:42 +01:00
Martin Whitaker 87c01c55c0 Don't allow non-vectorable arguments to $signed/$unsigned.
This led to an assertion failure in many cases (see br1029).
1364-2012 indicates it is illegal.
2018-05-14 22:13:56 +01:00
Cary R c68a7fede3 Fix spacing 2017-11-20 07:30:52 -08:00
Cary R 3fc9ad2db0 Add support for the wild compare operators ==? and !=? 2017-11-17 19:32:50 -08:00
Cary R d23b046203 Update the enumeration methods to set their width test attributes correctly 2017-11-17 13:09:14 -08:00
Martin Whitaker 5ca058bfb5 Add support for darray initialisation from another darray.
Fixes GitHub issue #164.
2017-10-08 17:51:33 +01:00
Martin Whitaker 8a36849fda Generate proper error messages for invalid dynamic array initialisers.
Invalid user code should not result in an "internal_error".
2017-10-08 12:59:30 +01:00
Martin Whitaker 8f6f999ea7 Fix for GitHub issue #142 - assertion failure when parameter expression
contains undefined variable.
2017-01-29 10:47:54 +00:00
Martin Whitaker 7cac4677bf Fix for GitHub issue #130 part 2 : assertion failure on unsupported cast. 2016-11-25 22:11:13 +00:00
Henry Wong 182c08b528 Fix segfault when error in multi-dimensional part select. 2016-10-27 10:59:31 -07:00
Cary R 5853e32f82 Fix some cppcheck warning issues 2016-09-13 23:45:25 -07:00
Cary R c706c5dd90 The array properties can be available in a constant context
For most arrays the various properties are available as constant
values and can be evaluated in the compiler.
2016-09-11 14:25:00 -07:00
Martin Whitaker 7f475d4210 Refactor to use new pad_to_width/cast_to_width functions. 2016-03-25 22:23:45 +00:00
Martin Whitaker dc1c3a4043 Fix for GitHub issue #94 - enhance support for SystemVerilog size casting.
Allow the size expression to be any constant expression. Also ensure that
the expression width and type are correctly calculated and applied.
2016-03-25 21:49:28 +00:00
Martin Whitaker 0199ad129d Fix expression type for compressed assignment statements.
A compressed assignment statement should give exactly the same
result as the equivalent uncompressed statement. This means
that the type (signed/unsigned) of the LHS affects the type of
the RHS expression (unlike in normal assignments). We need to
take care that bit/part selects and concatenations are correctly
identified as unsigned values, even in the cases where they
reduce to a single whole signal.
2016-02-23 16:53:01 +00:00
Maciej Suminski 32fab21e95 ivl: Allow concatenating strings returned by function calls. 2016-01-07 11:11:04 +01:00
Cary R 399384d81b Fix some cppcheck warnings and bugs 2015-12-19 17:19:19 -08:00
Christian Taedcke 6d5aabd4f0 Make a few constructors explicit.
This removes cppcheck warnings.
2015-10-22 12:33:33 +02:00
Cary R e682029648 A concatenation or the expression being replicated must have a non-zero width 2015-08-18 16:22:50 -07:00
Larry Doolittle 3e2196651a Remove unused parameter to indices_to_expressions
need_addr has been hanging around, unused, since commit 078a3fd4 on Jan 17, 2014.
2015-07-31 09:48:33 -07:00
Martin Whitaker 44dfc41004 Detect and report excess function arguments.
Also enhance a couple of error messages.
2015-06-21 09:07:11 +01:00
Larry Doolittle b23faff27c Just a few more spelling fixes
Includes some user-visible messages
2015-06-17 08:09:34 -07:00
Larry Doolittle 2739f83702 Spelling fixes in C and C++ comments 2015-06-04 15:00:29 -07:00
Martin Whitaker ab688613cc Fix for br978 - assertion involving addition of $ivlh_to_unsigned() result.
$ivlh_to_unsigned, unlike $signed and $signed, can cause a reduction
in width. The shared PECallFunction::cast_to_width_ method did not
support this.
2015-05-22 00:05:39 +01:00
Martin Whitaker 301a7e587b Fix for GitHub issue #62 - assertion failure on too many array/vector indices.
Provide an error message for invalid code that contains more indices than
there are dimensions.
2015-04-25 22:57:14 +01:00
Martin Whitaker 22d15f9ca9 Fix handling of expression width with $ivlh_to_unsigned.
The first argument to $ivlh_to_unsigned should be treated as having
a self-determined width.
2015-04-25 09:20:31 +01:00
Maciej Suminski 83d721232d ivl: $ivlh_to_unsigned() also tests its argument width. 2015-03-27 20:53:14 +01:00
Cary R 102d2d534f Remove extra warning code. 2015-03-09 14:35:31 -07:00
Cary R bddfcac823 The === and !== operators cannot be used with a SV string 2015-03-02 15:34:22 -08:00
Maciej Suminski 8b3667f76e ivl: Casting vectors to dynamic arrays. 2015-02-04 16:02:38 +01:00
Maciej Suminski a52242745a ivl: Casting dynamic arrays to vectors. 2015-02-04 16:02:38 +01:00
Maciej Suminski 35401f0e2c ivl: Functions may return dynamic arrays. 2015-01-12 11:08:31 +01:00
Cary R 96472e5537 For a signed R-value we can use the full width when converting to long
When trying to get the value we can use the full width of a long if the
expression is signed.
2014-12-10 14:41:27 -08:00
Stephen Williams 38f277d81b Merge branch 'master' into vec4-stack
Conflicts:
	vvp/array.cc
	vvp/vthread.cc
2014-12-02 11:21:58 -08:00
Maciej Suminski c3a318f14e ivl: Casting vectors to strings. 2014-11-27 17:36:23 +01:00
Maciej Suminski b2deae7ba9 ivl: More meaningful errors messages. Minor code formatting. 2014-11-27 17:36:23 +01:00
Maciej Suminski 675dd91403 ivl: Added sign checking & casting between integers of different size. 2014-11-27 17:36:23 +01:00
Maciej Suminski b12e00d875 ivl: String to vector casting. 2014-11-27 17:36:23 +01:00
Maciej Suminski 103828577b ivl: Fixed indentations. 2014-11-27 17:36:23 +01:00
Maciej Suminski 89d1125979 ivl: Bit selection using variables in strings. 2014-11-27 17:36:23 +01:00
Maciej Suminski 43c6a0bacd ivl: Casting to int. 2014-11-27 17:36:23 +01:00
Maciej Suminski 13f861a963 ivl: Added PECastType to handle type casting. 2014-11-27 17:36:23 +01:00
Stephen Williams 82ca4cf641 Add a warning if an expression pads itself to a crazy width. 2014-11-25 14:49:04 -08:00
Stephen Williams a98f21aa65 Merge branch 'master' into vec4-stack
Conflicts:
	elab_lval.cc
	netmisc.cc
	tgt-vvp/eval_object.c
	tgt-vvp/vvp_process.c
	vvp/codes.h
	vvp/compile.cc
	vvp/opcodes.txt
	vvp/vpi_tasks.cc
	vvp/vpi_vthr_vector.cc
	vvp/vthread.cc
2014-10-21 09:12:02 -07:00
Cary R d85096c56a Add support for implict this in class methods 2014-09-16 17:08:57 -07:00
Stephen Williams 480668fee6 Add support for classes defined in $root scope. 2014-09-15 17:37:30 -07:00
Stephen Williams ea4b000be6 Get arrayed property expressions down to the ivl_target API. 2014-09-15 17:37:30 -07:00
Stephen Williams 697701a26e Sorry messages for property arrays. 2014-09-07 17:48:19 -07:00
Stephen Williams 88e951418b Handle elaboration of class properties referenced within sub-scopes. 2014-09-06 16:26:08 -07:00
Stephen Williams d1a35d5152 Handle nil queue as a was to delete a queue.
Treat this like assigning null to a dynamic array. This deletes the
queue and thus has the effect of clearing it.
2014-09-02 12:19:58 -07:00
Stephen Williams 886b6cd349 Debug messages. 2014-08-30 10:18:57 -07:00
Stephen Williams dec4cd5071 Handle arrays of class objects.
This goes all the way down to the vvp level, where we create support
for arrays of objects, generate the new code in the -tvvp code
generator, and elaborate the arrays in the first place.
2014-08-30 10:18:57 -07:00
Cary R b4d0c43a96 Remove some compile warnings. 2014-08-25 18:24:58 -07:00
Martin Whitaker e5f49baaac Fix for GitHub issue #37 - bug in expression width pruning.
If an expression contains a division, remainder, or right shift operation,
set the expression min_width to UINT_MAX to flag that the expression width
cannot be pruned. Using UINT_MAX ensures that the min_width won't change
as we continue to elaborate the expression.
2014-08-25 20:27:22 +01:00
Stephen Williams 8c2d51142b Elaborate pop_back/pop_front methods on dynamic arrays. 2014-08-21 16:44:46 -07:00
Stephen Williams c9ff48bd4e Add support for dynamic array/queue "last" index ($)
Internally, treat the "$" as a special expression type that takes
as an argument the signal that is being indexed. In the vvp target,
use the $last system function to implement this.
2014-08-21 16:44:45 -07:00
Stephen Williams da63ef02d4 Implement the size method for queues.
This works by translating it to a $size() system function call.
The $size function is already implemented for dynamic queues and
it is easy enough to expand it for queues.
2014-08-21 16:44:45 -07:00
Stephen Williams a730572e37 Elaborate size method of darray/queue objects. 2014-08-21 16:44:45 -07:00
Stephen Williams 6d052d4ff7 Handle queue types and expressions at pform level. 2014-08-21 16:44:45 -07:00
Martin Whitaker e82bafcb84 Fix for GitHub issue #30 : failed assertion in eval_tree.cc
The root cause was the constant propagation done during elaboration
of a multiply operation, which didn't check for mixed real/logic
expressions.
2014-06-20 20:52:15 +01:00
Cary R 81947edaa5 A bit select is not the same as selecting part of a packed array
When adding the ability to select part of a multi-dimensional packed
array the sign and size information for a true bit select was broken.
2014-06-12 09:20:31 -07:00
Stephen Williams 40b36337e2 Fix some bugs with packed array dimensions.
The netparray_t::slice_dimensions bug was the most insidious and
caused all manner of confusion. Also fix some other packed array
and unpacked array (and mixed) indexing calculations.
2014-04-06 08:40:10 -07:00
Stephen Williams df4889ba3d Handle SEL_IDX_UP is some situations. 2014-04-06 08:40:09 -07:00
Stephen Williams fc1f9ac6a5 Handle unpacked arrays as module input ports. 2014-04-06 08:40:09 -07:00
Stephen Williams 6caa41cc93 First pass at support for continuous assign of unpacked net arrays. 2014-04-06 08:40:09 -07:00
Stephen Williams 7ceb18fb37 Merge branch 'master' into vec4-stack
Conflicts:
	netmisc.cc
	tgt-vvp/eval_expr.c
	vvp/vthread.cc
2014-03-01 09:02:14 -08:00
Stephen Williams d2ff77d56c More standard handling of unsized numbers as system task arguments. 2014-03-01 08:38:23 -08:00
Cary R d0d421ebe2 Remove compile warning 2014-02-28 17:29:55 -08:00
Martin Whitaker ed2e339dd6 Fix for GitHub issue #18 : undef propagation of const multiplies is incorrect.
When an expression is elaborated, the compiler converts multiplies with
one constamt zero operand into a constant zero value. This is only valid
if the other operand is not a 4-state variable.
2014-02-27 19:30:28 +00:00
Martin Whitaker 5dcd2e8957 Added width cap for unsized expressions.
Unsized expressions can expand to extremely large widths. Usually this
is actually a mistake in the source code, but it can lead to the compiler
temporarily using extremely large amounts of memory, or in the worst
case, crashing. This adds a cap on the width of unsized expressions (by
default 65536 bits, but overridable by the user), and causes a warning
message to be output when the cap is reached.
2014-02-27 19:20:20 +00:00
Martin Whitaker a3450bf856 Fixes for GitHub issues 13 and 15.
The verinum arithmetic operators now observe the standard Verilog
rules for calculating the result width if all operands are sized.
If any operand is unsized, the result is lossless, as before.
They also now all observe the standard rules for handling partially
undefined operands (if any operand bit is 'x', the entire result is
'x').

I've also added the unary '-' operator, and renamed v_not() to be
the unary '~' operator. This has allowed some simplification in
other parts of the compiler.
2014-02-25 20:39:21 +00:00
Stephen Williams ebed793dec Merge branch 'master' into vec4-stack
Conflicts:
	vvp/vthread.cc

Signed-off-by: Stephen Williams <steve@icarus.com>
2014-02-21 17:34:59 -08:00
Martin Whitaker 66bdbb77ec Fix for GitHub issue 9 part 2 : Efficiency of the verinum pow() function.
This changes the verinum pow() function to use the more efficient algorithm
used in the vvp runtime. It will still be slow if the left operand is unsized
and the right operand is large, as it will expand the result vector to avoid
overflow.
2014-02-15 22:06:31 +00:00
Stephen Williams 1805598eae Fix some vec4 handling of putc, len, and other string methods. 2014-01-31 19:01:28 -08:00
Stephen Williams 0eca210722 Merge branch 'master' into vec4-stack 2014-01-30 17:07:54 -08:00
Larry Doolittle 3e95966d70 More spelling fixes
Mostly comments
Changs "initilzers" in a string visible with debug_elaborate.
Includes a few British->American changes in the root directory only.
2014-01-30 16:43:17 -08:00
Stephen Williams fdc9e8590d Merge branch 'master' into vec4-stack 2014-01-30 15:59:51 -08:00
Larry Doolittle be17bfc0e9 Spelling fixes
Mostly comments.
One user-visible string ("Evalutated to ") changed in the debug_eval_tree case.
2014-01-30 15:34:20 -08:00
Larry Doolittle 77a01f65d0 Remove fixable unused-parameter warnings
I see other warnings within vhdlpp/lexor.cc caused by a flex bug
(see http://sourceforge.net/p/flex/bugs/115/), which I won't try to work around.
2014-01-30 15:34:08 -08:00
Stephen Williams 1fc4093191 Fix possible overflow in calculation of canonical indices. 2014-01-15 14:26:53 -08:00
Stephen Williams f906384423 Elaborate r-vlaue packed struct members pads as needed. 2014-01-11 19:19:15 -08:00
Stephen Williams 6ec31517a9 Implement $bits(type) to get the size of a type
In the process, I implemented a means to get at
previously elaborated types from the pform type
pointer.
2014-01-11 19:19:15 -08:00
Stephen Williams 8a4d769b3d Type name expressions down to elaboration. 2014-01-11 19:19:15 -08:00
Stephen Williams 0b4056817a Generalize struct member type 2013-12-07 12:20:28 -08:00
Cary R 9544cb516d Fix some compile warnings 2013-11-24 14:35:44 -08:00
Cary R f47af361cd For default function arguments do not access an out of range real argument.
The code should only look at the real argument that exist any missing
arguments default to not being defined and hence needs to use the
default expression. Found with valgrind.
2013-11-20 16:52:17 -08:00
Stephen Williams f16fd03dab Elaborate PChainConstructor calls.
It is better to leave the handling of PChainConstructor calls to
the elaboration, instead of stripping them out early. This allows
for handling the arguments of the chain constructor in the correct
scope.
2013-11-10 18:03:19 -08:00
Stephen Williams d192f545ac Chain class instance constructors with arguments. 2013-11-10 18:03:19 -08:00
Stephen Williams 0157a156fb Elaborate implicit chaining of constructors in class new. 2013-11-10 18:03:19 -08:00
Martin Whitaker be2595085f Reorder calls to test_width() on binary operands for efficiency.
It is more common to find an unsized number on the right hand side
of a binary operator than on the left hand side, particularly for
comparison operations (e.g. x < 10 rather than 10 > x), so testing
the width of the right operand first is less likely to result in
the width needing to be retested. Counting the number of times an
operand width is retested when running the test suite confirms this;
before this change an operand width was retested 4869 times, after
the change an operand width was retested 99 times.
2013-10-28 22:55:10 +00:00
Martin Whitaker 4625e7e2b6 Improvements to strict-expr-width mode.
Enable error reporting when an unsized number is used in a concatenation
operand. Allow greater pruning of expressions containing unsized numbers.
2013-10-28 22:07:09 +00:00
Stephen Williams 61fbfb562e Merge branch 'x-mil11' 2013-10-21 08:55:13 -07:00
Martin Whitaker 7e82a37fa3 Extend -gstrict-expr-width to cover unsized numbers.
To be strictly compliant with the standard and compatible with other
EDA tools, unsized numbers should be treated as having a fixed size
(the same size as an integer). The -gstrict-expr-width option is
extended to allow the user to enable this behaviour.
2013-10-20 23:16:11 +01:00
Stephen Williams e60804cf41 Handle initialized darray of strings
This includes adding support for returning strings from functions,
adding initializing new darray with array_pattern strings, and
assigning an array_pattern of strings to a preallocated darray.
Also fix up support for initializing array with simple string
expression.
2013-10-19 15:34:15 -07:00
Stephen Williams 2464582587 Handle number literals as real-valued r-values. 2013-10-19 15:34:15 -07:00
Stephen Williams 82ebf6372c Generate code to implement new element initializers. 2013-10-19 15:34:15 -07:00
Stephen Williams 3945b9df45 Elaborate darray new element initializer to ivl_target API 2013-10-19 15:34:15 -07:00
Stephen Williams 2030e06988 Parse/elaborate some array-patterns down to the ivl_target API. 2013-10-19 15:34:14 -07:00
Stephen Williams cd85a42acc Elaborate the null darray literal as a null expression.
This leads to the correct code being generated in the vvp
code generator.
2013-10-19 15:34:14 -07:00
Stephen Williams 18c338ad09 Handle array assignment patters through pform.
This gets us to elaboration. In the process also fix up ivl_type_t
type comparisons to do deep type comparison.
2013-10-19 15:34:14 -07:00
Martin Whitaker 20ad1ff261 Fix zero/sign extension of parameter values in expressions.
For sized parameters, the choice of zero or sign extension should
be based on the expression type, not the parameter type.
2013-10-19 13:14:39 +01:00
Stephen Williams d025c8aa93 Non-method tasks/functions support default arguments. 2013-09-20 20:44:57 -07:00
Stephen Williams 46f551073e Handle default expressions anywhere in port expression list. 2013-09-20 20:44:57 -07:00
Stephen Williams 16414f921f Handle default arguments in class new functions. 2013-09-20 20:44:56 -07:00
Stephen Williams d8f4ff4b57 Remove eval_expr during PEBinary elaboration
Turns out that call to eval_expr is redundant, and in degenerate
situations can lead to so many wasteful calls to eval_expr that
elaboration performance suffers dramatically.
2013-08-09 20:55:18 -07:00
Cary R 032f12af45 Fix some sign information in the CA code. 2013-07-29 10:26:49 -07:00
Cary R bb37b74f98 Fix for br884 (packed array access problems) 2013-07-28 13:24:57 -07:00
Cary R f6b8d613ab Fix space issue. 2013-07-05 16:20:48 -07:00
Cary R 3a3cd8565d Add elaborate_expr_param_bit_ and pass param refs for variable selects
For variable parameter selects (indexed and bit) pass the value being
selected as a parameter reference instead of just a numeric constant
so it is easy to get the underlying parameter information.

Move the parameter bit select code into its own routine and cleanup
the remaining general code.

This should not effect the VVP code, but the ivl_expr_parameter(<expr>)
routine can be used to get at the actual parameter information in the
vlog95 target.
2013-07-05 16:16:54 -07:00
Cary R d1c1997acf Add missing file/line information for a full parameter reference. 2013-07-04 16:50:26 -07:00
Stephen Williams 173577d5f7 Merge branch 'work14' 2013-07-03 20:00:22 -07:00
Stephen Williams 5326790932 Add support for class static properties.
Static properties are like variables in a named scope.
Detect these variables during elaboration so that the
code generator just sees them as variables.
2013-07-02 20:16:47 -07:00
Stephen Williams cf47a759d1 Implement the "local" class member protection.
Test during elaboration that the member really is
accessible in the context where the elaboration
happens.
2013-07-02 20:16:47 -07:00
Stephen Williams 75b4b94061 Elaborate implicit initializers
Remaining pform fixup of property initializers, and
elaboration and code generation for implicit constructor.
2013-07-02 20:16:46 -07:00
Cary R 4dbd0442aa Add missing file/line information to a few expressions. 2013-06-26 21:25:27 -07:00
Stephen Williams 5c00b96127 Handle constant functions from other scopes, i.e. packages. 2013-06-12 14:09:08 -07:00
Stephen Williams 096e53dea4 Don't crash if function is not found. 2013-06-12 14:09:08 -07:00
Stephen Williams bc77a19059 Use $ivl_unsigned to implement VHDL to_unsigned function.
The VHDL to_unsigned function with to arguments is best handled
in the ivl elaborator, so have it generate an $ivlh_to_unsigned
function call in the vhdlpp code, and implement it in the ivl
core.

Also, implement the 'length attribute as a $bits() call for
similar reasons.
2013-06-12 14:09:08 -07:00
Martin Whitaker 26dc6d68cd Handle out-of range and undefined LHS word indices in assignments.
For constant word indices, issue a warning if the index is out of
range or an undefined value. In any case, the RHS value should be
discarded, and the actual assignment should be skipped.
2013-05-18 19:21:37 +01:00
Stephen Williams 8e559e4e91 Support shallow copy as far as the ivl_target API. 2013-04-27 19:54:13 -07:00
Stephen Williams eff6e7a441 Parse to pform shallow copy "new" expressions. 2013-04-21 19:27:57 -07:00
Stephen Williams 8994ef1483 Implement class constructors.
Class constructors are the "new" method in a class description.
Elaborate the constructor as an ordinary method, but the only
way to access this method is to implicitly call it. The elaborator
will take the constructor call and generate a naked "new" expression
and implicit constructor method call with the object itself as the
return value.
2013-04-20 16:38:35 -07:00
Stephen Williams 20ee350601 Generalize user defined function return type handling.
I'm gonna need functions to return class objects, so generalize
the output types of user defined functions.
2013-04-20 16:38:35 -07:00
Cary R 15379f1750 Remove some compile warnings 2013-04-17 17:13:22 -07:00
Stephen Williams 4ad556d464 Update some copyright notices. 2013-04-08 18:35:37 -07:00
Stephen Williams b1d853bf9b Fix handling of struct members for variables imported from packages. 2013-04-08 18:20:39 -07:00
Stephen Williams 44cd9158e8 Elaborate parameters, tasks and functions in packages.
Get the elaboration to happen all the way to the ivl_target
interface.
2013-04-08 18:20:39 -07:00
Stephen Williams bae0f1d3a7 Parse more package items
Rework lexical support for PACKAGE_IDENTIFIER so that the lexor
can help with package scoped identifiers.

Pform package types and package functions up to elaboration.
2013-04-08 18:20:39 -07:00
Stephen Williams 64dffa5745 Support member functions with arguments. 2013-03-24 15:12:35 -07:00