diff options
author | Lars Schneider <lars.schneider@autodesk.com> | 2012-09-25 14:44:54 +0200 |
---|---|---|
committer | Lars Schneider <lars.schneider@autodesk.com> | 2012-09-26 19:30:19 +0200 |
commit | 0c33345f226af403d15f5f83811488aead85b71b (patch) | |
tree | cc1787e201bb3184fb901500e94175f22d322c6a /src/modules.js | |
parent | c74da50989604747e3174429d0538f668b4ff7e7 (diff) |
Add emcc option "--split <size>" to split javascript file.
Splits the resulting javascript file into pieces to ease debugging.
This option only works if Javascript is generated (target -o <name>.js).
Files with function declarations must be loaded before main file upon execution.
Without "-g" option:
Creates files with function declarations up to the given size with the suffix "_functions.partxxx.js" and a main file with the suffix ".js".
With "-g" option:
Recreates the directory structure of the C source files and stores function declarations in their respective C files with the suffix ".js". If such a file exceeds the given size, files with the suffix ".partxxx.js" are created. The main file resides in the base directory and has the suffix ".js".
Diffstat (limited to 'src/modules.js')
-rw-r--r-- | src/modules.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules.js b/src/modules.js index 0f3b483b..cf1b072e 100644 --- a/src/modules.js +++ b/src/modules.js @@ -127,6 +127,11 @@ var Debugging = { this.llvmLineToSourceFile[lineNum] + '"' : ''; }, + getAssociatedSourceFile: function(lineNum) { + if (!this.on) return null; + return lineNum in this.llvmLineToSourceLine ? this.llvmLineToSourceFile[lineNum] : null; + }, + getIdentifier: function(lineNum) { if (!this.on) return null; if (lineNum === undefined) { |