Bug 840282 - OdinMonkey (sr=dmandelin)

This commit is contained in:
Luke Wagner
2013-03-15 02:29:02 -07:00
parent e3ba395974
commit df1c6eeff2
155 changed files with 11942 additions and 325 deletions

View File

@@ -12,6 +12,7 @@
#include "frontend/BytecodeEmitter.h"
#include "frontend/FoldConstants.h"
#include "frontend/NameFunctions.h"
#include "ion/AsmJS.h"
#include "vm/GlobalObject.h"
#include "jsinferinlines.h"
@@ -406,6 +407,13 @@ frontend::CompileFunctionBody(JSContext *cx, HandleFunction fun, CompileOptions
pn = fn->pn_body;
}
/*
* Do asm.js compilation once the parse tree has been fully assembled but
* before emitting since we need to know whether to emit JSOP_LINKASMJS.
*/
if (fn->pn_funbox->useAsm && !CompileAsmJS(cx, parser.tokenStream, fn, script))
return false;
if (!SetSourceMap(cx, parser.tokenStream, ss, script))
return false;