Forgot your password?
typodupeerror
GNU is Not Unix Programming

MELT, a GCC Compiler Plugin Framework, Reaches 1.0 58

Posted by Unknown Lamer
from the every-c-program-ends-up-emacs dept.
karijes writes with news that the Middle End Lisp Translator extension for GCC has hit 1.0: "MELT is a high-level domain specific language for extending, customizing and exploring the GNU Compiler Collection. It targets advanced GCC users, giving them ability to hook on almost any GCC stage during compilation or interpretation phases. This release brings a lot of new things." New features include defmacro and changes to the antiquote operator.
This discussion has been archived. No new comments can be posted.

MELT, a GCC Compiler Plugin Framework, Reaches 1.0

Comments Filter:
  • by Thanshin (1188877) on Wednesday October 30, 2013 @01:11PM (#45282319)

    In other News, MetaMELT's v0.3 was released this last weekend.

    "MetaMELT a meta-level tool for the customization of MELT's dynamic pattern matching paradigm, allowing the refinement of the GCC's internal data management during the pre-hooking phase."

    • I believe that defmacro already covers that.
      • by Thanshin (1188877) on Wednesday October 30, 2013 @02:03PM (#45283089)

        I believe that defmacro already covers that.

        Defmacro defines that, but, who defines defmacro?

        Or, as MetaMELT lead designer and "guru" said himself: "Quis definiet ipsos definieentis?"

        • Defmacro defines that, but, who defines defmacro?

          In most Lisp implementations, given that defmacro is a macro, defmacro is - quite naturally! - defined in a defmacro. In ClozureCL, for example, it starts as (defmacro defmacro (name arglist &body body &environment env) <some-convoluted-body> )

          Or, as MetaMELT lead designer and "guru" said himself: "Quis definiet ipsos definieentis?"

          Excavans testudines ad infinitum patentes perspicies.

          • But how can you define defmacro using defmacro before you have defined defmacro? (And afterwards, it wouldn't make sense because it already is defined).

        • by forkazoo (138186)

          Defmacro defines that, but, who defines defmacro?

          Templates.

      • by Darinbob (1142669)

        I always preferred the defwhopper flavor.

    • Re: (Score:2, Interesting)

      by basiles (626992)
      I'm the main author of MELT [gcc-melt.org] (the GCC plugin). I am not aware of any related software named MetaMELT. Do you have any references please? Regards.
      Basile STARYNKEVITCH [starynkevitch.net] email: basile at starynkevitch dot net
    • PattyMELT 0.1, a fine, greasy affair consisting of a hamburger patty, slice of cheddar and sautéed onions on rye, was released at 12:43 PM at Joe's Diner on Route 7 to Bob Jenkins, a local plumber. This was Bob's 483'rd iteration on the project.
      Asked what he thought the requirements might be to get the project up to a 0.2 version, he replied: "mmmrphWha?mnomnom'".
      Asked again where he thought PattyMELT could use some tidying to improve its utility, he said "(gulp) Are you one of them pencil-necks from over at the college? Buzz off, before I lay a pipe wrench alongside your little pansy face. Can't a man eat?"

  • Not too long ago, I was looking into various game engines and one feature I saw was the ability to modify semi-constant values during runtime to facilitate rapid development. For example, being able to modify the position of a barrel in a scene to just the right location and then make those changes permanent.

    I wondered why this couldn't be implemented as a standalone library to allow any type of program to do this kind of thing. I envisioned a compiler plugin that would read constant values from some files

    • That sounds like a non-problem. Why don't you simply read the values from a file? Watching the file for changes and reloading it also shouldn't be difficult. Apache httpd and other daemons have been doing this since the last ice age or so.
    • Uh, that's what 3D modeling tools are for... Using a compiler in place of a level editor is a fool's errand.

    • by Jmc23 (2353706)
      It's spelt Lisp.
    • I think you want "Common Lisp".

  • by shutdown -p now (807394) on Thursday October 31, 2013 @03:37PM (#45293515) Journal

    As I recall, Stallman has specifically stated that GCC is not extensible this way out of the box, because he didn't want the dirty proprietary plugins piggybacking on top of the GPL'd frontend & backend. He said it's why the entire protocol between front-end and back-end is deliberately not standardized. It's also why the license specifically excludes the intermediate output from the usual "output is not covered by GPL" exemption:

    "Target Code" refers to output from any compiler for a real or virtual
    target processor architecture, in executable form or suitable for
    input to an assembler, loader, linker and/or execution
    phase. Notwithstanding that, Target Code does not include data in any
    format that is used as a compiler intermediate representation, or used
    for producing a compiler intermediate representation.

    The "Compilation Process" transforms code entirely represented in
    non-intermediate languages designed for human-written code, and/or in
    Java Virtual Machine byte code, into Target Code. Thus, for example,
    use of source code generators and preprocessors need not be considered
    part of the Compilation Process, since the Compilation Process can be
    understood as starting with the output of the generators or
    preprocessors.

    A Compilation Process is "Eligible" if it is done using GCC, alone or
    with other GPL-compatible software, or if it is done without using any
    work based on GCC. For example, using non-GPL-compatible Software to
    optimize any GCC intermediate representations would not qualify as an
    Eligible Compilation Process.

    You have permission to propagate a work of Target Code formed by
    combining the Runtime Library with Independent Modules, even if such
    propagation would otherwise violate the terms of GPLv3, provided that
    all Target Code was generated by Eligible Compilation Processes
    . You
    may then convey such a combination under terms of your choice,
    consistent with the licensing of the Independent Modules.

You scratch my tape, and I'll scratch yours.

Working...