Remove runtime call to assertObject for import statements

Fixes #1115
I read that but it does not help me understand why/how parseOptions are
different from transformOptions.


On Tue, Jun 24, 2014 at 7:17 AM, Erik Arvidsson <notifications@github.com>
wrote:

> In src/codegeneration/ModuleTransformer.js:
>
> >
> >      var binding = this.transformAny(tree.importClause);
> >      var initializer = this.transformAny(tree.
> moduleSpecifier);
> >
> > -    return createVariableStatement(VAR, binding, initializer);
> > +    var varStatement = createVariableStatement(VAR, binding, initializer);
> > +
> > +    // If destructuing patterns are kept in the source, keep this as is,
> > +    // otherwise transform it here to remove the need for assertObject.
> > +    if (transformOptions.destructuring || !parseOptions.destructuring) {
>
> There is a paragraph about this in options.js
>
> https://github.com/google/traceur-compiler/blob/master/src/options.js#L15
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/google/traceur-compiler/pull/1117/files#r14131166>.
>