Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Commits on Aug 14, 2015
  1. Avoid code-after-return in if bodies of ES

    If and else bodies would update the result register even when the last
    statement was a return, leading to generated code containing code after
    the return statement. This code was unreachable and strictly a syntax
    error, and is now removed.
  2. Avoid generating duplicate return statements in ES

    A method ending with a return statement would result in two consecutive
    returns in the generated code, which is strictly a syntax error.
    Removing the second return has no cost, as the second is unreachable and
    always "undefined".
Commits on Jun 5, 2015
  1. Add DOM Snake sample by Tom Dupisre

    Tom Dupisre wrote this implementation of Snake using the DOM bindings
    and running in the web interface.
Commits on Mar 17, 2015
  1. Update test cases to use proper visibility

    Minigrace tests have used a deviant visibility system for historical
    reasons. This commit updates all test cases to have necessary "is
    public" annotations.
Commits on Feb 16, 2015
  1. Provide error when multi-part argument missing

    Previously, providing the argument to the second or subsequent part of a
    multi-part name on the following line without indentation led to
    misparsing and an unhelpful error message. Now, the message will suggest
    indenting the code.
Commits on Jan 22, 2015
  1. Correctly space and indent test cases

    Several test cases used infix operators without spaces or combined
    multiple statements on a single line with semicolons, which are no
    longer permitted. These are now corrected to conform to the specified
    language rules.
Commits on Dec 30, 2014
  1. Add error when "else" used in match

    The "else" clause was never part of the matching design, but it remained
    in the parser from an earlier approach. This commit adds an explicit
    error and suggestion when an "else" clause is encountered.
  2. Correct obsolete features in sample dialects

    Some sample dialects used extensions that were not part of the design or
    whose behaviour or name has changed. These dialects would not compile on
    newer versions of the system. They are now corrected.
Commits on Oct 12, 2014
  1. Add PNG resource support to ES backend

    These will create DOM img elements.
  2. Enable resource imports in C backend

    The imports module was implemented, but resource imports were not
    connected to the import keyword. This commit connects them together.
  3. Correct UTF-8 encoding of U+10000-U+1FFFFF

    These were shifting too few bits for the first byte of the encoding,
    leading to incorrect behaviour. This commit corrects the encoding.
Commits on Oct 11, 2014
  1. Allow loading resources from . in ES

    With this commit a resource import with no / characters in the path will
    be loaded from ., rather than the absolute protocol root.
  2. Enable resource imports in ES backend

    Resource imports have the form:
        import "foo/bar.ext" as name
    and use the "imports" module's "loadResource" to resolve the import path
    to an object. This module has been supported for some time, but was not
    connected to the import syntax in ES until this commit.
Commits on Oct 5, 2014
  1. Make $ a valid operator character

    The dollar sign was intended to be an operator, but had been omitted
    from the list of valid characters. This commit permits '$' to appear as
    part of any operator name.
  2. Correct ES pattern & behaviour

    Previously, the left-hand side was tested twice, causing different
    incorrect behaviour when the terms were reversed. Now, both sides will
    be tested equally.
Commits on Jul 11, 2014
  1. Make objouter test case use consistent indentation

    t098 used extra dedentation, which Minigrace permits but which is
    deprecated and not supported in other implementations. As the
    indentation was not the point of the test, this commit regularises it to
    a consistent column position.
  2. Correct behaviour of prefix> on numbers in C

    Previously, the patterns returned from this method used the wrong
    comparison operator and so were exactly wrong, on the C backend only.
  3. Add prefix< and prefix> on numbers in ES runtime

    These pattern methods were implemented in the C backend, but absent in
    the ECMAScript version. This commit rectifies that situation.
  4. Correct use of inheritance in egal test

    The egal test checked that inheritance resulted in the same object by
    inheriting from a variable, which is invalid. Instead, it now captures a
    reference to self during construction and inherits from a method.
Commits on Jul 10, 2014
  1. Add true range construction

    The numeric .. operator now produces a true (lightweight) range object,
    which is iterable but does not precreate a list of all the values.
    Ranges have their own .. operator that sets the step to use. This commit
    adds these range objects to both backends.
  2. Load genes module in JS debugging UI

    Only the old module name was loaded, causing the debugging interface to
    fail to run. This commit corrects that behaviour.
  3. Fix remaining 'constructor' field name use

    One use remained in the interactive module.
  4. Correct or remove tests of obsolete features

    There were several tests dealing with obsolete behaviour, like
    a short-circuiting && operator. These did not test the defined language
    and so can be removed now.
Commits on Jul 9, 2014
  1. Catch unterminated class/constructor bodies

    Previously, an unterminated class body would cause the parser to spin
    indefinitely at the end of the file. Now, it will raise an error and
    suggest closing the body with a brace.
  2. Add 'constructor' keyword and construct

    The constructor syntax:
        constructor foo(x, y) { ... }
    declares a method returning an object literal with the constructor body.
Commits on Jul 8, 2014
  1. Remove use of ++ on numbers in test suite

    The ++ method should only be defined on strings, but Minigrace includes
    it on many other objects. The test suite should not reflect these
    extensions, so this commit removes uses of ++ with a numeric receiver.
Commits on Jun 20, 2014
  1. Report static error on 'return' outside method

    A return statement can only appear inside a method and not at the top
    level or inside a block at the top level. Previously, this error was not
    reported statically and was only found at runtime, but it will now be
    reported as a syntax error.
  2. Avoid segfault when return in top-level block

    Previously, this top-level code:
    would cause a segfault because the return statement would try to jump to
    a pointer derived from uninitialised memory. Now, it will raise an error
    on execution saying that returning from top-level blocks is prohibited.
Commits on Jun 5, 2014
  1. Catch overlap between class parameters and methods

    While identifier resolution already caught conflicts between class
    parameters and inherited methods, it didn't do the same for methods
    declared locally. This commit adds the same check and suggestion for
    locally-declared methods as well.
  2. Remove unused "don'tBreak" field in parser

    The alarmingly-named "def don'tBreak = true" line in the parser had no
    purpose any more. It is now removed.
  3. Treat all names consistently in map()before()after

    All declared names should be treated the same as those in variable
    declarations and so be static during maps.
  4. Permit general type expressions in imports

    Previously, only a single type reference was permitted after a : in an
    import statement. Now, accept operators as well, and report correct
    errors on malformed anonymous types.
Commits on May 26, 2014
  1. Remove unused methods from lexer

    The lexer had two methods isoperatorchar and isidentifierchar that were
    obsoleted by Unicode patterns and no longer used anywhere. Removing them
    makes the lexer shorter and clearer.
  2. Remove last runOnNew instance

    A runOnNew call in xmodule was spent and unnecessary, so remove it.
Commits on May 25, 2014
  1. Correct generation of unique outer function in ES

    The uniquifying name changes missed a case used for some "outer"
    methods, causing execution to fail. This commit corrects the omission of
    an underscore.
Something went wrong with that request. Please try again.