Skip to content

Commit

Permalink
Merge pull request #355 from chadhietala/fix-allocing-for-args
Browse files Browse the repository at this point in the history
Fix allocing for arg compilation
  • Loading branch information
chadhietala authored Dec 2, 2016
2 parents a90b580 + b413ef8 commit 0cfcba0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/glimmer-runtime/lib/syntax/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,13 @@ export class NamedArgs {

compile(compiler: SymbolLookup, env: Environment, symbolTable: SymbolTable): CompiledNamedArgs {
let { keys, values } = this;
return new CompiledNamedArgs(keys, values.map(value => value.compile(compiler, env, symbolTable)));
let compiledValues = new Array(values.length);

for (let i = 0; i < compiledValues.length; i++) {
compiledValues[i] = values[i].compile(compiler, env, symbolTable);
}

return new CompiledNamedArgs(keys, compiledValues);
}
}

Expand Down

0 comments on commit 0cfcba0

Please sign in to comment.