1 set file [lindex $argv 0]
   2 set macro [lindex $argv 1]
   3 
   4 if {[info exists env(FINAL_PATCH)]} {
   5     set changed 0
   6     catch {
   7         exec bash -c "hg status . | grep ." >@ stdout 2>@ stdout
   8         # If the above command exited with 0 status, that means some
   9         # files have (possibly) changed
  10         set changed 1
  11     }
  12     if {$changed} {
  13         puts "Some files have changed -- FINAL_PATCH aborted"
  14         exit 1
  15     }
  16 }
  17 
  18 proc append_orig {varname line} {
  19     upvar $varname orig
  20     if {[string first TEMP_CONVERSION $line] < 0} {
  21         append orig $line\n
  22     }
  23 }
  24 
  25 proc flags_header_file {file} {
  26     if {![regsub {[.]hpp$} $file {.flags.hpp} file]} {
  27         puts "Not a proper input header file $file"
  28         exit 1
  29     }
  30     return $file
  31 }
  32 
  33 proc keep_orig_flags_macro {} {
  34     global env
  35     if {[info exists env(FINAL_PATCH)] || [info exists env(QUICK_TEST)]} {
  36         return 0
  37     } else {
  38         return 1
  39     }
  40 }
  41 
  42 proc temp_mark {} {
  43     set mark ""
  44     if {[keep_orig_flags_macro]} {
  45         set mark " // TEMP_CONVERSION"
  46     }
  47     return $mark
  48 }
  49 
  50 proc move_file {src dst} {
  51     if {[catch {exec cmp -s $src $dst}]} {
  52         # the files differ
  53         puts "update $dst"
  54         file rename -force $src $dst
  55     } else {
  56         puts "(same) $dst"
  57         file delete $src
  58     }
  59 }
  60 
  61 proc doit {file macro ifdef common} {
  62     global copyright all_names env
  63 
  64     foreach n {all_decl all_defn lp64_decl lp64_defn flagcond} {
  65         global $n
  66         catch {unset $n}
  67     }
  68     set all_names {}
  69 
  70     set orig ""
  71     set out ""
  72     set fd [open $file]
  73     while {![eof $fd]} {
  74         set line [gets $fd]
  75         if {[string first "\#define $macro\(" $line] >= 0} {
  76 
  77             set flagfile [flags_header_file $file]
  78             set insert ""
  79             append insert "#include \"[file tail $flagfile]\"[temp_mark]\n"
  80 
  81             set macro ""
  82             if {[keep_orig_flags_macro]} {
  83                 append macro "#if 0[temp_mark]\n"
  84             }
  85             if {[keep_orig_flags_macro]} {
  86                 append_orig macro $line
  87             }
  88             set data $line\n
  89             while {![eof $fd]} {
  90                 set line [gets $fd]
  91                 if {[keep_orig_flags_macro]} {
  92                     append macro $line\n
  93                 }
  94                 append data $line\n
  95                 if {![regexp {\\$} $line]} {
  96                     append out [process $data]
  97                     break
  98                 }
  99             }
 100 
 101             #--------------------------------------------------
 102             # Prepare the content of the <name>.flags.hpp file
 103             #--------------------------------------------------
 104             while {[regsub -all "(\n#\[^\n\]*_HPP)\n" $out "\\1_HACK\n" out]} {}
 105             set flags_hpp ""
 106 
 107             if {$ifdef != ""} {
 108                 append flags_hpp "#include \"utilities/macros.hpp\"\n"
 109                 append flags_hpp "#if $ifdef\n"
 110             }
 111 
 112             append flags_hpp "#include \"runtime/flags/jvmFlag.hpp\"\n"
 113             append flags_hpp [string trimright $out]
 114 
 115             if {$ifdef != ""} {
 116                 append flags_hpp "\n#endif // $ifdef"
 117             }
 118 
 119             if {[info exists all_decl]} {
 120                 if {[keep_orig_flags_macro]} {
 121                     append orig $insert
 122                 } else {
 123                     append orig $flags_hpp\n
 124                 }
 125             }
 126             if {[keep_orig_flags_macro]} {
 127                 append macro "#endif[temp_mark]\n"
 128             }
 129             if {[keep_orig_flags_macro]} {
 130                 append orig $macro
 131             }
 132         } else {
 133             append_orig orig $line
 134         }
 135     }
 136     close $fd
 137 
 138     # Change "Defines ..." to "Declares ..."
 139     regsub {Defines all global flags} $orig {Declare all global flags} orig
 140     regsub {Defines (.*specific flags)} $orig {Declare \1} orig
 141 
 142     #--------------------------------------------------
 143     # Patch the original <name>.hpp file
 144     #--------------------------------------------------
 145     set fd [open $file.tmp w+]
 146     regsub -all \n+\$ $orig "" orig
 147     puts $fd $orig
 148     close $fd
 149     move_file $file.tmp $file
 150 
 151     #--------------------------------------------------
 152     # Write the <name>.cpp file (if file exists, add the flag definitions to the end)
 153     #--------------------------------------------------
 154     write_c_file $file [flags_header_file $file] $ifdef $common
 155 
 156     #--------------------------------------------------
 157     # not final: Write the <name>.flags.hpp file
 158     #--------------------------------------------------
 159     if {[keep_orig_flags_macro]} {
 160         set file [flags_header_file $file]
 161 
 162         if {![info exists all_decl]} {
 163             if {[file exists $file]} {
 164                 puts "hg remove $file"
 165             }
 166             return
 167         }
 168 
 169         file mkdir [file dir $file]
 170         set fd [open $file.tmp w+]
 171         puts $fd $flags_hpp
 172         close $fd
 173 
 174         move_file $file.tmp $file
 175     }
 176 
 177     if {[info exists env(QUICK_TEST)]} {
 178         exit
 179     }
 180     #exit
 181 }
 182 
 183 set flags {}
 184 
 185 foreach {f n attr} {
 186     develop        VMDevelop        {}
 187     develop_pd     VMDevelopPD      {}
 188     product        VMProduct        {}
 189     product_pd     VMProductPD      {}
 190     diagnostic     VMDiagnostic     DIAGNOSTIC
 191     diagnostic_pd  VMDiagnosticPD   {DIAGNOSTIC}
 192     experimental   VMExperimental   EXPERIMENTAL
 193     notproduct     VMNotProduct     {}
 194     manageable     VMManageable     MANAGEABLE
 195     product_rw     VMProductRW      READ_WRITE
 196     lp64_product   VMLP64Product    LP64
 197 } {
 198     set className($f) $n
 199     set attrs($f) $attr
 200     lappend flags $f
 201 }
 202 
 203 set prefix ""
 204 set flagdecl "("
 205 
 206 foreach f $flags {
 207     append flagdecl $prefix$f
 208     set prefix ")|("
 209 }
 210 
 211 append flagdecl ")"
 212 
 213 set defn_indent [format %23s ""]
 214 
 215 proc get_docs {docs n} {
 216     global defn_indent
 217     # Skip the stuff before the first $n commas (these are the type, name and optional def_value)
 218     for {set i 0} {$i < $n} {incr i} {
 219         regsub {^[^,]*,} $docs "" docs
 220     }
 221 
 222     regsub -all {^[\\ ]*} $docs "" docs
 223     regsub -all " *\\\\\n *" $docs "\n$defn_indent" docs
 224 
 225     set docs [string trim $docs]
 226     return ${defn_indent}${docs}
 227 }
 228 
 229 proc clean_slashes {text} {
 230     regsub -all {^[\\ ]*} $text "" text
 231     regsub -all " *\\\\\n *" $text "" text
 232     return [string trim $text]
 233 }
 234 
 235 # These flags are misidentified as "notproduct" in the original source code --
 236 # they are actually used as develop flags.
 237 #
 238 foreach bad {
 239     CheckMemoryInitialization
 240     OptoBreakpointC2R
 241     OptoBreakpointOSR
 242     PrintInitialBlockList
 243     PrintOptoInlining
 244     PrintOpto
 245     PrintSystemDictionaryAtExit
 246     TestUnresponsiveErrorHandler
 247     TraceSuperWordLoopUnrollAnalysis
 248     TraceSuperWord
 249     VerifyLoopOptimizations
 250 } {
 251     set notnotproduct($bad) 1
 252 }
 253 
 254 
 255 proc spaces {n} {
 256     return [format "%${n}s" ""]
 257 }
 258 
 259 proc replace {class match range constraint comment} {
 260     global className defn_indent attrs all_decl all_defn lp64_decl lp64_defn flagcond notnotproduct all_comments all_names
 261 
 262     set list [split $match ,]
 263     set type [string trim [lindex $list 0]]
 264     set name [string trim [lindex $list 1]]
 265 
 266     set PD ""
 267     if {[regexp {_pd$} $class]} {
 268         set defv ""
 269         set defv_sep ""
 270         set docs [get_docs $match 2]
 271         set PD _PD
 272     } else {
 273         set defv [string trim [lindex $list 2]]
 274         set defv_sep ", "
 275         set docs [get_docs $match 3]
 276     }
 277 
 278     set range [clean_slashes $range]
 279     set constraint [clean_slashes $constraint]
 280     set defv [clean_slashes $defv]
 281 
 282     set cname $className($class)
 283 
 284     # Special cases for ranges that cannot be represented in constant expressions
 285     if {[regexp "os::vm_page_size" $range]} {
 286         set kind VMPageSize
 287         if {"$constraint" != {}} {
 288             error "constraint must be empty but is $constraint"
 289         }
 290     } elseif {[regexp "os::vm_allocation_granularity" $range]} {
 291         set kind VMAllocationGranularity
 292         if {"$constraint" != {}} {
 293             error "constraint must be empty but is $constraint"
 294         }
 295     }
 296 
 297     if {"$constraint" != {}} {
 298         regsub , $constraint ", JVMFlag::" constraint
 299         regsub ":: *" $constraint "::" constraint
 300         set constraint "(void*)$constraint"
 301     }
 302 
 303     if {[regexp develop $class] || [info exists notnotproduct($name)]} {
 304         set macro_prefix DEVELOP
 305     } elseif {$class == "notproduct"} {
 306         set macro_prefix NOTPROD
 307     } else {
 308         set macro_prefix PRODUCT
 309     }
 310 
 311     set def_prefix DEFN_${macro_prefix}
 312 
 313     set my_attrs $attrs($class)
 314     if {"$type" == "ccstrlist"} {
 315         set type ccstr
 316         lappend my_attrs STRINGLIST
 317     }
 318 
 319     set decl ${macro_prefix}_FLAG${PD}
 320     set defn DEFN_$decl
 321 
 322     set attr ""
 323     set prefix ""
 324     foreach a $my_attrs {
 325         append attr "${prefix}JVMFlag::${a}"
 326         set prefix " | "
 327     }
 328     if {$range != ""} {
 329         append attr "${prefix}JVMFlag::RANGE"
 330         set prefix " | "
 331     }
 332     if {$constraint != ""} {
 333         append attr "${prefix}JVMFlag::CONSTRAINT"
 334         set prefix " | "
 335     }
 336 
 337     if {$attr == ""} {
 338         set attr JVMFlag::DEFAULT
 339     }
 340 
 341     set sspc [expr 8 - [string length $type] - [string length ${PD}]]
 342     set t "$type,[spaces $sspc]"
 343 
 344     set dec ""
 345     append dec "${decl}($t ${name}${defv_sep}${defv}, ${attr},\n"
 346     append dec "$docs);\n"
 347     set def ""
 348     append def "${defn}(${name});"
 349 
 350     if {$class == "lp64_product"} {
 351         # This is the declaration for 32-bit builds.
 352         set lp64_decl($name) "const $type $name = $defv; // !JVMFlag::LP64" 
 353     }
 354 
 355     set all_decl($name) $dec
 356     set all_defn($name) $def
 357 
 358     if {$range != ""} {
 359         if {[info exists kind]} {
 360             append all_decl($name) "   FLAG_CUSTOM_RANGE([spaces 2]$name, $kind);\n"
 361         } elseif {[regexp :: $range]} {
 362             set warning "TODO: to avoid circular dependency, the min/max cannot be declared in header file"
 363             append all_decl($name) " //$warning\n"
 364             append all_decl($name) " //FLAG_RANGE([spaces 9]$name, $range);\n"
 365             set list [split $range ,]
 366             append all_defn($name) "\n    // $warning"
 367             append all_defn($name) "\n    inline FLAG_TYPE_$name FLAG_MIN_${name}() { return [string trim [lindex $list 0]]; }"
 368             append all_defn($name) "\n    inline FLAG_TYPE_$name FLAG_MAX_${name}() { return [string trim [lindex $list 1]]; }\n   "
 369         } else {
 370             append all_decl($name) "   FLAG_RANGE([spaces 9]$name, $range);\n"
 371         }
 372         if {[info exists kind]} {
 373             append all_defn($name) " ${def_prefix}_CUSTOM_RANGE($name);"
 374         } else {
 375             append all_defn($name) " ${def_prefix}_RANGE($name);"
 376         }
 377     }
 378     if {$constraint != ""} {
 379         append all_decl($name) "   FLAG_CONSTRAINT([spaces 4]$name, $constraint);\n"
 380         append all_defn($name) " ${def_prefix}_CONSTRAINT($name);";
 381     }
 382 
 383     if {[info exists flagcond($name)]} {
 384         set cond $flagcond($name)
 385         set all_decl($name) "${cond}($dec)\n"
 386         set all_defn($name) "${cond}($def)\n"
 387     }
 388     append all_decl($name) \n
 389 
 390     set all_comments($name) $comment
 391 
 392     lappend all_names $name
 393 }
 394 
 395 proc get_last_match {text pat} {
 396     set match ""
 397     while {[regexp $pat $text dummy match]} {
 398         regexp $pat $text "" text
 399     }
 400     return $match
 401 }
 402 
 403 proc parse_range {text} {
 404     if {[regexp {\uffff.*range *[\(](.*)} $text dummy match]} {
 405         regsub {/[*].*} $match "" match
 406         regsub {constraint[\(].*} $match "" match
 407         regsub {[\)][^\)]*$} $match "" match
 408         return $match
 409     } else {
 410         return ""
 411     }
 412 }
 413 
 414 proc check_conditionals {data} {
 415     global flagdecl flagcond
 416 
 417     set pat "(\[A-Z0-9_\]+)\[\(\]($flagdecl)"
 418     foreach line [split $data \n] {
 419         if {[regexp $pat $line dummy cond]} {
 420             set flagname [string trim [lindex [split $line ,] 1]]
 421             set flagcond($flagname) $cond
 422         }
 423     }
 424 }
 425 
 426 proc get_comments {data} {
 427     #set t $data
 428     regsub -all {/[*]} $data \uffee data
 429     regsub -all {[*]/} $data \uffef data
 430 
 431     regsub ".*\[\)\] *\\\\\n" $data "" data
 432     set data "\n$data\n"
 433     #set y $data
 434 
 435     set list {}
 436 
 437     set start "============================================================\n"
 438     set pat "\n *\uffee(\[^\uffef\]+)\uffef"
 439     while {[regexp $pat $data dummy match]} {
 440         regsub $pat $data "\n" data
 441         lappend list $match
 442         #puts $start$match
 443         #set start ""
 444         #if {[string trim $match] == "2^24"} {
 445         #    puts $t
 446         #    puts ==$y
 447         #    exit
 448         #}
 449     }
 450 
 451     return $list
 452 }
 453 
 454 proc process {data} {
 455     global flagdecl
 456 
 457     regsub {^#define [A-Za-z0-9_]+[(][^)]+.} $data "" data
 458     set data [string trim $data]
 459 
 460     set mark_begin_pat "($flagdecl)\[(\]"
 461 
 462     # get rid of the double close parens of JFR_ONLY(product(bool, FlightRecorder, "....."))
 463     regsub -all {\"[\)][\)] *\\} $data "\"\) \\\\" data
 464 
 465     check_conditionals $data
 466 
 467     regsub -all $mark_begin_pat $data "\ufff0\\1\ufffe" data
 468     regsub -all "\" *\[\)\] *(\\\\|$)" $data "\uffff" data
 469 
 470     set flag_pat "($flagdecl)\ufffe(\[^\uffff\]+)\uffff"
 471 
 472     set next_comment ""
 473 
 474     foreach part [split $data \ufff0] {
 475         set range ""
 476         set constraint ""
 477 
 478         set comment $next_comment
 479         set next_comment [get_comments $part]
 480 
 481         if {[regexp $flag_pat $part match class]} {
 482             regsub .*\ufffe $match "" match
 483             regsub \uffff $match "\"" match
 484             set list [split $data \ufffc]
 485             set range [parse_range $part]
 486             regexp {constraint[(]([^)]+).} $part dummy constraint
 487 
 488             set newflag [replace $class $match $range $constraint $comment]            
 489         }
 490     }
 491 
 492     set data [format_output all_decl lp64_decl 1]
 493 
 494     # Remove all whitespaces and empty lines ...
 495     while {[regsub -all "\n *\\\\\n" $data "\n" data]} {}    
 496     regsub -all " *\\\\\n" $data "\n" data
 497     #regsub -all "\n +" $data "\n" data
 498     #regsub -all "\n+" $data "\n" data
 499 
 500     # ... but leave an empty line before comments
 501     regsub -all ";\n/" $data ";\n\n/" data
 502 
 503     return $data
 504 }
 505 
 506 proc format_output {allarr lp64arr use_comments} {
 507     global copyright all_names
 508 
 509     upvar #0 $allarr all
 510     upvar #0 $lp64arr lp64
 511 
 512     set out ""
 513     set list $all_names
 514 
 515     foreach name $list {
 516         if {![info exists lp64($name)]} {
 517             append out [format_one_flag $allarr $name $use_comments]
 518         }
 519     }
 520 
 521     if {[info exists lp64]} {
 522         append out "\n#ifdef _LP64\n"
 523         foreach name $list {
 524             if {[info exists lp64($name)]} {
 525                 append out [format_one_flag $allarr $name $use_comments]
 526             }
 527         }
 528         if {$allarr == "all_decl"} {
 529             append out "#elif defined(IS_DECLARING_FLAG)\n"
 530             foreach name $list {
 531                 if {[info exists lp64($name)]} {
 532                     append out $lp64($name)\n
 533                 }
 534             }
 535         }
 536         append out "#endif // _LP64\n"
 537     }
 538 
 539     regsub -all "\n\[)\]" $out ")" out
 540 
 541     return $out
 542 }
 543 
 544 proc format_one_flag {allarr name use_comments} {
 545     upvar #0 $allarr all
 546     global all_comments
 547 
 548     set cmt $all_comments($name)
 549     set comments ""
 550     if {$cmt != "" && $use_comments} {
 551         set comments "\n"
 552         foreach line $cmt {
 553             append comments "    // $line\n"
 554         }
 555     }
 556 
 557     if {$use_comments} {
 558         set newline ""
 559     } else {
 560         set newline "\n"
 561     }
 562     return $comments$all($name)$newline
 563 }
 564 
 565 set copyright {/*
 566  * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
 567  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 568  *
 569  * This code is free software; you can redistribute it and/or modify it
 570  * under the terms of the GNU General Public License version 2 only, as
 571  * published by the Free Software Foundation.
 572  *
 573  * This code is distributed in the hope that it will be useful, but WITHOUT
 574  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 575  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 576  * version 2 for more details (a copy is included in the LICENSE file that
 577  * accompanied this code).
 578  *
 579  * You should have received a copy of the GNU General Public License version
 580  * 2 along with this work; if not, write to the Free Software Foundation,
 581  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 582  *
 583  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 584  * or visit www.oracle.com if you need additional information or have any
 585  * questions.
 586  *
 587  */}
 588 
 589 proc write_c_file {hppfile flagsfile ifdef common} {
 590     global copyright all_decl
 591 
 592     # put the C file first so we can compile it first without waiting for the other 1000 files
 593     regsub {[.]hpp} $hppfile ".cpp" cppfile
 594 
 595     if {![info exists all_decl]} {
 596         if {[file exists $cppfile]} {
 597             puts "hg remove $cppfile"
 598         }
 599         return
 600     }
 601 
 602     set data ""
 603     if {[catch {
 604         set fd [open $cppfile]
 605         set data [read $fd]
 606         close $fd
 607     }]} {
 608         set data $copyright
 609         append data "\n"
 610         append data "#include \"precompiled.hpp\"\n"
 611     }
 612 
 613     regsub "#include \"runtime/flags/newFlagInstantiate.hpp\"\n" $data "" data
 614     if {[file tail $cppfile] != "c2_globals.cpp"} {
 615         regsub "#include \"runtime/globals.hpp\"\n" $data "" data
 616     }
 617 
 618     regsub "// -- Define all JVM flags that have been declared.*" $data "" data
 619     set data [string trimright $data]
 620 
 621     append data "\n"
 622     append data "\n"
 623     append data "// -- Define all JVM flags that have been declared in $hppfile\n\n"
 624 
 625     if {$common != ""} {
 626         append data "// Add JVMFlag::$common to the JVMFlag::attr() for all flags defined in this file\n"
 627         append data "#ifdef FLAG_COMMON_ATTRS\n"
 628         append data "#undef FLAG_COMMON_ATTRS\n"
 629         append data "#endif\n"
 630         append data "#define FLAG_COMMON_ATTRS JVMFlag::$common\n"
 631         append data "\n"
 632     }
 633 
 634     #if {$ifdef != ""} {
 635     #    append data "#if $ifdef\n"
 636     #}
 637 
 638     append data "#include \"[file tail $hppfile]\"\n"
 639     append data "#include \"runtime/flags/jvmFlag.inline.hpp\"\n"
 640 
 641     append data [format_output all_defn lp64_defn 0]
 642 
 643     append data "\n"
 644 
 645     if {$common != ""} {
 646         #append data "#undef FLAG_COMMON_ATTRS\n"
 647         #append data "#define FLAG_COMMON_ATTRS 0\n"
 648     }
 649 
 650     set fd [open $cppfile.tmp w+]
 651     puts $fd "[string trim $data]"
 652     close $fd
 653 
 654     move_file $cppfile.tmp $cppfile
 655 }
 656 
 657 set allhdrs {}
 658 
 659 foreach {file macro ifdef common} {
 660     cpu/aarch64/globals_aarch64.hpp             ARCH_FLAGS            {}                   ARCH
 661     cpu/arm/globals_arm.hpp                     ARCH_FLAGS            {}                   ARCH
 662     cpu/ppc/globals_ppc.hpp                     ARCH_FLAGS            {}                   ARCH
 663     cpu/s390/globals_s390.hpp                   ARCH_FLAGS            {}                   ARCH
 664     cpu/sparc/globals_sparc.hpp                 ARCH_FLAGS            {}                   ARCH
 665     cpu/x86/globals_x86.hpp                     ARCH_FLAGS            {}                   ARCH
 666     cpu/zero/globals_zero.hpp                   ARCH_FLAGS            {}                   ARCH
 667     os/aix/globals_aix.hpp                      RUNTIME_OS_FLAGS      {}                   {}
 668     os/bsd/globals_bsd.hpp                      RUNTIME_OS_FLAGS      {}                   {}
 669     os/linux/globals_linux.hpp                  RUNTIME_OS_FLAGS      {}                   {}
 670     os/solaris/globals_solaris.hpp              RUNTIME_OS_FLAGS      {}                   {}
 671     os/windows/globals_windows.hpp              RUNTIME_OS_FLAGS      {}                   {}
 672     share/c1/c1_globals.hpp                     C1_FLAGS              COMPILER1            C1
 673     share/gc/epsilon/epsilon_globals.hpp        GC_EPSILON_FLAGS      INCLUDE_EPSILONGC    {}
 674     share/gc/g1/g1_globals.hpp                  GC_G1_FLAGS           INCLUDE_G1GC         {}
 675     share/gc/parallel/parallel_globals.hpp      GC_PARALLEL_FLAGS     INCLUDE_PARALLELGC   {}
 676     share/gc/serial/serial_globals.hpp          GC_SERIAL_FLAGS       INCLUDE_SERIALGC     {}
 677     share/gc/shared/gc_globals.hpp              GC_FLAGS              {}                   {}
 678     share/gc/shenandoah/shenandoah_globals.hpp  GC_SHENANDOAH_FLAGS   INCLUDE_SHENANDOAHGC {}
 679     share/gc/z/z_globals.hpp                    GC_Z_FLAGS            INCLUDE_ZGC          {}
 680     share/runtime/globals.hpp                   RUNTIME_FLAGS         {}                   {}
 681     share/jvmci/jvmci_globals.hpp               JVMCI_FLAGS           INCLUDE_JVMCI        JVMCI
 682     share/opto/c2_globals.hpp                   C2_FLAGS              COMPILER2            C2
 683 } {
 684     doit $file $macro $ifdef $common
 685 }