"flatten" now inlines functions

This commit is contained in:
Tom Robinson
2010-02-25 00:57:21 -08:00
parent ff43be6d7b
commit 555b83a359
2 changed files with 32 additions and 8 deletions
+5 -2
View File
@@ -22,7 +22,7 @@
var FileExecutablesForPaths = { };
function FileExecutable(/*String*/ aPath)
function FileExecutable(/*String*/ aPath, /*Executable*/ anExecutable)
{
var existingFileExecutable = FileExecutablesForPaths[aPath];
@@ -35,7 +35,10 @@ function FileExecutable(/*String*/ aPath)
executable = NULL,
extension = FILE.extension(aPath);
if (fileContents.match(/^@STATIC;/))
if (anExecutable)
executable = anExecutable;
else if (fileContents.match(/^@STATIC;/))
executable = decompile(fileContents, aPath);
else if (extension === ".j" || extension === "")