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

« back to all changes in this revision

Viewing changes to src/settings.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:
17
17
                      //
18
18
                      // Changing this from the default of 4 is deprecated.
19
19
 
20
 
var TARGET_X86 = 1;  // For le32-unknown-nacl
21
 
var TARGET_LE32 = 0; // For i386-pc-linux-gnu
 
20
var TARGET_X86 = 0;  // For i386-pc-linux-gnu
 
21
var TARGET_LE32 = 1; // For le32-unknown-nacl
22
22
 
23
23
var CORRECT_SIGNS = 1; // Whether we make sure to convert unsigned values to signed values.
24
24
                       // Decreases performance with additional runtime checks. Might not be
36
36
                    // exceed it's size, whether all allocations (stack and static) are
37
37
                    // of positive size, etc., whether we should throw if we encounter a bad __label__, i.e.,
38
38
                    // if code flow runs into a fault
 
39
                    // ASSERTIONS == 2 gives even more runtime checks
39
40
var VERBOSE = 0; // When set to 1, will generate more verbose output during compilation.
40
41
 
41
42
var INVOKE_RUN = 1; // Whether we will run the main() function. Disable if you embed the generated
89
90
                          // typed arrays mode 2 where alignment is relevant.) In unaligned memory mode, you
90
91
                          // can run nonportable code that typically would break in JS (or on ARM for that
91
92
                          // matter, which also cannot do unaligned reads/writes), at the cost of slowness
 
93
var FORCE_ALIGNED_MEMORY = 0; // If enabled, assumes all reads and writes are fully aligned for the type they
 
94
                              // use. This is true in proper C code (no undefined behavior), but is sadly
 
95
                              // common enough that we can't do it by default. See SAFE_HEAP and CHECK_HEAP_ALIGN
 
96
                              // for ways to help find places in your code where unaligned reads/writes are done -
 
97
                              // you might be able to refactor your codebase to prevent them, which leads to
 
98
                              // smaller and faster code, or even the option to turn this flag on.
92
99
var PRECISE_I64_MATH = 1; // If enabled, i64 addition etc. is emulated - which is slow but precise. If disabled,
93
100
                          // we use the 'double trick' which is fast but incurs rounding at high values.
94
101
                          // Note that we do not catch 32-bit multiplication by default (which must be done in
136
143
 
137
144
var RESERVED_FUNCTION_POINTERS = 0; // In asm.js mode, we cannot simply add function pointers to
138
145
                                    // function tables, so we reserve some slots for them.
 
146
var ALIASING_FUNCTION_POINTERS = 0; // Whether to allow function pointers to alias if they have
 
147
                                    // a different type. This can greatly decrease table sizes
 
148
                                    // in asm.js, but can break code that compares function
 
149
                                    // pointers across different types.
139
150
 
140
151
var ASM_HEAP_LOG = 0; // Simple heap logging, like SAFE_HEAP_LOG but cheaper, and in asm.js
141
152
 
164
175
                       // want it back. A simple way to set it in C++ is
165
176
                       //   emscripten_run_script("Runtime.debug = ...;");
166
177
var SOCKET_DEBUG = 0; // Log out socket/network data transfer.
 
178
var SOCKET_WEBRTC = 0; // Select socket backend, either webrtc or websockets.
167
179
 
168
180
var OPENAL_DEBUG = 0; // Print out debugging information from our OpenAL implementation.
169
181
 
183
195
                                    // introduce silent failures, which is good).
184
196
                                    // DISABLE_EXCEPTION_CATCHING = 0 - generate code to actually catch exceptions
185
197
                                    // DISABLE_EXCEPTION_CATCHING = 1 - disable exception catching at all
186
 
                                    // DISABLE_EXCEPTION_CATCHING = 2 - disable exception catching, but enables 
 
198
                                    // DISABLE_EXCEPTION_CATCHING = 2 - disable exception catching, but enables
187
199
                                    // catching in whitelist
188
200
                                    // TODO: Make this also remove cxa_begin_catch etc., optimize relooper
189
201
                                    //       for it, etc. (perhaps do all of this as preprocessing on .ll?)
228
240
                       // they are referred to by a base plus an offset (called an indexed global),
229
241
                       // saving global variables but adding runtime overhead.
230
242
 
231
 
var EXPORTED_FUNCTIONS = ['_main']; // Functions that are explicitly exported. These functions are kept alive
 
243
var EXPORTED_FUNCTIONS = ['_main', '_malloc'];
 
244
                                    // Functions that are explicitly exported. These functions are kept alive
232
245
                                    // through LLVM dead code elimination, and also made accessible outside of
233
246
                                    // the generated code even after running closure compiler (on "Module").
234
247
                                    // Note the necessary prefix of "_".
279
292
 
280
293
var BUILD_AS_SHARED_LIB = 0; // Whether to build the code as a shared library
281
294
                             // 0 here means this is not a shared lib: It is a main file.
282
 
                             // 1 means this is a normal shared lib, load it with dlopen().
 
295
                             // All shared library options (1 and 2) are currently deprecated XXX
 
296
                             // 1 means this is a normal shared lib, load it with dlopen()
283
297
                             // 2 means this is a shared lib that will be linked at runtime,
284
298
                             //   which means it will insert its functions into
285
299
                             //   the global namespace. See STATIC_LIBS_TO_LOAD.