rm push/pop
This commit is contained in:
@@ -543,7 +543,7 @@ if (_init != null && _init.native_mode)
|
||||
if (args != null && (_init == null || !_init.program)) {
|
||||
_program = args[0]
|
||||
while (_j < length(args)) {
|
||||
push(_user_args, args[_j])
|
||||
_user_args[] = args[_j]
|
||||
_j = _j + 1
|
||||
}
|
||||
if (_init == null) {
|
||||
@@ -945,7 +945,7 @@ $_.start = function start(cb, program) {
|
||||
no_warn: _no_warn,
|
||||
}
|
||||
greeters[id] = cb
|
||||
push(message_queue, { startup })
|
||||
message_queue[] = { startup }
|
||||
}
|
||||
|
||||
$_.receiver = function receiver(fn) {
|
||||
@@ -1470,7 +1470,7 @@ function populate_actor_addresses(obj, e) {
|
||||
|
||||
|
||||
function actor_prep(actor, send) {
|
||||
push(message_queue, {actor,send});
|
||||
message_queue[] = {actor,send};
|
||||
}
|
||||
|
||||
// Send a message immediately without queuing
|
||||
|
||||
@@ -1499,18 +1499,18 @@ Shop.use = function use(path, _pkg_ctx) {
|
||||
if (use_cache[info.cache_key])
|
||||
return use_cache[info.cache_key]
|
||||
|
||||
push(use_stack, _use_entry)
|
||||
use_stack[] = _use_entry
|
||||
var _use_result = null
|
||||
var _use_ok = false
|
||||
var _load = function() {
|
||||
_use_result = execute_module(info)
|
||||
_use_ok = true
|
||||
} disruption {
|
||||
pop(use_stack)
|
||||
use_stack[]
|
||||
disrupt
|
||||
}
|
||||
_load()
|
||||
pop(use_stack)
|
||||
use_stack[]
|
||||
use_cache[info.cache_key] = _use_result
|
||||
return _use_result
|
||||
}
|
||||
@@ -1923,7 +1923,7 @@ Shop.sync_with_deps = function(pkg, opts) {
|
||||
arrfor(array(deps), function(alias) {
|
||||
dep_locator = deps[alias]
|
||||
if (!visited[dep_locator])
|
||||
push(queue, dep_locator)
|
||||
queue[] = dep_locator
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -2062,7 +2062,7 @@ function get_package_scripts(package)
|
||||
for (i = 0; i < length(files); i++) {
|
||||
file = files[i]
|
||||
if (ends_with(file, '.cm') || ends_with(file, '.ce')) {
|
||||
push(scripts, file)
|
||||
scripts[] = file
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2084,7 +2084,7 @@ function extract_use_calls(source) {
|
||||
if (end == null) end = search(text(source, start), '"')
|
||||
if (end != null) {
|
||||
arg = text(source, start, start + end)
|
||||
push(uses, arg)
|
||||
uses[] = arg
|
||||
}
|
||||
idx = search(text(source, idx + 4), "use(")
|
||||
if (idx != null) idx = idx + (source.length - (source.length - idx))
|
||||
@@ -2107,7 +2107,7 @@ Shop.build_package_scripts = function(package)
|
||||
resolve_mod_fn(pkg_dir + '/' + script, package)
|
||||
ok = ok + 1
|
||||
} disruption {
|
||||
push(errors, script)
|
||||
errors[] = script
|
||||
log.build(" compile error: " + package + '/' + script)
|
||||
}
|
||||
_try()
|
||||
@@ -2160,14 +2160,14 @@ Shop.audit_use_resolution = function(package) {
|
||||
end = search(rest, quote)
|
||||
if (end == null) continue
|
||||
arg = text(rest, 0, end)
|
||||
if (length(arg) > 0) push(uses, arg)
|
||||
if (length(arg) > 0) uses[] = arg
|
||||
rest = text(rest, end + 1)
|
||||
}
|
||||
|
||||
arrfor(uses, function(mod) {
|
||||
var _resolve = function() {
|
||||
info = resolve_module_info(mod, package)
|
||||
if (!info) push(unresolved, {script: script, module: mod})
|
||||
if (!info) unresolved[] = {script: script, module: mod}
|
||||
} disruption {}
|
||||
_resolve()
|
||||
})
|
||||
@@ -2418,7 +2418,7 @@ Shop.audit_packages = function() {
|
||||
if (package == 'core') return
|
||||
if (fd.is_dir(package)) return
|
||||
if (fetch_remote_hash(package)) return
|
||||
push(bad, package)
|
||||
bad[] = package
|
||||
})
|
||||
|
||||
return bad
|
||||
|
||||
Reference in New Issue
Block a user