compile: remove '--dump', replaced by '--output-format icode'
authorJean-Sebastien Gelinas <calestar@gmail.com>
Fri, 4 Dec 2009 06:16:07 +0000 (01:16 -0500)
committerJean Privat <jean@pryen.org>
Mon, 11 Jan 2010 21:52:34 +0000 (16:52 -0500)
Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

src/nitc.nit

index fc5d7c8..d0bd86f 100644 (file)
@@ -40,13 +40,12 @@ special AbstractCompiler
        readable var _opt_bindir: OptionString = new OptionString("NIT tools directory", "--bindir")
        readable var _opt_compdir: OptionString = new OptionString("Intermediate compilation directory", "--compdir")
        readable var _opt_extension_prefix: OptionString = new OptionString("Append prefix to file extension", "-p", "--extension-prefix")
-       readable var _opt_dump: OptionBool = new OptionBool("Dump intermediate code", "--dump")
        readable var _opt_output_format: OptionEnum = new OptionEnum(["none", "C", "icode"], "The type of code we want to be generated", 1, "--output-format")
 
        init
        do
                super("nitc")
-               option_context.add_option(opt_output, opt_boost, opt_no_cc, opt_global, opt_clibdir, opt_bindir, opt_compdir, opt_extension_prefix, opt_dump, opt_global_no_STF_opt, opt_global_no_DMR_opt, opt_global_callgraph, opt_global_no_inline_get_set, opt_global_no_RFIMA, opt_global_no_out_of_init_get_test_opt, opt_output_format)
+               option_context.add_option(opt_output, opt_boost, opt_no_cc, opt_global, opt_clibdir, opt_bindir, opt_compdir, opt_extension_prefix, opt_global_no_STF_opt, opt_global_no_DMR_opt, opt_global_callgraph, opt_global_no_inline_get_set, opt_global_no_RFIMA, opt_global_no_out_of_init_get_test_opt, opt_output_format)
        end
 
        redef fun process_options
@@ -107,36 +106,8 @@ special AbstractCompiler
                end
        end
 
-       fun dump_intermediate_code(mods: Collection[MMModule])
-       do
-               for mod in mods do
-                       for c in mod.local_classes do
-                               if not c isa MMConcreteClass then continue
-                               for p in c.local_local_properties do
-                                       var routine: nullable IRoutine = null
-                                       if p isa MMAttribute then
-                                               routine = p.iroutine
-                                       else if p isa MMMethod then
-                                               routine = p.iroutine
-                                       end
-                                       if routine == null then continue
-                                       print "**** Property {p.full_name} ****"
-                                       var icd = new ICodeDumper(true, true)
-                                       routine.dump(icd)
-                                       print "**** OPTIMIZE {p.full_name} ****"
-                                       routine.optimize(mod)
-                                       icd = new ICodeDumper(true, true)
-                                       routine.dump(icd)
-                               end
-                       end
-               end
-       end
-
        redef fun perform_work(mods)
        do
-               if opt_dump.value then
-                       dump_intermediate_code(mods)
-               end
                for mod in mods do
                        var p = new Program(mod, self)
                        p.output_format = opt_output_format.value_name