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

« back to all changes in this revision

Viewing changes to src/preamble_sharedlib.js

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// === Auto-generated preamble library stuff ===
 
2
 
 
3
//========================================
 
4
// Runtime essentials
 
5
//========================================
 
6
 
 
7
function callRuntimeCallbacks(callbacks) {
 
8
  while(callbacks.length > 0) {
 
9
    var callback = callbacks.pop();
 
10
    var func = callback.func;
 
11
    if (typeof func === 'number') {
 
12
      func = FUNCTION_TABLE[func];
 
13
    }
 
14
    func(callback.arg === undefined ? null : callback.arg);
 
15
  }
 
16
}
 
17
 
 
18
var __ATINIT__ = []; // functions called during startup
 
19
 
 
20
function initRuntime() {
 
21
  callRuntimeCallbacks(__ATINIT__);
 
22
}
 
23
 
 
24
// === Body ===
 
25