mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-22 04:43:53 +00:00
Estimated hours taken: 12 (this figure a wild guess, because most of this
stuff was done about 6 months ago and left to rot).
This change basically exposes the C types used for implementing the
`reference' and `nb_reference' types in extras/references, so that if the
user wishes to allocate these types somewhere other than on the heap, they
can. This is needed by HAL in order to implement global variables.
extras/references/c_reference.h:
New file, intended to expose the C types used by the `reference'
and `nb_reference' modules, so that the user can allocate them
somewhere other than on the heap if they need to.
extras/references/nb_reference.m:
Added a new predicate `init/2' for initialising a user-allocated
`nb_reference'.
extras/references/reference.m:
Moved the `ME_Reference' type to c_reference.h, and added a new
predicate `init/2' for initialising a user-allocated `reference'.
extras/references/README:
Added entries for the new `c_reference.h' and `tests/glob_test.m'
files, as well as correcting the name of `tests/ref_test.m'.
extras/references/tests/Mmakefile:
Added `glob_test' to the list of programs to build.
extras/references/tests/glob_test.m:
Test case for statically-allocated reference types, implementing
global variables. Adapted from output from the HAL compiler.
extras/references/tests/glob_test.exp:
Expected output from `glob_test'.
11 lines
351 B
Plaintext
11 lines
351 B
Plaintext
Initial value of $Optimise: yes
|
|
Setting $Optimise to `no'.
|
|
New value of $Optimise: no
|
|
Setting $Optimise to `yes' in failing branch.
|
|
New value of $Optimise: no
|
|
Initial value of $TargetLang: sicstus
|
|
Setting $TargetLang to `mercury'.
|
|
New value of $TargetLang: mercury
|
|
Setting $TargetLang to `sicstus' in failing branch.
|
|
New value of $TargetLang: sicstus
|