~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to src/postamble.js

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-06-11 15:45:24 UTC
  • mfrom: (1.2.1) (2.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130611154524-rppb3w6tixlegv4n
Tags: 1.4.7~20130611~a1eb425-1
* New snapshot release
* Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
// === Auto-generated postamble setup entry stuff ===
3
3
 
4
 
Module.callMain = function callMain(args) {
 
4
Module['callMain'] = function callMain(args) {
5
5
  assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on __ATMAIN__)');
6
6
  assert(!Module['preRun'] || Module['preRun'].length == 0, 'cannot call main when preRun functions remain to be called');
7
7
 
15
15
      argv.push(0);
16
16
    }
17
17
  }
18
 
  var argv = [allocate(intArrayFromString("/bin/this.program"), 'i8', ALLOC_STATIC) ];
 
18
  var argv = [allocate(intArrayFromString("/bin/this.program"), 'i8', ALLOC_NORMAL) ];
19
19
  pad();
20
20
  for (var i = 0; i < argc-1; i = i + 1) {
21
 
    argv.push(allocate(intArrayFromString(args[i]), 'i8', ALLOC_STATIC));
 
21
    argv.push(allocate(intArrayFromString(args[i]), 'i8', ALLOC_NORMAL));
22
22
    pad();
23
23
  }
24
24
  argv.push(0);
25
 
  argv = allocate(argv, 'i32', ALLOC_STATIC);
 
25
  argv = allocate(argv, 'i32', ALLOC_NORMAL);
26
26
 
27
27
#if BENCHMARK
28
28
  var start = Date.now();
84
84
    var ret = 0;
85
85
    calledRun = true;
86
86
    if (Module['_main'] && shouldRunNow) {
87
 
      ret = Module.callMain(args);
 
87
      ret = Module['callMain'](args);
88
88
      if (!Module['noExitRuntime']) {
89
89
        exitRuntime();
90
90
      }
104
104
      setTimeout(function() {
105
105
        Module['setStatus']('');
106
106
      }, 1);
107
 
      doRun();
 
107
      if (!ABORT) doRun();
108
108
    }, 1);
109
109
    return 0;
110
110
  } else {