Skip to content

Commit

Permalink
work on improved debugging experience and refactoring
Browse files Browse the repository at this point in the history
cobc:
* codegen.c (output_label, output_label_c): extracted from output_stmt
* codegen.c (output_label_c): added output of C labels for paragraphs using prefix PARAGRAPH and, to make them distinct, its label id as suffix
* codegen.c (output_search_all, output_search_whens): if no AT END position token is available, use the start token instead
* typeck.c (cb_emit_search, cb_emit_search_all), tree.h: return created search tree
* parser.y (_end_search): if search has no AT END create an implicit one at END-SEARCH for better trace and debugging
* codegen.c (output_assign, output_if, output_debug_item): extracted from output_stmt
* typeck.c (cb_emit, cb_emit_list): changed from defines to inline functions, now returning the tree that was emitted
  • Loading branch information
sf-mensch committed Dec 16, 2022
1 parent 456b5e3 commit 34052d7
Show file tree
Hide file tree
Showing 7 changed files with 610 additions and 495 deletions.
3 changes: 2 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ NEWS - user visible changes -*- outline -*-
to use this extension for other dialects use the new
-fself-call-recursive=warning (or "ok")

** the option -g does not longer imply -fsource-location
** the option -g does not longer imply -fsource-location; but it auto-includes
references to the COBOL-paragraphs to further ease source level debugging

** new flag -fstack-extended (implied with --debug and --dump) to include
the origin of entrypoints and PERFORM, this is used for the internal
Expand Down
13 changes: 13 additions & 0 deletions cobc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
is done and swap the result for return values as used in SEARCH ALL later
* codegen.c (output_long_integer): reduce scope of variables as done
in (output_integer)
* codegen.c (output_assign, output_if, output_debug_item): extracted
from output_stmt
* typeck.c (cb_emit, cb_emit_list): changed from defines to inline
functions, now returning the tree that was emitted

2022-12-15 Simon Sobisch <[email protected]>

Expand All @@ -27,6 +31,15 @@
if left side is constant or literal
* typeck.c (cb_build_cond_fields): optimize comparison between field and
SPACES up to COB_SPACES_ALPHABETIC_BYTE_LENGTH
* codegen.c (output_label, output_label_c): extracted from output_stmt
* codegen.c (output_label_c): added output of C labels for paragraphs
using prefix PARAGRAPH and, to make them distinct, its label id as suffix
* codegen.c (output_search_all, output_search_whens): if no AT END position
token is available, use the start token instead
* typeck.c (cb_emit_search, cb_emit_search_all), tree.h: return created
search tree
* parser.y (_end_search): if search has no AT END create an implicit one
at END-SEARCH for better trace and debugging

2022-12-14 Simon Sobisch <[email protected]>

Expand Down
Loading

0 comments on commit 34052d7

Please sign in to comment.