Merge pull request #3425 from waywardmonkeys/remove-NAMED_GLOBALS
Remove most of NAMED_GLOBALS.
This commit is contained in:
Коммит
8b1504bf91
1
emcc
1
emcc
|
@ -889,7 +889,6 @@ try:
|
|||
assert shared.Settings.SAFE_HEAP in [0, 1], 'safe heap must be 0 or 1 in fastcomp'
|
||||
assert shared.Settings.UNALIGNED_MEMORY == 0, 'forced unaligned memory not supported in fastcomp'
|
||||
assert shared.Settings.FORCE_ALIGNED_MEMORY == 0, 'forced aligned memory is not supported in fastcomp'
|
||||
assert shared.Settings.NAMED_GLOBALS == 0, 'named globals not supported in fastcomp'
|
||||
assert shared.Settings.PGO == 0, 'pgo not supported in fastcomp'
|
||||
assert shared.Settings.USE_TYPED_ARRAYS == 2, 'altering USE_TYPED_ARRAYS is not supported'
|
||||
assert shared.Settings.QUANTUM_SIZE == 4, 'altering the QUANTUM_SIZE is not supported'
|
||||
|
|
|
@ -170,10 +170,6 @@ if (NO_BROWSER) {
|
|||
DEFAULT_LIBRARY_FUNCS_TO_INCLUDE = DEFAULT_LIBRARY_FUNCS_TO_INCLUDE.filter(function(func) { return func !== '$Browser' });
|
||||
}
|
||||
|
||||
// Settings sanity checks
|
||||
|
||||
assert(!(!NAMED_GLOBALS && BUILD_AS_SHARED_LIB), 'shared libraries must have named globals');
|
||||
|
||||
// Output some info and warnings based on settings
|
||||
|
||||
if (VERBOSE) printErr('VERBOSE is on, this generates a lot of output and can slow down compilation');
|
||||
|
|
|
@ -349,7 +349,7 @@ function isIndexableGlobal(ident) {
|
|||
}
|
||||
|
||||
function makeGlobalUse(ident) {
|
||||
if (!NAMED_GLOBALS && isIndexableGlobal(ident)) {
|
||||
if (isIndexableGlobal(ident)) {
|
||||
var index = Variables.indexedGlobals[ident];
|
||||
if (index === undefined) {
|
||||
// we are accessing this before we index globals, likely from the library. mark as unindexable
|
||||
|
|
|
@ -280,10 +280,6 @@ var NO_BROWSER = 0; // If set, disables building in browser support using the Br
|
|||
// just doing pure computation in a library, and don't need any browser capabilities like a main loop
|
||||
// (emscripten_set_main_loop), or setTimeout, etc.
|
||||
|
||||
var NAMED_GLOBALS = 0; // If 1, we use global variables for globals. Otherwise
|
||||
// they are referred to by a base plus an offset (called an indexed global),
|
||||
// saving global variables but adding runtime overhead.
|
||||
|
||||
var NODE_STDOUT_FLUSH_WORKAROUND = 1; // Whether or not to work around node issues with not flushing stdout. This
|
||||
// can cause unnecessary whitespace to be printed.
|
||||
|
||||
|
|
|
@ -910,18 +910,11 @@ base align: 0, 0, 0, 0'''])
|
|||
test_path = path_from_root('tests', 'core', 'test_strings')
|
||||
src, output = (test_path + s for s in ('.in', '.out'))
|
||||
|
||||
for named in (0, 1):
|
||||
print named
|
||||
self.do_run_from_file(src, output, ['wowie', 'too', '74'])
|
||||
|
||||
# TODO: test only worked in non-fastcomp
|
||||
if named: continue
|
||||
|
||||
Settings.NAMED_GLOBALS = named
|
||||
self.do_run_from_file(src, output, ['wowie', 'too', '74'])
|
||||
|
||||
if self.emcc_args == []:
|
||||
gen = open(self.in_dir('src.cpp.o.js')).read()
|
||||
assert ('var __str1;' in gen) == named
|
||||
if self.emcc_args == []:
|
||||
gen = open(self.in_dir('src.cpp.o.js')).read()
|
||||
assert ('var __str1;' in gen) == named
|
||||
|
||||
def test_strcmp_uni(self):
|
||||
test_path = path_from_root('tests', 'core', 'test_strcmp_uni')
|
||||
|
|
Загрузка…
Ссылка в новой задаче