Permalink
Commits on Mar 20, 2012
  1. Fix bug 491621 - VariableDeclaration.toSource() sometimes returns inv…

    …alid source code
    
    This adds a `isStatement()` flag to VariableDeclaration. The flag is set by the Parser depending on context, which is much more reliable than the previous solution.
    hns committed Mar 20, 2012
  2. Fix bug 737431 - Destructuring assignment doesn't work in expression …

    …closures parameters.
    
    This creates a body node for expression closures, allowing extra code for destructuring parameters to be handled properly.
    hns committed Mar 20, 2012
Commits on Feb 28, 2012
  1. Bug 689314 - Calling toSource on a parsed script containing lambda re…

    …turns extra return and semi-colon
    
    Expression closures should not emit the implicit "return" statement when toSource() is called.
    anba committed Feb 20, 2012
  2. Bug 689308 - Calling toSource on a parsed script containing array of …

    …undefined elements returns smaller array
    
    Elided elements in an array literal are represented by the EmptyExpression node. And the toSource() representation of EmptyExpression is the empty string. That means elided elements may not be visible when calling toSource() on ArrayLiteral if they appear at the end of the array literal [bug 689308]. This case is now handled in AstNode#printList(). Other callers of printList() do not pass EmptyExpression nodes to the method, so special-casing EmptyExpression is safe.
    anba committed Feb 20, 2012
  3. Bug 688021 - Calling toSource on a parsed script containing debugger …

    …omits semi-colon
    
    Although the production DebuggerStatement is handled internally as KeywordLiteral, it is in fact a statement and therefore should have the same toSource() representation as other statement, i.e. it should end with a semi-colon and a newline.
    anba committed Feb 20, 2012
  4. Bug 688018 - Calling toSource on a parsed script containing 'void' th…

    …rows exception
    
    add test case for Bug688018
    anba committed Feb 28, 2012
  5. Bug 687669 - Calling toSource on a parsed script omits any empty expr…

    …ession
    
    Add EmptyStatement node to represent a statement consisting of a single semi-colon. This node directly relates to the EmptyStatement production from ES5 (12.3). Before this patch, empty statements were represented by the EmptyExpression node which led to issues when calling toSource() [bug 687669]. Wrapping EmptyExpression with ExpressionStatement to form a statement node does not work in this case, because it interferes with the rest of the system.
    anba committed Feb 20, 2012
Commits on Feb 24, 2012
  1. Fix bug 688018 - Calling toSource on a parsed script containing 'void…

    …' throws exception
    hns committed Feb 24, 2012
  2. Define top level `android` package if running on Android.

    Also clean up code for initializing lazy loaded constructors a bit.
    hns committed Feb 24, 2012
  3. Do not close generator in finalize()

    hns committed Feb 24, 2012
Commits on Feb 15, 2012
Commits on Feb 13, 2012
  1. Fix quotes in error messages.

    hns committed Feb 13, 2012
  2. Remove trailing whitespace.

    hns committed Feb 13, 2012
Commits on Feb 10, 2012
  1. Modified the parser to accept generator expressions as function argum…

    …ents, where the beginning and closing parenthesis are not needed if the generator expression is the sole argument.
    travisennis committed with hns Feb 5, 2012
  2. Initial implementation of JS 1.8 generator expressions.

    Travis Ennis committed with hns Jan 30, 2012
Commits on Jan 27, 2012
Commits on Jan 25, 2012
  1. Fix bug 473185 JavaAdapter does not support extending classes with no…

    …n-empty constructors
    
    This changes JavaAdapter to accept additional arguments after the JavaScript
    implementation object to be passed to the super-class constructor.
    
    To avoid ambiguity when parsing arguments, JavaAdapter expects the implementation object
    (previously the last argument to JavaAdapter) to be strictly an instance of NativeObject
    (a plain JavaScript object) when called with additional constructor arguments.
    hns committed Jan 25, 2012
  2. Use InterfaceAdapter instead of JavaAdapter when using a Java interfa…

    …ce as constructor on a Dalvik VM
    hns committed Jan 25, 2012
  3. Allow InterfaceAdapter to be created from a JS object.

    Methods in the interface will be mapped to functions in the object.
    
    This also changes the logic for when interfaces with multiple methods are
    allowed to be implemented by a single JS function. Previously this was the
    case only when all methods in the interface had the same signature.
    With this commit, this condition now is that all methods in the interface
    have the same name (but possibly different  signatures).
    
    The rationale behind this change is that same name methods would
    result in the same JS function to be invoked if the implementation was
    an object, and that function has to implement overloaded methods by
    examining the arguments.
    hns committed Jan 24, 2012
Commits on Jan 24, 2012
Commits on Jan 19, 2012
  1. Implement equals(), toString(), and hashCode() in InterfaceAdapter.

     Proxy objects route these java.lang.Object methods through the invocation
     handler which resulted in a call to the JS function.
    hns committed Jan 19, 2012
  2. Fix indecision when converting NativeArray to java List or array

    From now on we prefer JS array -> java.util.List over JS array -> Java array
    because it doesn't require any conversion.
    hns committed Jan 19, 2012
Commits on Jan 10, 2012
  1. Fix test that require let/JS 1.7

    hns committed Jan 10, 2012
  2. Indentation

    hns committed Jan 10, 2012