summaryrefslogtreecommitdiff
path: root/gcc/melt/warmelt-outobj.melt
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-14 08:07:35 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-14 08:07:35 +0000
commitbd4564e2cce3f4d1e54c3228ddd8c0a8c7aff4c3 (patch)
tree2d7f00c5cc3ebef5e8962697acf1b65877788bda /gcc/melt/warmelt-outobj.melt
parent643facd9f6a214663d088c7441b8c44196177d88 (diff)
downloadgcc-bd4564e2cce3f4d1e54c3228ddd8c0a8c7aff4c3.tar.gz
2013-10-14 Basile Starynkevitch <basile@starynkevitch.net>
* melt/warmelt-first.melt (class_module_context): New mocx_macroenv field. * melt/warmelt-outobj.melt (compile_list_sexpr) (compile_first_bootstrap_list_sexpr) (melt_translate_run_macroexpansions_list): Fill it to a fresh environment. * melt/warmelt-modes.melt (makedoc_docmd): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@203512 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/melt/warmelt-outobj.melt')
-rw-r--r--gcc/melt/warmelt-outobj.melt12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/melt/warmelt-outobj.melt b/gcc/melt/warmelt-outobj.melt
index f398a46061b..e96160fd9c8 100644
--- a/gcc/melt/warmelt-outobj.melt
+++ b/gcc/melt/warmelt-outobj.melt
@@ -6937,11 +6937,13 @@ if (1) return;
(not (string_suffixed modnamstr ".cc")) modnamstr)
(let (
(modnakedname (make_string_nakedbasename discr_string modnamstr))
+ (macroenv (fresh_env inienv (tuple 'macro-compile modnamstr)))
(modctx (instance class_module_context
:mocx_modulename modnakedname
:mocx_expfieldict (make_mapstring discr_map_strings 390)
:mocx_expclassdict (make_mapstring discr_map_strings 140)
:mocx_initialenv inienv
+ :mocx_macroenv macroenv
:mocx_funcount (make_integerbox discr_integer 0)
:mocx_filetuple ()
:mocx_cheaderlist (make_list discr_list)
@@ -7017,11 +7019,13 @@ if (1) return;
}#)
(let (
(modnakedname (make_string_nakedbasename discr_string modnamstr))
+ (macroenv (fresh_env initial_environment (tuple 'macro-first modnamstr)))
(modctx (instance class_first_module_context
:mocx_modulename modnakedname
:mocx_expfieldict (make_mapstring discr_map_strings 490)
:mocx_expclassdict (make_mapstring discr_map_strings 240)
:mocx_initialenv ()
+ :mocx_macroenv macroenv
:mocx_funcount (make_integerbox discr_integer 0)
:mocx_filetuple ()
:mocx_cheaderlist (make_list discr_list)
@@ -7266,12 +7270,15 @@ if (1) return;
(set_ref referr (or v :true))))
(litvalist
(list ())) ;first element of list is ignored, so null
+ (macroenv
+ (fresh_env env (tuple 'macro-extension nakedbasnam)))
(modctx
(instance class_running_extension_module_context
:mocx_modulename nakedbasnam
:mocx_expfieldict (make_mapstring discr_map_strings 71)
:mocx_expclassdict (make_mapstring discr_map_strings 19)
:mocx_initialenv env
+ :mocx_macroenv macroenv
:mocx_funcount (make_integerbox discr_integer 0)
:mocx_filetuple ()
:mocx_cheaderlist (make_list discr_list)
@@ -7544,13 +7551,16 @@ if (1) return;
)
(set_ref referr (or v :true))))
(litvalist
- (list ())) ;first element of list is ignored, so null
+ (list ())) ;first element of list is ignored, so null
+ (macroenv
+ (fresh_env env (tuple 'macro-extension nakedbasnam)))
(newmodctx
(instance class_running_extension_module_context
:mocx_modulename nakedbasnam
:mocx_expfieldict (make_mapstring discr_map_strings 71)
:mocx_expclassdict (make_mapstring discr_map_strings 19)
:mocx_initialenv env
+ :mocx_macroenv macroenv
:mocx_funcount (make_integerbox discr_integer 0)
:mocx_filetuple ()
:mocx_cheaderlist (make_list discr_list)