Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sequencer-2-2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
epics-modules
sequencer-2-2
Commits
c2d55b99
Commit
c2d55b99
authored
12 years ago
by
benjamin.franksen
Browse files
Options
Downloads
Patches
Plain Diff
snc: removed bitMask/seqMask hack in gen_tables.c
parent
49b4c69d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/snc/gen_tables.c
+7
-9
7 additions, 9 deletions
src/snc/gen_tables.c
with
7 additions
and
9 deletions
src/snc/gen_tables.c
+
7
−
9
View file @
c2d55b99
...
...
@@ -22,8 +22,6 @@ in the file LICENSE that is included with this distribution.
#endif
#include
"seqCom.h"
#define boolean seqBool
#define bitMask seqMask
#include
"analysis.h"
#include
"main.h"
#include
"sym_table.h"
...
...
@@ -32,7 +30,7 @@ in the file LICENSE that is included with this distribution.
#include
"gen_tables.h"
typedef
struct
event_mask_args
{
bit
Mask
*
event_words
;
seq
Mask
*
event_words
;
int
num_event_flags
;
}
event_mask_args
;
...
...
@@ -45,7 +43,7 @@ static void encode_options(Options options);
static
void
encode_state_options
(
StateOptions
options
);
static
void
gen_ss_table
(
SymTable
st
,
Expr
*
ss_list
);
static
void
gen_state_event_mask
(
Expr
*
sp
,
uint
num_event_flags
,
bit
Mask
*
event_words
,
uint
num_event_words
);
seq
Mask
*
event_words
,
uint
num_event_words
);
static
int
iter_event_mask_scalar
(
Expr
*
ep
,
Expr
*
scope
,
void
*
parg
);
static
int
iter_event_mask_array
(
Expr
*
ep
,
Expr
*
scope
,
void
*
parg
);
...
...
@@ -186,9 +184,9 @@ static void gen_state_table(Expr *ss_list, uint num_event_flags, uint num_channe
uint
ss_num
=
0
;
#if (__STDC_VERSION__ >= 199901L) || defined(__GNUC__)
bit
Mask
event_mask
[
num_event_words
];
seq
Mask
event_mask
[
num_event_words
];
#else
bit
Mask
*
event_mask
=
(
bit
Mask
*
)
alloca
(
num_event_words
*
sizeof
(
bit
Mask
));
seq
Mask
*
event_mask
=
(
seq
Mask
*
)
alloca
(
num_event_words
*
sizeof
(
seq
Mask
));
#endif
/* NOTE: Bit zero of event mask is not used. Bit 1 to num_event_flags
...
...
@@ -334,7 +332,7 @@ static void gen_ss_table(SymTable st, Expr *ss_list)
are for process variables. Bit zero is not used for whatever mysterious reason
I cannot tell. */
static
void
gen_state_event_mask
(
Expr
*
sp
,
uint
num_event_flags
,
bit
Mask
*
event_words
,
uint
num_event_words
)
seq
Mask
*
event_words
,
uint
num_event_words
)
{
uint
n
;
Expr
*
tp
;
...
...
@@ -376,7 +374,7 @@ static int iter_event_mask_scalar(Expr *ep, Expr *scope, void *parg)
Chan
*
cp
;
Var
*
vp
;
int
num_event_flags
=
em_args
->
num_event_flags
;
bit
Mask
*
event_words
=
em_args
->
event_words
;
seq
Mask
*
event_words
=
em_args
->
event_words
;
assert
(
ep
->
type
==
E_VAR
);
vp
=
ep
->
extra
.
e_var
;
...
...
@@ -417,7 +415,7 @@ static int iter_event_mask_array(Expr *ep, Expr *scope, void *parg)
{
event_mask_args
*
em_args
=
(
event_mask_args
*
)
parg
;
uint
num_event_flags
=
em_args
->
num_event_flags
;
bit
Mask
*
event_words
=
em_args
->
event_words
;
seq
Mask
*
event_words
=
em_args
->
event_words
;
Var
*
vp
=
0
;
Expr
*
e_var
=
0
,
*
e_ix
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment