summaryrefslogtreecommitdiff
path: root/source/compiler/aslcompile.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2015-04-09 23:08:47 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2015-04-09 23:08:47 +0000
commitd29c30140bd8ea81e0530ad3975c977891ab9275 (patch)
tree7a91c0da98a89b4b10beda84d027d2c779673064 /source/compiler/aslcompile.c
parent2872953d4a9c9c4e0fc0b9ab37d0e962909625a0 (diff)
Notes
Diffstat (limited to 'source/compiler/aslcompile.c')
-rw-r--r--source/compiler/aslcompile.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/compiler/aslcompile.c b/source/compiler/aslcompile.c
index 47ef107e1943..47f92b44e4df 100644
--- a/source/compiler/aslcompile.c
+++ b/source/compiler/aslcompile.c
@@ -195,8 +195,16 @@ CmDoCompile (
Event = UtBeginEvent ("Constant folding via AML interpreter");
DbgPrint (ASL_DEBUG_OUTPUT,
"\nInterpreting compile-time constant expressions\n\n");
- TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD,
- OpcAmlConstantWalk, NULL, NULL);
+
+ if (Gbl_FoldConstants)
+ {
+ TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD,
+ OpcAmlConstantWalk, NULL, NULL);
+ }
+ else
+ {
+ DbgPrint (ASL_PARSE_OUTPUT, " Optional folding disabled\n");
+ }
UtEndEvent (Event);
/* Update AML opcodes if necessary, after constant folding */