update cli docs and fix cli scripts with new syntax

This commit is contained in:
2026-02-14 22:24:32 -06:00
parent eee06009b9
commit 860632e0fa
36 changed files with 10822 additions and 10585 deletions

33
add.ce
View File

@@ -13,6 +13,10 @@ var fd = use('fd')
var locator = null
var alias = null
var resolved = null
var parts = null
var cwd = null
var build_target = null
array(args, function(arg) {
if (arg == '--help' || arg == '-h') {
@@ -41,7 +45,7 @@ if (!locator) {
// Resolve relative paths to absolute paths
if (locator == '.' || starts_with(locator, './') || starts_with(locator, '../') || fd.is_dir(locator)) {
var resolved = fd.realpath(locator)
resolved = fd.realpath(locator)
if (resolved) {
locator = resolved
}
@@ -50,7 +54,7 @@ if (locator == '.' || starts_with(locator, './') || starts_with(locator, '../')
// Generate default alias from locator
if (!alias) {
// Use the last component of the locator as alias
var parts = array(locator, '/')
parts = array(locator, '/')
alias = parts[length(parts) - 1]
// Remove any version suffix
if (search(alias, '@') != null) {
@@ -59,7 +63,7 @@ if (!alias) {
}
// Check we're in a package directory
var cwd = fd.realpath('.')
cwd = fd.realpath('.')
if (!fd.is_file(cwd + '/cell.toml')) {
log.error("Not in a package directory (no cell.toml found)")
$stop()
@@ -68,16 +72,17 @@ if (!fd.is_file(cwd + '/cell.toml')) {
log.console("Adding " + locator + " as '" + alias + "'...")
// Add to local project's cell.toml
try {
var _add_dep = function() {
pkg.add_dependency(null, locator, alias)
log.console(" Added to cell.toml")
} catch (e) {
log.error("Failed to update cell.toml: " + e)
} disruption {
log.error("Failed to update cell.toml")
$stop()
}
_add_dep()
// Install to shop
try {
var _install = function() {
shop.get(locator)
shop.extract(locator)
@@ -85,18 +90,20 @@ try {
shop.build_package_scripts(locator)
// Build C code if any
try {
var target = build.detect_host_target()
build.build_dynamic(locator, target, 'release')
} catch (e) {
var _build_c = function() {
build_target = build.detect_host_target()
build.build_dynamic(locator, build_target, 'release')
} disruption {
// Not all packages have C code
}
_build_c()
log.console(" Installed to shop")
} catch (e) {
log.error("Failed to install: " + e)
} disruption {
log.error("Failed to install")
$stop()
}
_install()
log.console("Added " + alias + " (" + locator + ")")

View File

@@ -10,7 +10,7 @@
["add", 3, 2, 1, 7, 37],
["access", 4, "_use", 7, 44],
["add", 5, 3, 4, 7, 44],
["get", 7, 20, 1, 7, 10],
["get", 7, 23, 1, 7, 10],
["frame", 8, 7, 1, 7, 10],
["null", 9, 7, 10],
["setarg", 8, 0, 9, 7, 10],
@@ -29,7 +29,7 @@
"nr_slots": 17,
"nr_close_slots": 0,
"instructions": [
["get", 3, 21, 1, 21, 15],
["get", 3, 19, 1, 21, 15],
["is_proxy", 4, 3, 21, 15],
["jump_false", 4, "record_path_0", 21, 15],
["null", 5, 21, 15],
@@ -157,7 +157,7 @@
["access", 6, "/build", 31, 25],
["add", 7, 5, 6, 31, 25],
["move", 1, 7, 31, 25],
["get", 9, 17, 1, 32, 8],
["get", 9, 15, 1, 32, 8],
["is_proxy", 10, 9, 32, 8],
["jump_false", 10, "record_path_8", 32, 8],
["null", 11, 32, 8],
@@ -179,7 +179,7 @@
"call_done_9",
"_nop_bl_2",
["jump_true", 8, "if_else_6", 32, 8],
["get", 19, 17, 1, 33, 5],
["get", 19, 15, 1, 33, 5],
["is_proxy", 20, 19, 33, 5],
["jump_false", 20, "record_path_10", 33, 5],
["null", 21, 33, 5],
@@ -215,10 +215,10 @@
"nr_slots": 19,
"nr_close_slots": 0,
"instructions": [
["get", 3, 15, 1, 40, 7],
["get", 3, 17, 1, 40, 7],
["load_dynamic", 4, 3, 1, 40, 17],
["jump_false", 4, "if_else_12", 40, 17],
["get", 5, 15, 1, 41, 12],
["get", 5, 17, 1, 41, 12],
["load_dynamic", 6, 5, 1, 41, 22],
["return", 6, 41, 22],
"_nop_ur_1",
@@ -244,14 +244,14 @@
["setarg", 11, 2, 7, 42, 26],
["setarg", 11, 3, 8, 42, 26],
["invoke", 11, 9, 42, 26],
["get", 14, 22, 1, 42, 16],
["get", 14, 12, 1, 42, 16],
["frame", 15, 14, 1, 42, 16],
["null", 16, 42, 16],
["setarg", 15, 0, 16, 42, 16],
["setarg", 15, 1, 9, 42, 16],
["invoke", 15, 13, 42, 16],
["move", 2, 13, 42, 16],
["get", 17, 15, 1, 43, 3],
["get", 17, 17, 1, 43, 3],
["store_dynamic", 17, 2, 1, 43, 13],
["return", 2, 44, 10],
"_nop_ur_2",
@@ -288,7 +288,7 @@
["null", 7, 52, 16],
["null", 5, 53, 20],
["null", 6, 54, 19],
["get", 16, 17, 1, 55, 7],
["get", 16, 15, 1, 55, 7],
["is_proxy", 17, 16, 55, 7],
["jump_false", 17, "record_path_16", 55, 7],
["null", 18, 55, 7],
@@ -309,7 +309,7 @@
["invoke", 23, 15, 55, 7],
"call_done_17",
["jump_false", 15, "if_else_14", 55, 7],
["get", 25, 17, 1, 56, 18],
["get", 25, 15, 1, 56, 18],
["is_proxy", 26, 25, 56, 18],
["jump_false", 26, "record_path_18", 56, 18],
["null", 27, 56, 18],
@@ -330,14 +330,14 @@
["invoke", 32, 24, 56, 18],
"call_done_19",
["move", 3, 24, 56, 18],
["get", 34, 10, 1, 57, 12],
["get", 34, 8, 1, 57, 12],
["frame", 35, 34, 1, 57, 12],
["null", 36, 57, 12],
["setarg", 35, 0, 36, 57, 12],
["setarg", 35, 1, 3, 57, 12],
["invoke", 35, 33, 57, 12],
["move", 4, 33, 57, 12],
["get", 38, 14, 1, 58, 14],
["get", 38, 13, 1, 58, 14],
["frame", 39, 38, 1, 58, 14],
["null", 40, 58, 14],
["setarg", 39, 0, 40, 58, 14],
@@ -346,7 +346,7 @@
["move", 7, 37, 58, 14],
["move", 41, 7, 59, 9],
["jump_false", 41, "and_end_22", 59, 9],
["get", 43, 17, 1, 59, 19],
["get", 43, 15, 1, 59, 19],
["is_proxy", 44, 43, 59, 19],
["jump_false", 44, "record_path_23", 59, 19],
["null", 45, 59, 19],
@@ -369,7 +369,7 @@
["move", 41, 42, 59, 19],
"and_end_22",
["jump_false", 41, "if_else_20", 59, 19],
["get", 52, 17, 1, 60, 24],
["get", 52, 15, 1, 60, 24],
["is_proxy", 53, 52, 60, 24],
["jump_false", 53, "record_path_25", 60, 24],
["null", 54, 60, 24],
@@ -446,12 +446,12 @@
["invoke", 70, 68, 63, 17],
["move", 6, 68, 63, 17],
["jump_false", 7, "if_else_27", 64, 9],
["get", 73, 2, 1, 65, 7],
["get", 73, 1, 1, 65, 7],
["frame", 74, 73, 0, 65, 7],
["null", 75, 65, 7],
["setarg", 74, 0, 75, 65, 7],
["invoke", 74, 72, 65, 7],
["get", 77, 17, 1, 66, 7],
["get", 77, 15, 1, 66, 7],
["is_proxy", 78, 77, 66, 7],
["jump_false", 78, "record_path_29", 66, 7],
["null", 79, 66, 7],
@@ -591,17 +591,17 @@
["push", 39, 30, 99, 40],
["push", 39, 33, 99, 40],
["push", 39, 36, 99, 40],
["move", 6, 39, 99, 40],
["move", 5, 39, 99, 40],
["array", 40, 0, 101, 15],
["move", 4, 40, 101, 15],
["move", 3, 40, 101, 15],
["access", 7, 0, 102, 12],
["null", 1, 103, 17],
["null", 8, 104, 20],
["null", 5, 105, 17],
["null", 3, 106, 23],
["null", 4, 105, 17],
["null", 6, 106, 23],
["null", 2, 107, 15],
"while_start_31",
["length", 41, 6, 108, 22],
["length", 41, 5, 108, 22],
["is_int", 43, 7, 108, 22],
["jump_false", 43, "rel_ni_33", 108, 22],
"_nop_tc_1",
@@ -626,7 +626,7 @@
["disrupt", 108, 22],
"rel_done_35",
["jump_false", 42, "while_end_32", 108, 22],
["load_dynamic", 45, 6, 7, 109, 21],
["load_dynamic", 45, 5, 7, 109, 21],
["move", 2, 45, 109, 21],
[
"access",
@@ -660,7 +660,7 @@
["load_field", 54, 2, "mcode", 111, 36],
["add", 55, 53, 54, 111, 36],
["move", 8, 55, 111, 36],
["get", 57, 17, 1, 112, 9],
["get", 57, 15, 1, 112, 9],
["is_proxy", 58, 57, 112, 9],
["jump_false", 58, "record_path_40", 112, 9],
["null", 59, 112, 9],
@@ -682,7 +682,7 @@
"call_done_41",
["move", 65, 56, 112, 9],
["jump_false", 65, "and_end_39", 112, 9],
["get", 67, 17, 1, 112, 35],
["get", 67, 15, 1, 112, 35],
["is_proxy", 68, 67, 112, 35],
["jump_false", 68, "record_path_42", 112, 35],
["null", 69, 112, 35],
@@ -705,7 +705,7 @@
["move", 65, 66, 112, 35],
"and_end_39",
["jump_false", 65, "if_else_37", 112, 35],
["get", 76, 17, 1, 113, 23],
["get", 76, 15, 1, 113, 23],
["is_proxy", 77, 76, 113, 23],
["jump_false", 77, "record_path_44", 113, 23],
["null", 78, 113, 23],
@@ -725,8 +725,8 @@
["setarg", 83, 1, 8, 113, 23],
["invoke", 83, 75, 113, 23],
"call_done_45",
["move", 3, 75, 113, 23],
["get", 85, 17, 1, 114, 17],
["move", 6, 75, 113, 23],
["get", 85, 15, 1, 114, 17],
["is_proxy", 86, 85, 114, 17],
["jump_false", 86, "record_path_46", 114, 17],
["null", 87, 114, 17],
@@ -746,9 +746,9 @@
["setarg", 92, 1, 1, 114, 17],
["invoke", 92, 84, 114, 17],
"call_done_47",
["move", 5, 84, 114, 17],
["load_field", 93, 5, "mtime", 115, 11],
["load_field", 94, 3, "mtime", 115, 27],
["move", 4, 84, 114, 17],
["load_field", 93, 4, "mtime", 115, 11],
["load_field", 94, 6, "mtime", 115, 27],
["is_int", 96, 93, 115, 27],
["jump_false", 96, "rel_ni_50", 115, 27],
["is_int", 97, 94, 115, 27],
@@ -774,9 +774,9 @@
"rel_done_52",
["jump_false", 95, "if_else_48", 115, 27],
["load_field", 98, 2, "src", 116, 21],
["is_array", 99, 4, 116, 21],
["is_array", 99, 3, 116, 21],
["jump_false", 99, "push_err_54", 116, 21],
["push", 4, 98, 116, 21],
["push", 3, 98, 116, 21],
["jump", "push_done_55", 116, 21],
"push_err_54",
["disrupt", 116, 21],
@@ -792,7 +792,7 @@
["move", 7, 101, 119, 15],
["jump", "while_start_31", 119, 15],
"while_end_32",
["length", 102, 4, 121, 14],
["length", 102, 3, 121, 14],
["access", 103, 0, 121, 23],
"_nop_tc_6",
"_nop_tc_7",
@@ -834,7 +834,7 @@
["frame", 111, 110, 2, 122, 48],
["null", 112, 122, 48],
["setarg", 111, 0, 112, 122, 48],
["setarg", 111, 1, 4, 122, 48],
["setarg", 111, 1, 3, 122, 48],
["setarg", 111, 2, 108, 122, 48],
["invoke", 111, 109, 122, 48],
["add", 113, 107, 109, 122, 48],
@@ -888,7 +888,7 @@
"nr_slots": 96,
"nr_close_slots": 0,
"instructions": [
["get", 14, 3, 1, 130, 20],
["get", 14, 2, 1, 130, 20],
["frame", 15, 14, 2, 130, 20],
["null", 16, 130, 20],
["setarg", 15, 0, 16, 130, 20],
@@ -897,8 +897,8 @@
["invoke", 15, 13, 130, 20],
["move", 4, 13, 130, 20],
["load_field", 17, 4, "tokens", 131, 23],
["get", 18, 3, 1, 131, 57],
["get", 20, 5, 1, 131, 13],
["get", 18, 2, 1, 131, 57],
["get", 20, 21, 1, 131, 13],
["frame", 21, 20, 4, 131, 13],
["null", 22, 131, 13],
["setarg", 21, 0, 22, 131, 13],
@@ -907,15 +907,15 @@
["setarg", 21, 3, 2, 131, 13],
["setarg", 21, 4, 18, 131, 13],
["invoke", 21, 19, 131, 13],
["move", 10, 19, 131, 13],
["move", 11, 19, 131, 13],
["access", 7, 0, 132, 12],
["access", 11, -1, 133, 19],
["access", 9, -1, 133, 19],
["null", 5, 134, 18],
["null", 12, 135, 11],
["null", 3, 136, 13],
["null", 6, 137, 14],
["null", 8, 138, 13],
["load_field", 23, 10, "errors", 139, 20],
["load_field", 23, 11, "errors", 139, 20],
["null", 24, 139, 34],
["is_identical", 25, 23, 24, 139, 34],
["jump_true", 25, "ne_nid_64", 139, 34],
@@ -963,7 +963,7 @@
"ne_done_63",
["move", 28, 25, 139, 34],
["jump_false", 28, "and_end_62", 139, 34],
["load_field", 29, 10, "errors", 139, 49],
["load_field", 29, 11, "errors", 139, 49],
["length", 30, 29, 139, 49],
["access", 31, 0, 139, 63],
"_nop_tc_7",
@@ -991,10 +991,10 @@
"rel_done_73",
["move", 28, 32, 139, 63],
"and_end_62",
["move", 9, 28, 139, 63],
["jump_false", 9, "if_else_75", 140, 7],
["move", 10, 28, 139, 63],
["jump_false", 10, "if_else_75", 140, 7],
"while_start_77",
["load_field", 35, 10, "errors", 141, 24],
["load_field", 35, 11, "errors", 141, 24],
["length", 36, 35, 141, 24],
["is_int", 38, 7, 141, 24],
["jump_false", 38, "rel_ni_79", 141, 24],
@@ -1020,7 +1020,7 @@
["disrupt", 141, 24],
"rel_done_81",
["jump_false", 37, "while_end_78", 141, 24],
["load_field", 40, 10, "errors", 142, 11],
["load_field", 40, 11, "errors", 142, 11],
["load_dynamic", 41, 40, 7, 142, 22],
["move", 12, 41, 142, 22],
["load_field", 42, 12, "message", 143, 13],
@@ -1075,7 +1075,7 @@
"ne_done_86",
["move", 48, 45, 146, 18],
["jump_true", 48, "or_end_85", 146, 18],
["is_identical", 49, 6, 11, 146, 38],
["is_identical", 49, 6, 9, 146, 38],
["jump_true", 49, "ne_nid_95", 146, 38],
["jump", "ne_ni_96", 146, 38],
"ne_nid_95",
@@ -1084,37 +1084,37 @@
"ne_ni_96",
["is_int", 50, 6, 146, 38],
["jump_false", 50, "ne_nn_97", 146, 38],
["is_int", 51, 11, 146, 38],
["is_int", 51, 9, 146, 38],
["jump_false", 51, "ne_nn_97", 146, 38],
["ne_int", 49, 6, 11, 146, 38],
["ne_int", 49, 6, 9, 146, 38],
["jump", "ne_done_94", 146, 38],
"ne_nn_97",
["is_num", 50, 6, 146, 38],
["jump_false", 50, "ne_nt_98", 146, 38],
["is_num", 51, 11, 146, 38],
["is_num", 51, 9, 146, 38],
["jump_false", 51, "ne_nt_98", 146, 38],
["ne_float", 49, 6, 11, 146, 38],
["ne_float", 49, 6, 9, 146, 38],
["jump", "ne_done_94", 146, 38],
"ne_nt_98",
["is_text", 50, 6, 146, 38],
["jump_false", 50, "ne_nnl_99", 146, 38],
["is_text", 51, 11, 146, 38],
["is_text", 51, 9, 146, 38],
["jump_false", 51, "ne_nnl_99", 146, 38],
["ne_text", 49, 6, 11, 146, 38],
["ne_text", 49, 6, 9, 146, 38],
["jump", "ne_done_94", 146, 38],
"ne_nnl_99",
["is_null", 50, 6, 146, 38],
["jump_false", 50, "ne_nb_100", 146, 38],
["is_null", 51, 11, 146, 38],
["is_null", 51, 9, 146, 38],
["jump_false", 51, "ne_nb_100", 146, 38],
["false", 49, 146, 38],
["jump", "ne_done_94", 146, 38],
"ne_nb_100",
["is_bool", 50, 6, 146, 38],
["jump_false", 50, "ne_mis_101", 146, 38],
["is_bool", 51, 11, 146, 38],
["is_bool", 51, 9, 146, 38],
["jump_false", 51, "ne_mis_101", 146, 38],
["ne_bool", 49, 6, 11, 146, 38],
["ne_bool", 49, 6, 9, 146, 38],
["jump", "ne_done_94", 146, 38],
"ne_mis_101",
["true", 49, 146, 38],
@@ -1331,7 +1331,7 @@
["jump", "if_end_84", 150, 11],
"if_else_83",
"if_end_84",
["move", 11, 6, 153, 19],
["move", 9, 6, 153, 19],
["move", 5, 3, 154, 18],
["access", 89, 1, 155, 17],
["add", 90, 7, 89, 155, 17],
@@ -1342,14 +1342,14 @@
["jump", "if_end_76", 157, 5],
"if_else_75",
"if_end_76",
["get", 92, 16, 1, 159, 9],
["get", 92, 14, 1, 159, 9],
["frame", 93, 92, 1, 159, 9],
["null", 94, 159, 9],
["setarg", 93, 0, 94, 159, 9],
["setarg", 93, 1, 10, 159, 9],
["setarg", 93, 1, 11, 159, 9],
["invoke", 93, 91, 159, 9],
["move", 10, 91, 159, 9],
["return", 10, 160, 10],
["move", 11, 91, 159, 9],
["return", 11, 160, 10],
"_nop_ur_1",
"_nop_ur_2"
],
@@ -1362,7 +1362,7 @@
"nr_slots": 52,
"nr_close_slots": 0,
"instructions": [
["get", 9, 6, 1, 172, 18],
["get", 9, 3, 1, 172, 18],
["frame", 10, 9, 1, 172, 18],
["null", 11, 172, 18],
["setarg", 10, 0, 11, 172, 18],
@@ -1382,7 +1382,7 @@
],
["load_field", 13, 12, "_verify_ir", 173, 7],
["jump_false", 13, "if_else_121", 173, 7],
["get", 14, 19, 1, 174, 9],
["get", 14, 16, 1, 174, 9],
["null", 15, 174, 27],
["is_identical", 16, 14, 15, 174, 27],
["jump_true", 16, "eq_done_125", 174, 27],
@@ -1426,25 +1426,25 @@
["jump_false", 16, "if_else_123", 174, 27],
["access", 19, "verify_ir", 175, 34],
["get", 20, 9, 1, 175, 47],
["get", 22, 12, 1, 175, 24],
["get", 22, 22, 1, 175, 24],
["frame", 23, 22, 2, 175, 24],
["null", 24, 175, 24],
["setarg", 23, 0, 24, 175, 24],
["setarg", 23, 1, 19, 175, 24],
["setarg", 23, 2, 20, 175, 24],
["invoke", 23, 21, 175, 24],
["put", 21, 19, 1, 175, 24],
["put", 21, 16, 1, 175, 24],
["jump", "if_end_124", 175, 24],
"if_else_123",
"if_end_124",
["true", 25, 177, 24],
["store_field", 4, 25, "_verify", 177, 5],
["get", 26, 19, 1, 178, 28],
["get", 26, 16, 1, 178, 28],
["store_field", 4, 26, "_verify_mod", 178, 5],
["jump", "if_end_122", 178, 5],
"if_else_121",
"if_end_122",
["get", 28, 26, 1, 180, 19],
["get", 28, 25, 1, 180, 19],
["frame", 29, 28, 1, 180, 19],
["null", 30, 180, 19],
["setarg", 29, 0, 30, 180, 19],
@@ -1458,7 +1458,7 @@
["jump", "if_end_132", 184, 12],
"if_else_131",
"if_end_132",
["get", 35, 27, 1, 186, 20],
["get", 35, 26, 1, 186, 20],
["is_proxy", 36, 35, 186, 20],
["jump_false", 36, "record_path_133", 186, 20],
["null", 37, 186, 20],
@@ -1478,7 +1478,7 @@
["setarg", 42, 1, 5, 186, 20],
["invoke", 42, 34, 186, 20],
"call_done_134",
["move", 7, 34, 186, 20],
["move", 6, 34, 186, 20],
[
"access",
44,
@@ -1494,9 +1494,9 @@
["null", 46, 187, 19],
["setarg", 45, 0, 46, 187, 19],
["setarg", 45, 1, 1, 187, 19],
["setarg", 45, 2, 7, 187, 19],
["setarg", 45, 2, 6, 187, 19],
["invoke", 45, 43, 187, 19],
["move", 6, 43, 187, 19],
["move", 7, 43, 187, 19],
[
"access",
48,
@@ -1511,7 +1511,7 @@
["frame", 49, 48, 2, 188, 10],
["null", 50, 188, 10],
["setarg", 49, 0, 50, 188, 10],
["setarg", 49, 1, 6, 188, 10],
["setarg", 49, 1, 7, 188, 10],
["setarg", 49, 2, 3, 188, 10],
["tail_invoke", 49, 47, 188, 10],
["return", 47, 188, 10],
@@ -1527,14 +1527,14 @@
"nr_slots": 29,
"nr_close_slots": 0,
"instructions": [
["get", 8, 6, 1, 193, 18],
["get", 8, 3, 1, 193, 18],
["frame", 9, 8, 1, 193, 18],
["null", 10, 193, 18],
["setarg", 9, 0, 10, 193, 18],
["setarg", 9, 1, 2, 193, 18],
["invoke", 9, 7, 193, 18],
["move", 4, 7, 193, 18],
["get", 12, 27, 1, 194, 20],
["get", 12, 26, 1, 194, 20],
["is_proxy", 13, 12, 194, 20],
["jump_false", 13, "record_path_135", 194, 20],
["null", 14, 194, 20],
@@ -1603,21 +1603,21 @@
"nr_slots": 27,
"nr_close_slots": 0,
"instructions": [
["get", 6, 6, 1, 201, 18],
["get", 6, 3, 1, 201, 18],
["frame", 7, 6, 1, 201, 18],
["null", 8, 201, 18],
["setarg", 7, 0, 8, 201, 18],
["setarg", 7, 1, 2, 201, 18],
["invoke", 7, 5, 201, 18],
["move", 3, 5, 201, 18],
["get", 10, 26, 1, 202, 19],
["get", 10, 25, 1, 202, 19],
["frame", 11, 10, 1, 202, 19],
["null", 12, 202, 19],
["setarg", 11, 0, 12, 202, 19],
["setarg", 11, 1, 3, 202, 19],
["invoke", 11, 9, 202, 19],
["move", 4, 9, 202, 19],
["get", 14, 27, 1, 203, 39],
["get", 14, 26, 1, 203, 39],
["is_proxy", 15, 14, 203, 39],
["jump_false", 15, "record_path_137", 203, 39],
["null", 16, 203, 39],
@@ -1683,12 +1683,12 @@
["move", 10, 13, 208, 32],
["null", 2, 209, 20],
["null", 3, 210, 14],
["null", 8, 211, 16],
["null", 9, 211, 16],
["null", 7, 212, 20],
["null", 9, 213, 19],
["null", 6, 213, 19],
["null", 4, 214, 20],
["null", 5, 215, 20],
["get", 15, 17, 1, 216, 7],
["get", 15, 15, 1, 216, 7],
["is_proxy", 16, 15, 216, 7],
["jump_false", 16, "record_path_141", 216, 7],
["null", 17, 216, 7],
@@ -1709,7 +1709,7 @@
["invoke", 22, 14, 216, 7],
"call_done_142",
["jump_false", 14, "if_else_139", 216, 7],
["get", 24, 17, 1, 217, 18],
["get", 24, 15, 1, 217, 18],
["is_proxy", 25, 24, 217, 18],
["jump_false", 25, "record_path_143", 217, 18],
["null", 26, 217, 18],
@@ -1730,29 +1730,29 @@
["invoke", 31, 23, 217, 18],
"call_done_144",
["move", 2, 23, 217, 18],
["get", 33, 10, 1, 218, 12],
["get", 33, 8, 1, 218, 12],
["frame", 34, 33, 1, 218, 12],
["null", 35, 218, 12],
["setarg", 34, 0, 35, 218, 12],
["setarg", 34, 1, 2, 218, 12],
["invoke", 34, 32, 218, 12],
["move", 3, 32, 218, 12],
["get", 37, 14, 1, 219, 14],
["get", 37, 13, 1, 219, 14],
["frame", 38, 37, 1, 219, 14],
["null", 39, 219, 14],
["setarg", 38, 0, 39, 219, 14],
["setarg", 38, 1, 3, 219, 14],
["invoke", 38, 36, 219, 14],
["move", 8, 36, 219, 14],
["move", 40, 8, 220, 9],
["move", 9, 36, 219, 14],
["move", 40, 9, 220, 9],
["jump_false", 40, "and_end_147", 220, 9],
["get", 42, 17, 1, 220, 19],
["get", 42, 15, 1, 220, 19],
["is_proxy", 43, 42, 220, 19],
["jump_false", 43, "record_path_148", 220, 19],
["null", 44, 220, 19],
["access", 45, "is_file", 220, 19],
["array", 46, 0, 220, 19],
["push", 46, 8, 220, 19],
["push", 46, 9, 220, 19],
["frame", 47, 42, 2, 220, 19],
["setarg", 47, 0, 44, 220, 19],
["setarg", 47, 1, 45, 220, 19],
@@ -1763,19 +1763,19 @@
["load_field", 48, 42, "is_file", 220, 19],
["frame", 49, 48, 1, 220, 19],
["setarg", 49, 0, 42, 220, 19],
["setarg", 49, 1, 8, 220, 19],
["setarg", 49, 1, 9, 220, 19],
["invoke", 49, 41, 220, 19],
"call_done_149",
["move", 40, 41, 220, 19],
"and_end_147",
["jump_false", 40, "if_else_145", 220, 19],
["get", 51, 17, 1, 221, 24],
["get", 51, 15, 1, 221, 24],
["is_proxy", 52, 51, 221, 24],
["jump_false", 52, "record_path_150", 221, 24],
["null", 53, 221, 24],
["access", 54, "slurp", 221, 24],
["array", 55, 0, 221, 24],
["push", 55, 8, 221, 24],
["push", 55, 9, 221, 24],
["frame", 56, 51, 2, 221, 24],
["setarg", 56, 0, 53, 221, 24],
["setarg", 56, 1, 54, 221, 24],
@@ -1786,7 +1786,7 @@
["load_field", 57, 51, "slurp", 221, 24],
["frame", 58, 57, 1, 221, 24],
["setarg", 58, 0, 51, 221, 24],
["setarg", 58, 1, 8, 221, 24],
["setarg", 58, 1, 9, 221, 24],
["invoke", 58, 50, 221, 24],
"call_done_151",
[
@@ -1845,21 +1845,21 @@
["setarg", 70, 1, 67, 224, 17],
["setarg", 70, 2, 7, 224, 17],
["invoke", 70, 68, 224, 17],
["move", 9, 68, 224, 17],
["jump_false", 8, "if_else_152", 225, 9],
["get", 73, 2, 1, 226, 7],
["move", 6, 68, 224, 17],
["jump_false", 9, "if_else_152", 225, 9],
["get", 73, 1, 1, 226, 7],
["frame", 74, 73, 0, 226, 7],
["null", 75, 226, 7],
["setarg", 74, 0, 75, 226, 7],
["invoke", 74, 72, 226, 7],
["get", 77, 17, 1, 227, 7],
["get", 77, 15, 1, 227, 7],
["is_proxy", 78, 77, 227, 7],
["jump_false", 78, "record_path_154", 227, 7],
["null", 79, 227, 7],
["access", 80, "slurpwrite", 227, 7],
["array", 81, 0, 227, 7],
["push", 81, 8, 227, 7],
["push", 81, 9, 227, 7],
["push", 81, 6, 227, 7],
["frame", 82, 77, 2, 227, 7],
["setarg", 82, 0, 79, 227, 7],
["setarg", 82, 1, 80, 227, 7],
@@ -1870,8 +1870,8 @@
["load_field", 83, 77, "slurpwrite", 227, 7],
["frame", 84, 83, 2, 227, 7],
["setarg", 84, 0, 77, 227, 7],
["setarg", 84, 1, 8, 227, 7],
["setarg", 84, 2, 9, 227, 7],
["setarg", 84, 1, 9, 227, 7],
["setarg", 84, 2, 6, 227, 7],
["invoke", 84, 76, 227, 7],
"call_done_155",
["jump", "if_end_153", 227, 7],
@@ -1891,7 +1891,7 @@
["frame", 87, 86, 2, 229, 12],
["null", 88, 229, 12],
["setarg", 87, 0, 88, 229, 12],
["setarg", 87, 1, 9, 229, 12],
["setarg", 87, 1, 6, 229, 12],
["setarg", 87, 2, 1, 229, 12],
["tail_invoke", 87, 85, 229, 12],
["return", 85, 229, 12],
@@ -1911,14 +1911,14 @@
],
["access", 90, "/internal/engine.cm", 232, 31],
["add", 91, 89, 90, 232, 31],
["move", 6, 91, 232, 31],
["get", 93, 17, 1, 233, 21],
["move", 8, 91, 232, 31],
["get", 93, 15, 1, 233, 21],
["is_proxy", 94, 93, 233, 21],
["jump_false", 94, "record_path_156", 233, 21],
["null", 95, 233, 21],
["access", 96, "slurp", 233, 21],
["array", 97, 0, 233, 21],
["push", 97, 6, 233, 21],
["push", 97, 8, 233, 21],
["frame", 98, 93, 2, 233, 21],
["setarg", 98, 0, 95, 233, 21],
["setarg", 98, 1, 96, 233, 21],
@@ -1929,7 +1929,7 @@
["load_field", 99, 93, "slurp", 233, 21],
["frame", 100, 99, 1, 233, 21],
["setarg", 100, 0, 93, 233, 21],
["setarg", 100, 1, 6, 233, 21],
["setarg", 100, 1, 8, 233, 21],
["invoke", 100, 92, 233, 21],
"call_done_157",
[
@@ -1949,16 +1949,16 @@
["setarg", 103, 1, 92, 233, 16],
["invoke", 103, 101, 233, 16],
["move", 4, 101, 233, 16],
["get", 106, 7, 1, 234, 16],
["get", 106, 5, 1, 234, 16],
["frame", 107, 106, 2, 234, 16],
["null", 108, 234, 16],
["setarg", 107, 0, 108, 234, 16],
["setarg", 107, 1, 4, 234, 16],
["setarg", 107, 2, 6, 234, 16],
["setarg", 107, 2, 8, 234, 16],
["invoke", 107, 105, 234, 16],
["move", 5, 105, 234, 16],
["access", 109, "engine", 235, 18],
["get", 111, 24, 1, 235, 10],
["get", 111, 20, 1, 235, 10],
["frame", 112, 111, 3, 235, 10],
["null", 113, 235, 10],
["setarg", 112, 0, 113, 235, 10],
@@ -1981,29 +1981,29 @@
"nr_slots": 134,
"instructions": [
["function", 28, 0, 0, 0],
["move", 22, 28, 0, 0],
["move", 12, 28, 0, 0],
["function", 29, 1, 0, 0],
["move", 10, 29, 0, 0],
["move", 8, 29, 0, 0],
["function", 30, 2, 0, 0],
["move", 14, 30, 0, 0],
["move", 13, 30, 0, 0],
["function", 31, 3, 0, 0],
["move", 2, 31, 0, 0],
["move", 1, 31, 0, 0],
["function", 32, 4, 0, 0],
["move", 11, 32, 0, 0],
["move", 27, 32, 0, 0],
["function", 33, 5, 0, 0],
["move", 12, 33, 0, 0],
["move", 22, 33, 0, 0],
["function", 34, 6, 0, 0],
["move", 8, 34, 0, 0],
["move", 6, 34, 0, 0],
["function", 35, 7, 0, 0],
["move", 7, 35, 0, 0],
["move", 5, 35, 0, 0],
["function", 36, 8, 0, 0],
["move", 24, 36, 0, 0],
["move", 20, 36, 0, 0],
["function", 37, 9, 0, 0],
["move", 18, 37, 0, 0],
["move", 10, 37, 0, 0],
["function", 38, 10, 0, 0],
["move", 1, 38, 0, 0],
["move", 7, 38, 0, 0],
["function", 39, 11, 0, 0],
["move", 13, 39, 0, 0],
["move", 11, 39, 0, 0],
[
"access",
40,
@@ -2016,32 +2016,32 @@
21
],
["load_field", 41, 40, "load_internal", 5, 21],
["move", 20, 41, 5, 21],
["move", 23, 41, 5, 21],
["access", 42, "internal_fd", 10, 20],
["frame", 44, 22, 1, 10, 10],
["frame", 44, 12, 1, 10, 10],
["null", 45, 10, 10],
["setarg", 44, 0, 45, 10, 10],
["setarg", 44, 1, 42, 10, 10],
["invoke", 44, 43, 10, 10],
["move", 17, 43, 10, 10],
["move", 15, 43, 10, 10],
["access", 46, "json", 11, 22],
["frame", 48, 22, 1, 11, 12],
["frame", 48, 12, 1, 11, 12],
["null", 49, 11, 12],
["setarg", 48, 0, 49, 11, 12],
["setarg", 48, 1, 46, 11, 12],
["invoke", 48, 47, 11, 12],
["move", 27, 47, 11, 12],
["move", 26, 47, 11, 12],
["access", 50, "crypto", 12, 24],
["frame", 52, 22, 1, 12, 14],
["frame", 52, 12, 1, 12, 14],
["null", 53, 12, 14],
["setarg", 52, 0, 53, 12, 14],
["setarg", 52, 1, 50, 12, 14],
["invoke", 52, 51, 12, 14],
["move", 21, 51, 12, 14],
["move", 19, 51, 12, 14],
["record", 54, 0],
["move", 15, 54, 14, 17],
["move", 17, 54, 14, 17],
["access", 55, "fd", 15, 11],
["store_field", 15, 17, 55, 15, 11],
["store_field", 17, 15, 55, 15, 11],
[
"access",
56,
@@ -2054,73 +2054,73 @@
19
],
["access", 57, "os", 16, 11],
["store_field", 15, 56, 57, 16, 11],
["store_field", 17, 56, 57, 16, 11],
["access", 58, "json", 17, 11],
["store_field", 15, 27, 58, 17, 11],
["store_field", 17, 26, 58, 17, 11],
["access", 59, "crypto", 18, 11],
["store_field", 15, 21, 59, 18, 11],
["store_field", 17, 19, 59, 18, 11],
["record", 60, 0],
["store_field", 60, 11, "use", 74, 22],
["store_field", 60, 27, "use", 74, 22],
["move", 9, 60, 74, 22],
["access", 61, "tokenize", 75, 30],
["frame", 63, 12, 2, 75, 20],
["frame", 63, 22, 2, 75, 20],
["null", 64, 75, 20],
["setarg", 63, 0, 64, 75, 20],
["setarg", 63, 1, 61, 75, 20],
["setarg", 63, 2, 9, 75, 20],
["invoke", 63, 62, 75, 20],
["move", 3, 62, 75, 20],
["move", 2, 62, 75, 20],
["access", 65, "parse", 76, 27],
["frame", 67, 12, 2, 76, 17],
["frame", 67, 22, 2, 76, 17],
["null", 68, 76, 17],
["setarg", 67, 0, 68, 76, 17],
["setarg", 67, 1, 65, 76, 17],
["setarg", 67, 2, 9, 76, 17],
["invoke", 67, 66, 76, 17],
["move", 5, 66, 76, 17],
["move", 21, 66, 76, 17],
["access", 69, "fold", 77, 26],
["frame", 71, 12, 2, 77, 16],
["frame", 71, 22, 2, 77, 16],
["null", 72, 77, 16],
["setarg", 71, 0, 72, 77, 16],
["setarg", 71, 1, 69, 77, 16],
["setarg", 71, 2, 9, 77, 16],
["invoke", 71, 70, 77, 16],
["move", 16, 70, 77, 16],
["move", 14, 70, 77, 16],
["access", 73, "tokenize", 78, 11],
["store_field", 15, 3, 73, 78, 11],
["store_field", 17, 2, 73, 78, 11],
["access", 74, "parse", 79, 11],
["store_field", 15, 5, 74, 79, 11],
["store_field", 17, 21, 74, 79, 11],
["access", 75, "fold", 80, 11],
["store_field", 15, 16, 75, 80, 11],
["store_field", 17, 14, 75, 80, 11],
["access", 76, "mcode", 83, 27],
["frame", 78, 12, 2, 83, 17],
["frame", 78, 22, 2, 83, 17],
["null", 79, 83, 17],
["setarg", 78, 0, 79, 83, 17],
["setarg", 78, 1, 76, 83, 17],
["setarg", 78, 2, 9, 83, 17],
["invoke", 78, 77, 83, 17],
["move", 6, 77, 83, 17],
["move", 3, 77, 83, 17],
["access", 80, "mcode", 84, 11],
["store_field", 15, 6, 80, 84, 11],
["null", 26, 85, 22],
["frame", 82, 8, 0, 126, 1],
["store_field", 17, 3, 80, 84, 11],
["null", 25, 85, 22],
["frame", 82, 6, 0, 126, 1],
["null", 83, 126, 1],
["setarg", 82, 0, 83, 126, 1],
["invoke", 82, 81, 126, 1],
["access", 84, "streamline", 164, 28],
["frame", 86, 12, 2, 164, 18],
["frame", 86, 22, 2, 164, 18],
["null", 87, 164, 18],
["setarg", 86, 0, 87, 164, 18],
["setarg", 86, 1, 84, 164, 18],
["setarg", 86, 2, 9, 164, 18],
["invoke", 86, 85, 164, 18],
["move", 26, 85, 164, 18],
["move", 25, 85, 164, 18],
["access", 88, "streamline", 165, 11],
["store_field", 15, 26, 88, 165, 11],
["null", 19, 168, 22],
["null", 25, 240, 15],
["store_field", 17, 25, 88, 165, 11],
["null", 16, 168, 22],
["null", 24, 240, 15],
["array", 89, 0, 241, 17],
["move", 23, 89, 241, 17],
["move", 18, 89, 241, 17],
["access", 4, 0, 242, 10],
[
"access",
@@ -2192,9 +2192,9 @@
],
["access", 96, 0, 246, 18],
["load_index", 97, 95, 96, 246, 18],
["move", 25, 97, 246, 18],
["move", 24, 97, 246, 18],
"_nop_bl_1",
["jump_true", 25, "if_else_168", 247, 8],
["jump_true", 24, "if_else_168", 247, 8],
["access", 99, "error: no program specified\n", 248, 11],
[
"access",
@@ -2267,9 +2267,9 @@
21
],
["load_dynamic", 111, 110, 4, 253, 26],
["is_array", 112, 23, 253, 26],
["is_array", 112, 18, 253, 26],
["jump_false", 112, "push_err_176", 253, 26],
["push", 23, 111, 253, 26],
["push", 18, 111, 253, 26],
["jump", "push_done_177", 253, 26],
"push_err_176",
["disrupt", 253, 26],
@@ -2305,8 +2305,8 @@
],
["store_field", 115, 117, "actorsym", 258, 23],
["record", 118, 0],
["store_field", 118, 25, "program", 259, 21],
["store_field", 118, 23, "arg", 259, 35],
["store_field", 118, 24, "program", 259, 21],
["store_field", 118, 18, "arg", 259, 35],
["store_field", 115, 118, "init", 259, 35],
[
"access",
@@ -2332,16 +2332,16 @@
38
],
["store_field", 115, 120, "shop_path", 260, 38],
["store_field", 115, 27, "json", 260, 55],
["store_field", 115, 7, "analyze", 261, 14],
["store_field", 115, 24, "run_ast_fn", 261, 35],
["store_field", 115, 18, "run_ast_noopt_fn", 261, 62],
["store_field", 115, 15, "use_cache", 262, 16],
["store_field", 115, 10, "content_hash", 263, 19],
["store_field", 115, 14, "cache_path", 263, 45],
["store_field", 115, 2, "ensure_build_dir", 264, 23],
["store_field", 115, 1, "compile_to_blob_fn", 264, 61],
["frame", 122, 13, 1, 257, 3],
["store_field", 115, 26, "json", 260, 55],
["store_field", 115, 5, "analyze", 261, 14],
["store_field", 115, 20, "run_ast_fn", 261, 35],
["store_field", 115, 10, "run_ast_noopt_fn", 261, 62],
["store_field", 115, 17, "use_cache", 262, 16],
["store_field", 115, 8, "content_hash", 263, 19],
["store_field", 115, 13, "cache_path", 263, 45],
["store_field", 115, 1, "ensure_build_dir", 264, 23],
["store_field", 115, 7, "compile_to_blob_fn", 264, 61],
["frame", 122, 11, 1, 257, 3],
["null", 123, 257, 3],
["setarg", 122, 0, 123, 257, 3],
["setarg", 122, 1, 115, 257, 3],
@@ -2409,16 +2409,16 @@
38
],
["store_field", 124, 129, "shop_path", 270, 38],
["store_field", 124, 27, "json", 270, 55],
["store_field", 124, 7, "analyze", 271, 14],
["store_field", 124, 24, "run_ast_fn", 271, 35],
["store_field", 124, 18, "run_ast_noopt_fn", 271, 62],
["store_field", 124, 15, "use_cache", 272, 16],
["store_field", 124, 10, "content_hash", 273, 19],
["store_field", 124, 14, "cache_path", 273, 45],
["store_field", 124, 2, "ensure_build_dir", 274, 23],
["store_field", 124, 1, "compile_to_blob_fn", 274, 61],
["frame", 131, 13, 1, 268, 3],
["store_field", 124, 26, "json", 270, 55],
["store_field", 124, 5, "analyze", 271, 14],
["store_field", 124, 20, "run_ast_fn", 271, 35],
["store_field", 124, 10, "run_ast_noopt_fn", 271, 62],
["store_field", 124, 17, "use_cache", 272, 16],
["store_field", 124, 8, "content_hash", 273, 19],
["store_field", 124, 13, "cache_path", 273, 45],
["store_field", 124, 1, "ensure_build_dir", 274, 23],
["store_field", 124, 7, "compile_to_blob_fn", 274, 61],
["frame", 131, 11, 1, 268, 3],
["null", 132, 268, 3],
["setarg", 131, 0, 132, 268, 3],
["setarg", 131, 1, 124, 268, 3],

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -447,7 +447,7 @@
"nr_slots": 11,
"nr_close_slots": 0,
"instructions": [
["get", 3, 66, 1, 1, 1],
["get", 3, 4, 1, 1, 1],
["array", 4, 0, 1, 1],
["push", 4, 1, 1, 1],
["push", 4, 2, 1, 1],
@@ -507,7 +507,7 @@
"nr_slots": 11,
"nr_close_slots": 0,
"instructions": [
["get", 3, 66, 1, 1, 1],
["get", 3, 4, 1, 1, 1],
["array", 4, 0, 1, 1],
["push", 4, 1, 1, 1],
["push", 4, 2, 1, 1],
@@ -702,8 +702,8 @@
"nr_slots": 14,
"nr_close_slots": 0,
"instructions": [
["get", 5, 42, 1, 1, 1],
["get", 6, 13, 1, 1, 1],
["get", 5, 66, 1, 1, 1],
["get", 6, 15, 1, 1, 1],
["array", 7, 0, 1, 1],
["push", 7, 1, 1, 1],
["push", 7, 1, 1, 1],
@@ -815,8 +815,8 @@
"nr_slots": 14,
"nr_close_slots": 0,
"instructions": [
["get", 5, 42, 1, 1, 1],
["get", 6, 13, 1, 1, 1],
["get", 5, 66, 1, 1, 1],
["get", 6, 15, 1, 1, 1],
["array", 7, 0, 1, 1],
["push", 7, 1, 1, 1],
["push", 7, 1, 1, 1],
@@ -911,8 +911,8 @@
"nr_slots": 14,
"nr_close_slots": 0,
"instructions": [
["get", 5, 42, 1, 1, 1],
["get", 6, 13, 1, 1, 1],
["get", 5, 66, 1, 1, 1],
["get", 6, 15, 1, 1, 1],
["array", 7, 0, 1, 1],
["push", 7, 1, 1, 1],
["push", 7, 1, 1, 1],
@@ -1007,7 +1007,7 @@
"nr_slots": 13,
"nr_close_slots": 0,
"instructions": [
["get", 5, 10, 1, 1, 1],
["get", 5, 12, 1, 1, 1],
["array", 6, 0, 1, 1],
["push", 6, 1, 1, 1],
["push", 6, 1, 1, 1],
@@ -1117,7 +1117,7 @@
"nr_slots": 13,
"nr_close_slots": 0,
"instructions": [
["get", 5, 10, 1, 1, 1],
["get", 5, 12, 1, 1, 1],
["array", 6, 0, 1, 1],
["push", 6, 1, 1, 1],
["push", 6, 1, 1, 1],
@@ -1206,22 +1206,22 @@
"nr_slots": 35,
"nr_close_slots": 0,
"instructions": [
["get", 10, 23, 1, 408, 20],
["get", 10, 25, 1, 408, 20],
["load_field", 11, 10, "int_cmp_op", 408, 20],
["move", 8, 11, 408, 20],
["get", 12, 23, 1, 409, 25],
["get", 12, 25, 1, 409, 25],
["load_field", 13, 12, "float_id", 409, 25],
["move", 6, 13, 409, 25],
["move", 7, 13, 409, 25],
["access", 9, 0, 410, 17],
["get", 14, 45, 1, 411, 22],
["get", 14, 48, 1, 411, 22],
["move", 5, 14, 411, 22],
["get", 15, 45, 1, 412, 18],
["move", 7, 15, 412, 18],
["get", 16, 23, 1, 413, 7],
["get", 15, 48, 1, 412, 18],
["move", 6, 15, 412, 18],
["get", 16, 25, 1, 413, 7],
["load_field", 17, 16, "is_eq", 413, 7],
["move", 18, 17, 413, 7],
["jump_true", 18, "or_end_2", 413, 7],
["get", 19, 23, 1, 413, 24],
["get", 19, 25, 1, 413, 24],
["load_field", 20, 19, "is_ne", 413, 24],
["move", 18, 20, 413, 24],
"or_end_2",
@@ -1231,7 +1231,7 @@
["jump", "if_end_1", 414, 15],
"if_else_0",
"if_end_1",
["get", 22, 23, 1, 416, 7],
["get", 22, 25, 1, 416, 7],
["load_field", 23, 22, "is_ne", 416, 7],
["jump_false", 23, "if_else_3", 416, 7],
["get", 24, 65, 1, 417, 20],
@@ -1239,11 +1239,11 @@
["jump", "if_end_4", 417, 20],
"if_else_3",
"if_end_4",
["get", 25, 23, 1, 419, 7],
["get", 25, 25, 1, 419, 7],
["load_field", 26, 25, "null_true", 419, 7],
["jump_false", 26, "if_else_5", 419, 7],
["get", 27, 65, 1, 420, 16],
["move", 7, 27, 420, 16],
["move", 6, 27, 420, 16],
["jump", "if_end_6", 420, 16],
"if_else_5",
"if_end_6",
@@ -1296,7 +1296,7 @@
["push", 28, 1, 1, 1],
["push", 28, 1, 1, 1],
["push", 28, 1, 1, 1],
["push", 28, 7, 1, 1],
["push", 28, 6, 1, 1],
["push", 28, 1, 1, 1],
["push", 28, 1, 1, 1],
["push", 28, 1, 1, 1],
@@ -1343,7 +1343,7 @@
["push", 28, 1, 1, 1],
["push", 28, 1, 1, 1],
["push", 28, 2, 1, 1],
["push", 28, 6, 1, 1],
["push", 28, 7, 1, 1],
["push", 28, 3, 1, 1],
["push", 28, 4, 1, 1],
["push", 28, 1, 1, 1],
@@ -1426,8 +1426,8 @@
["store_field", 5, 9, "is_ne", 495, 67],
["true", 10, 495, 85],
["store_field", 5, 10, "null_true", 495, 85],
["put", 5, 23, 1, 495, 85],
["get", 12, 32, 1, 496, 10],
["put", 5, 25, 1, 495, 85],
["get", 12, 34, 1, 496, 10],
["frame", 13, 12, 4, 496, 10],
["null", 14, 496, 10],
["setarg", 13, 0, 14, 496, 10],
@@ -1460,8 +1460,8 @@
["store_field", 5, 9, "is_ne", 500, 68],
["false", 10, 500, 85],
["store_field", 5, 10, "null_true", 500, 85],
["put", 5, 23, 1, 500, 85],
["get", 12, 32, 1, 501, 10],
["put", 5, 25, 1, 500, 85],
["get", 12, 34, 1, 501, 10],
["frame", 13, 12, 4, 501, 10],
["null", 14, 501, 10],
["setarg", 13, 0, 14, 501, 10],
@@ -1494,8 +1494,8 @@
["store_field", 5, 9, "is_ne", 505, 69],
["false", 10, 505, 87],
["store_field", 5, 10, "null_true", 505, 87],
["put", 5, 23, 1, 505, 87],
["get", 12, 32, 1, 506, 10],
["put", 5, 25, 1, 505, 87],
["get", 12, 34, 1, 506, 10],
["frame", 13, 12, 4, 506, 10],
["null", 14, 506, 10],
["setarg", 13, 0, 14, 506, 10],
@@ -1528,8 +1528,8 @@
["store_field", 5, 9, "is_ne", 510, 69],
["true", 10, 510, 87],
["store_field", 5, 10, "null_true", 510, 87],
["put", 5, 23, 1, 510, 87],
["get", 12, 32, 1, 511, 10],
["put", 5, 25, 1, 510, 87],
["get", 12, 34, 1, 511, 10],
["frame", 13, 12, 4, 511, 10],
["null", 14, 511, 10],
["setarg", 13, 0, 14, 511, 10],
@@ -1562,8 +1562,8 @@
["store_field", 5, 9, "is_ne", 515, 69],
["false", 10, 515, 87],
["store_field", 5, 10, "null_true", 515, 87],
["put", 5, 23, 1, 515, 87],
["get", 12, 32, 1, 516, 10],
["put", 5, 25, 1, 515, 87],
["get", 12, 34, 1, 516, 10],
["frame", 13, 12, 4, 516, 10],
["null", 14, 516, 10],
["setarg", 13, 0, 14, 516, 10],
@@ -1596,7 +1596,7 @@
["store_field", 5, 9, "is_ne", 520, 69],
["true", 10, 520, 87],
["store_field", 5, 10, "null_true", 520, 87],
["put", 5, 23, 1, 520, 87],
["put", 5, 25, 1, 520, 87],
["null", 11, 520, 87],
["return", 11, 520, 87]
],
@@ -1609,7 +1609,7 @@
"nr_slots": 12,
"nr_close_slots": 0,
"instructions": [
["get", 4, 42, 1, 1, 1],
["get", 4, 66, 1, 1, 1],
["array", 5, 0, 1, 1],
["push", 5, 1, 1, 1],
["push", 5, 1, 1, 1],
@@ -1683,7 +1683,7 @@
"nr_slots": 12,
"nr_close_slots": 0,
"instructions": [
["get", 4, 13, 1, 1, 1],
["get", 4, 15, 1, 1, 1],
["array", 5, 0, 1, 1],
["push", 5, 1, 1, 1],
["push", 5, 1, 1, 1],
@@ -1757,7 +1757,7 @@
"nr_slots": 12,
"nr_close_slots": 0,
"instructions": [
["get", 4, 42, 1, 1, 1],
["get", 4, 66, 1, 1, 1],
["array", 5, 0, 1, 1],
["push", 5, 1, 1, 1],
["push", 5, 1, 1, 1],
@@ -1931,7 +1931,7 @@
"nr_slots": 14,
"nr_close_slots": 0,
"instructions": [
["get", 6, 48, 1, 644, 16],
["get", 6, 50, 1, 644, 16],
["move", 5, 6, 644, 16],
["array", 7, 0, 1, 1],
["push", 7, 1, 1, 1],
@@ -2012,7 +2012,7 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "and", 671, 10],
["put", 5, 48, 1, 671, 10],
["put", 5, 50, 1, 671, 10],
["get", 7, 6, 1, 672, 10],
["frame", 8, 7, 4, 672, 10],
["null", 9, 672, 10],
@@ -2036,7 +2036,7 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "or", 676, 10],
["put", 5, 48, 1, 676, 10],
["put", 5, 50, 1, 676, 10],
["get", 7, 6, 1, 677, 10],
["frame", 8, 7, 4, 677, 10],
["null", 9, 677, 10],
@@ -2060,7 +2060,7 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "xor", 681, 10],
["put", 5, 48, 1, 681, 10],
["put", 5, 50, 1, 681, 10],
["get", 7, 6, 1, 682, 10],
["frame", 8, 7, 4, 682, 10],
["null", 9, 682, 10],
@@ -2083,7 +2083,7 @@
"nr_slots": 14,
"nr_close_slots": 0,
"instructions": [
["get", 6, 48, 1, 688, 16],
["get", 6, 50, 1, 688, 16],
["move", 5, 6, 688, 16],
["array", 7, 0, 1, 1],
["push", 7, 1, 1, 1],
@@ -2166,8 +2166,8 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "shl", 716, 10],
["put", 5, 48, 1, 716, 10],
["get", 7, 36, 1, 717, 10],
["put", 5, 50, 1, 716, 10],
["get", 7, 39, 1, 717, 10],
["frame", 8, 7, 4, 717, 10],
["null", 9, 717, 10],
["setarg", 8, 0, 9, 717, 10],
@@ -2190,8 +2190,8 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "sar", 721, 10],
["put", 5, 48, 1, 721, 10],
["get", 7, 36, 1, 722, 10],
["put", 5, 50, 1, 721, 10],
["get", 7, 39, 1, 722, 10],
["frame", 8, 7, 4, 722, 10],
["null", 9, 722, 10],
["setarg", 8, 0, 9, 722, 10],
@@ -2214,8 +2214,8 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "shr", 726, 10],
["put", 5, 48, 1, 726, 10],
["get", 7, 36, 1, 727, 10],
["put", 5, 50, 1, 726, 10],
["get", 7, 39, 1, 727, 10],
["frame", 8, 7, 4, 727, 10],
["null", 9, 727, 10],
["setarg", 8, 0, 9, 727, 10],
@@ -2324,7 +2324,7 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "ceqw", 754, 63],
["get", 7, 19, 1, 754, 46],
["get", 7, 21, 1, 754, 46],
["frame", 8, 7, 4, 754, 46],
["null", 9, 754, 46],
["setarg", 8, 0, 9, 754, 46],
@@ -2347,7 +2347,7 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "cnew", 755, 63],
["get", 7, 19, 1, 755, 46],
["get", 7, 21, 1, 755, 46],
["frame", 8, 7, 4, 755, 46],
["null", 9, 755, 46],
["setarg", 8, 0, 9, 755, 46],
@@ -2370,7 +2370,7 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "csltw", 756, 63],
["get", 7, 19, 1, 756, 46],
["get", 7, 21, 1, 756, 46],
["frame", 8, 7, 4, 756, 46],
["null", 9, 756, 46],
["setarg", 8, 0, 9, 756, 46],
@@ -2393,7 +2393,7 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "cslew", 757, 63],
["get", 7, 19, 1, 757, 46],
["get", 7, 21, 1, 757, 46],
["frame", 8, 7, 4, 757, 46],
["null", 9, 757, 46],
["setarg", 8, 0, 9, 757, 46],
@@ -2416,7 +2416,7 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "csgtw", 758, 63],
["get", 7, 19, 1, 758, 46],
["get", 7, 21, 1, 758, 46],
["frame", 8, 7, 4, 758, 46],
["null", 9, 758, 46],
["setarg", 8, 0, 9, 758, 46],
@@ -2439,7 +2439,7 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "csgew", 759, 63],
["get", 7, 19, 1, 759, 46],
["get", 7, 21, 1, 759, 46],
["frame", 8, 7, 4, 759, 46],
["null", 9, 759, 46],
["setarg", 8, 0, 9, 759, 46],
@@ -2461,7 +2461,7 @@
"nr_slots": 14,
"nr_close_slots": 0,
"instructions": [
["get", 6, 48, 1, 764, 15],
["get", 6, 50, 1, 764, 15],
["move", 5, 6, 764, 15],
["array", 7, 0, 1, 1],
["push", 7, 1, 1, 1],
@@ -2507,8 +2507,8 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, 0, 772, 48],
["put", 5, 48, 1, 772, 48],
["get", 7, 29, 1, 772, 58],
["put", 5, 50, 1, 772, 48],
["get", 7, 32, 1, 772, 58],
["frame", 8, 7, 4, 772, 58],
["null", 9, 772, 58],
["setarg", 8, 0, 9, 772, 58],
@@ -2531,8 +2531,8 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, 1, 773, 48],
["put", 5, 48, 1, 773, 48],
["get", 7, 29, 1, 773, 58],
["put", 5, 50, 1, 773, 48],
["get", 7, 32, 1, 773, 58],
["frame", 8, 7, 4, 773, 58],
["null", 9, 773, 58],
["setarg", 8, 0, 9, 773, 58],
@@ -2555,8 +2555,8 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, 2, 774, 48],
["put", 5, 48, 1, 774, 48],
["get", 7, 29, 1, 774, 58],
["put", 5, 50, 1, 774, 48],
["get", 7, 32, 1, 774, 58],
["frame", 8, 7, 4, 774, 58],
["null", 9, 774, 58],
["setarg", 8, 0, 9, 774, 58],
@@ -2579,8 +2579,8 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, 3, 775, 48],
["put", 5, 48, 1, 775, 48],
["get", 7, 29, 1, 775, 58],
["put", 5, 50, 1, 775, 48],
["get", 7, 32, 1, 775, 58],
["frame", 8, 7, 4, 775, 58],
["null", 9, 775, 58],
["setarg", 8, 0, 9, 775, 58],
@@ -2603,8 +2603,8 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, 4, 776, 48],
["put", 5, 48, 1, 776, 48],
["get", 7, 29, 1, 776, 58],
["put", 5, 50, 1, 776, 48],
["get", 7, 32, 1, 776, 58],
["frame", 8, 7, 4, 776, 58],
["null", 9, 776, 58],
["setarg", 8, 0, 9, 776, 58],
@@ -2627,8 +2627,8 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, 5, 777, 48],
["put", 5, 48, 1, 777, 48],
["get", 7, 29, 1, 777, 58],
["put", 5, 50, 1, 777, 48],
["get", 7, 32, 1, 777, 58],
["frame", 8, 7, 4, 777, 58],
["null", 9, 777, 58],
["setarg", 8, 0, 9, 777, 58],
@@ -2650,9 +2650,9 @@
"nr_slots": 16,
"nr_close_slots": 0,
"instructions": [
["get", 7, 48, 1, 782, 16],
["get", 7, 50, 1, 782, 16],
["move", 5, 7, 782, 16],
["get", 8, 33, 1, 783, 17],
["get", 8, 36, 1, 783, 17],
["move", 6, 8, 783, 17],
["array", 9, 0, 1, 1],
["push", 9, 1, 1, 1],
@@ -2701,10 +2701,10 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "ceqw", 792, 47],
["put", 5, 48, 1, 792, 47],
["put", 5, 50, 1, 792, 47],
["access", 6, 1, 792, 63],
["put", 6, 33, 1, 792, 63],
["get", 8, 7, 1, 792, 73],
["put", 6, 36, 1, 792, 63],
["get", 8, 11, 1, 792, 73],
["frame", 9, 8, 4, 792, 73],
["null", 10, 792, 73],
["setarg", 9, 0, 10, 792, 73],
@@ -2727,10 +2727,10 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "cnew", 793, 47],
["put", 5, 48, 1, 793, 47],
["put", 5, 50, 1, 793, 47],
["access", 6, 1, 793, 63],
["put", 6, 33, 1, 793, 63],
["get", 8, 7, 1, 793, 73],
["put", 6, 36, 1, 793, 63],
["get", 8, 11, 1, 793, 73],
["frame", 9, 8, 4, 793, 73],
["null", 10, 793, 73],
["setarg", 9, 0, 10, 793, 73],
@@ -2753,10 +2753,10 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "csltw", 794, 47],
["put", 5, 48, 1, 794, 47],
["put", 5, 50, 1, 794, 47],
["access", 6, 0, 794, 64],
["put", 6, 33, 1, 794, 64],
["get", 8, 7, 1, 794, 74],
["put", 6, 36, 1, 794, 64],
["get", 8, 11, 1, 794, 74],
["frame", 9, 8, 4, 794, 74],
["null", 10, 794, 74],
["setarg", 9, 0, 10, 794, 74],
@@ -2779,10 +2779,10 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "cslew", 795, 47],
["put", 5, 48, 1, 795, 47],
["put", 5, 50, 1, 795, 47],
["access", 6, 0, 795, 64],
["put", 6, 33, 1, 795, 64],
["get", 8, 7, 1, 795, 74],
["put", 6, 36, 1, 795, 64],
["get", 8, 11, 1, 795, 74],
["frame", 9, 8, 4, 795, 74],
["null", 10, 795, 74],
["setarg", 9, 0, 10, 795, 74],
@@ -2805,10 +2805,10 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "csgtw", 796, 47],
["put", 5, 48, 1, 796, 47],
["put", 5, 50, 1, 796, 47],
["access", 6, 0, 796, 64],
["put", 6, 33, 1, 796, 64],
["get", 8, 7, 1, 796, 74],
["put", 6, 36, 1, 796, 64],
["get", 8, 11, 1, 796, 74],
["frame", 9, 8, 4, 796, 74],
["null", 10, 796, 74],
["setarg", 9, 0, 10, 796, 74],
@@ -2831,10 +2831,10 @@
"nr_close_slots": 0,
"instructions": [
["access", 5, "csgew", 797, 47],
["put", 5, 48, 1, 797, 47],
["put", 5, 50, 1, 797, 47],
["access", 6, 0, 797, 64],
["put", 6, 33, 1, 797, 64],
["get", 8, 7, 1, 797, 74],
["put", 6, 36, 1, 797, 64],
["get", 8, 11, 1, 797, 74],
["frame", 9, 8, 4, 797, 74],
["null", 10, 797, 74],
["setarg", 9, 0, 10, 797, 74],
@@ -2980,215 +2980,215 @@
"nr_close_slots": 0,
"nr_slots": 147,
"instructions": [
["access", 10, 7, 10, 15],
["access", 45, 3, 11, 16],
["access", 12, 7, 10, 15],
["access", 48, 3, 11, 16],
["access", 65, 35, 12, 15],
["access", 47, 15, 13, 20],
["access", 16, 27, 14, 21],
["null", 48, 17, 12],
["null", 33, 18, 13],
["null", 23, 19, 15],
["access", 42, -2147483648, 21, 17],
["access", 13, 2147483647, 22, 17],
["access", 66, 4503599627370495, 23, 21],
["access", 49, 15, 13, 20],
["access", 3, 27, 14, 21],
["null", 50, 17, 12],
["null", 36, 18, 13],
["null", 25, 19, 15],
["access", 66, -2147483648, 21, 17],
["access", 15, 2147483647, 22, 17],
["access", 4, 4503599627370495, 23, 21],
["function", 78, 0, 29, 14],
["move", 76, 78, 29, 14],
["function", 79, 1, 35, 17],
["move", 53, 79, 35, 17],
["move", 18, 79, 35, 17],
["function", 80, 2, 44, 15],
["move", 58, 80, 44, 15],
["move", 59, 80, 44, 15],
["function", 81, 3, 50, 15],
["move", 34, 81, 50, 15],
["move", 37, 81, 50, 15],
["function", 82, 4, 56, 20],
["move", 52, 82, 56, 20],
["move", 54, 82, 56, 20],
["function", 83, 5, 62, 14],
["move", 25, 83, 62, 14],
["move", 28, 83, 62, 14],
["function", 84, 6, 68, 19],
["move", 31, 84, 68, 19],
["move", 42, 84, 68, 19],
["function", 85, 7, 74, 15],
["move", 15, 85, 74, 15],
["move", 17, 85, 74, 15],
["function", 86, 8, 110, 15],
["move", 11, 86, 110, 15],
["move", 13, 86, 110, 15],
["function", 87, 9, 117, 16],
["move", 72, 87, 117, 16],
["function", 88, 10, 124, 15],
["move", 14, 88, 124, 15],
["move", 16, 88, 124, 15],
["function", 89, 11, 131, 19],
["move", 62, 89, 131, 19],
["move", 26, 89, 131, 19],
["function", 90, 12, 149, 18],
["move", 75, 90, 149, 18],
["function", 91, 13, 186, 15],
["move", 43, 91, 186, 15],
["move", 46, 91, 186, 15],
["function", 92, 14, 193, 16],
["move", 67, 92, 193, 16],
["function", 93, 15, 201, 19],
["move", 8, 93, 201, 19],
["move", 77, 93, 201, 19],
["function", 94, 16, 212, 11],
["move", 40, 94, 212, 11],
["move", 43, 94, 212, 11],
["function", 95, 17, 254, 11],
["move", 5, 95, 254, 11],
["function", 96, 18, 288, 11],
["move", 1, 96, 288, 11],
["function", 97, 19, 322, 11],
["move", 54, 97, 322, 11],
["move", 56, 97, 322, 11],
["function", 98, 20, 366, 11],
["move", 2, 98, 366, 11],
["function", 99, 21, 407, 11],
["move", 32, 99, 407, 11],
["move", 34, 99, 407, 11],
["function", 100, 22, 494, 10],
["move", 71, 100, 494, 10],
["function", 101, 23, 499, 10],
["move", 68, 101, 499, 10],
["function", 102, 24, 504, 10],
["move", 49, 102, 504, 10],
["move", 51, 102, 504, 10],
["function", 103, 25, 509, 10],
["move", 41, 103, 509, 10],
["move", 44, 103, 509, 10],
["function", 104, 26, 514, 10],
["move", 69, 104, 514, 10],
["function", 105, 27, 519, 10],
["move", 70, 105, 519, 10],
["function", 106, 28, 528, 11],
["move", 55, 106, 528, 11],
["move", 57, 106, 528, 11],
["function", 107, 29, 555, 11],
["move", 26, 107, 555, 11],
["move", 29, 107, 555, 11],
["function", 108, 30, 582, 11],
["move", 28, 108, 582, 11],
["move", 31, 108, 582, 11],
["function", 109, 31, 609, 12],
["move", 35, 109, 609, 12],
["move", 38, 109, 609, 12],
["function", 110, 32, 619, 12],
["move", 59, 110, 619, 12],
["move", 60, 110, 619, 12],
["function", 111, 33, 643, 18],
["move", 6, 111, 643, 18],
["function", 112, 34, 670, 12],
["move", 30, 112, 670, 12],
["move", 33, 112, 670, 12],
["function", 113, 35, 675, 11],
["move", 61, 113, 675, 11],
["move", 62, 113, 675, 11],
["function", 114, 36, 680, 12],
["move", 51, 114, 680, 12],
["move", 53, 114, 680, 12],
["function", 115, 37, 687, 16],
["move", 36, 115, 687, 16],
["move", 39, 115, 687, 16],
["function", 116, 38, 715, 11],
["move", 56, 116, 715, 11],
["move", 58, 116, 715, 11],
["function", 117, 39, 720, 11],
["move", 73, 117, 720, 11],
["function", 118, 40, 725, 12],
["move", 3, 118, 725, 12],
["move", 7, 118, 725, 12],
["function", 119, 41, 736, 14],
["move", 4, 119, 736, 14],
["move", 8, 119, 736, 14],
["function", 120, 42, 742, 15],
["move", 19, 120, 742, 15],
["move", 21, 120, 742, 15],
["function", 121, 43, 754, 14],
["move", 24, 121, 754, 14],
["move", 27, 121, 754, 14],
["function", 122, 44, 755, 14],
["move", 18, 122, 755, 14],
["move", 20, 122, 755, 14],
["function", 123, 45, 756, 14],
["move", 22, 123, 756, 14],
["move", 24, 123, 756, 14],
["function", 124, 46, 757, 14],
["move", 27, 124, 757, 14],
["move", 30, 124, 757, 14],
["function", 125, 47, 758, 14],
["move", 74, 125, 758, 14],
["function", 126, 48, 759, 14],
["move", 9, 126, 759, 14],
["function", 127, 49, 763, 17],
["move", 29, 127, 763, 17],
["move", 32, 127, 763, 17],
["function", 128, 50, 772, 16],
["move", 77, 128, 772, 16],
["move", 10, 128, 772, 16],
["function", 129, 51, 773, 16],
["move", 37, 129, 773, 16],
["move", 40, 129, 773, 16],
["function", 130, 52, 774, 16],
["move", 38, 130, 774, 16],
["move", 41, 130, 774, 16],
["function", 131, 53, 775, 16],
["move", 63, 131, 775, 16],
["function", 132, 54, 776, 16],
["move", 39, 132, 776, 16],
["move", 45, 132, 776, 16],
["function", 133, 55, 777, 16],
["move", 50, 133, 777, 16],
["move", 52, 133, 777, 16],
["function", 134, 56, 781, 16],
["move", 7, 134, 781, 16],
["move", 11, 134, 781, 16],
["function", 135, 57, 792, 15],
["move", 20, 135, 792, 15],
["move", 22, 135, 792, 15],
["function", 136, 58, 793, 15],
["move", 44, 136, 793, 15],
["move", 35, 136, 793, 15],
["function", 137, 59, 794, 15],
["move", 21, 137, 794, 15],
["move", 23, 137, 794, 15],
["function", 138, 60, 795, 15],
["move", 17, 138, 795, 15],
["move", 19, 138, 795, 15],
["function", 139, 61, 796, 15],
["move", 46, 139, 796, 15],
["move", 47, 139, 796, 15],
["function", 140, 62, 797, 15],
["move", 12, 140, 797, 15],
["move", 14, 140, 797, 15],
["function", 141, 63, 800, 15],
["move", 60, 141, 800, 15],
["move", 61, 141, 800, 15],
["function", 142, 64, 808, 15],
["move", 57, 142, 808, 15],
["move", 55, 142, 808, 15],
["function", 143, 65, 817, 20],
["move", 64, 143, 817, 20],
["record", 144, 0],
["store_field", 144, 10, "js_null", 831, 12],
["store_field", 144, 45, "js_false", 832, 13],
["store_field", 144, 12, "js_null", 831, 12],
["store_field", 144, 48, "js_false", 832, 13],
["store_field", 144, 65, "js_true", 833, 12],
["access", 145, 15, 834, 17],
["store_field", 144, 145, "js_exception", 834, 17],
["store_field", 144, 16, "js_empty_text", 835, 18],
["store_field", 144, 3, "js_empty_text", 835, 18],
["store_field", 144, 76, "is_int", 837, 11],
["store_field", 144, 53, "is_number", 838, 14],
["store_field", 144, 58, "is_null", 839, 12],
["store_field", 144, 34, "is_bool", 840, 12],
["store_field", 144, 52, "is_exception", 841, 17],
["store_field", 144, 25, "is_ptr", 842, 11],
["store_field", 144, 31, "is_imm_text", 843, 16],
["store_field", 144, 15, "is_text", 844, 12],
["store_field", 144, 11, "get_int", 846, 12],
["store_field", 144, 18, "is_number", 838, 14],
["store_field", 144, 59, "is_null", 839, 12],
["store_field", 144, 37, "is_bool", 840, 12],
["store_field", 144, 54, "is_exception", 841, 17],
["store_field", 144, 28, "is_ptr", 842, 11],
["store_field", 144, 42, "is_imm_text", 843, 16],
["store_field", 144, 17, "is_text", 844, 12],
["store_field", 144, 13, "get_int", 846, 12],
["store_field", 144, 72, "get_bool", 847, 13],
["store_field", 144, 14, "get_ptr", 848, 12],
["store_field", 144, 62, "get_float64", 849, 16],
["store_field", 144, 16, "get_ptr", 848, 12],
["store_field", 144, 26, "get_float64", 849, 16],
["store_field", 144, 75, "to_float64", 850, 15],
["store_field", 144, 43, "new_int", 852, 12],
["store_field", 144, 46, "new_int", 852, 12],
["store_field", 144, 67, "new_bool", 853, 13],
["store_field", 144, 8, "new_float64", 854, 16],
["store_field", 144, 40, "add", 856, 8],
["store_field", 144, 77, "new_float64", 854, 16],
["store_field", 144, 43, "add", 856, 8],
["store_field", 144, 5, "sub", 857, 8],
["store_field", 144, 1, "mul", 858, 8],
["store_field", 144, 54, "div", 859, 8],
["store_field", 144, 56, "div", 859, 8],
["store_field", 144, 2, "mod", 860, 8],
["store_field", 144, 71, "eq", 862, 7],
["store_field", 144, 68, "ne", 863, 7],
["store_field", 144, 49, "lt", 864, 7],
["store_field", 144, 41, "le", 865, 7],
["store_field", 144, 51, "lt", 864, 7],
["store_field", 144, 44, "le", 865, 7],
["store_field", 144, 69, "gt", 866, 7],
["store_field", 144, 70, "ge", 867, 7],
["store_field", 144, 55, "neg", 869, 8],
["store_field", 144, 26, "inc", 870, 8],
["store_field", 144, 28, "dec", 871, 8],
["store_field", 144, 35, "lnot", 872, 9],
["store_field", 144, 59, "bnot", 873, 9],
["store_field", 144, 30, "band", 875, 9],
["store_field", 144, 61, "bor", 876, 8],
["store_field", 144, 51, "bxor", 877, 9],
["store_field", 144, 56, "shl", 878, 8],
["store_field", 144, 57, "neg", 869, 8],
["store_field", 144, 29, "inc", 870, 8],
["store_field", 144, 31, "dec", 871, 8],
["store_field", 144, 38, "lnot", 872, 9],
["store_field", 144, 60, "bnot", 873, 9],
["store_field", 144, 33, "band", 875, 9],
["store_field", 144, 62, "bor", 876, 8],
["store_field", 144, 53, "bxor", 877, 9],
["store_field", 144, 58, "shl", 878, 8],
["store_field", 144, 73, "shr", 879, 8],
["store_field", 144, 3, "ushr", 880, 9],
["store_field", 144, 4, "concat", 882, 11],
["store_field", 144, 24, "eq_int", 884, 11],
["store_field", 144, 18, "ne_int", 885, 11],
["store_field", 144, 22, "lt_int", 886, 11],
["store_field", 144, 27, "le_int", 887, 11],
["store_field", 144, 7, "ushr", 880, 9],
["store_field", 144, 8, "concat", 882, 11],
["store_field", 144, 27, "eq_int", 884, 11],
["store_field", 144, 20, "ne_int", 885, 11],
["store_field", 144, 24, "lt_int", 886, 11],
["store_field", 144, 30, "le_int", 887, 11],
["store_field", 144, 74, "gt_int", 888, 11],
["store_field", 144, 9, "ge_int", 889, 11],
["store_field", 144, 77, "eq_float", 891, 13],
["store_field", 144, 37, "ne_float", 892, 13],
["store_field", 144, 38, "lt_float", 893, 13],
["store_field", 144, 10, "eq_float", 891, 13],
["store_field", 144, 40, "ne_float", 892, 13],
["store_field", 144, 41, "lt_float", 893, 13],
["store_field", 144, 63, "le_float", 894, 13],
["store_field", 144, 39, "gt_float", 895, 13],
["store_field", 144, 50, "ge_float", 896, 13],
["store_field", 144, 20, "eq_text", 898, 12],
["store_field", 144, 44, "ne_text", 899, 12],
["store_field", 144, 21, "lt_text", 900, 12],
["store_field", 144, 17, "le_text", 901, 12],
["store_field", 144, 46, "gt_text", 902, 12],
["store_field", 144, 12, "ge_text", 903, 12],
["store_field", 144, 60, "eq_bool", 905, 12],
["store_field", 144, 57, "ne_bool", 906, 12],
["store_field", 144, 45, "gt_float", 895, 13],
["store_field", 144, 52, "ge_float", 896, 13],
["store_field", 144, 22, "eq_text", 898, 12],
["store_field", 144, 35, "ne_text", 899, 12],
["store_field", 144, 23, "lt_text", 900, 12],
["store_field", 144, 19, "le_text", 901, 12],
["store_field", 144, 47, "gt_text", 902, 12],
["store_field", 144, 14, "ge_text", 903, 12],
["store_field", 144, 61, "eq_bool", 905, 12],
["store_field", 144, 55, "ne_bool", 906, 12],
["store_field", 144, 64, "is_identical", 908, 17],
["return", 144, 908, 17],
"_nop_ur_1",

File diff suppressed because it is too large Load Diff

View File

@@ -39,7 +39,7 @@
["add", 14, 7, 10, 18, 43],
["access", 15, "_use", 18, 69],
["add", 16, 14, 15, 18, 69],
["get", 18, 15, 1, 18, 16],
["get", 18, 9, 1, 18, 16],
["frame", 19, 18, 1, 18, 16],
["null", 20, 18, 16],
["setarg", 19, 0, 20, 18, 16],
@@ -212,7 +212,7 @@
["move", 3, 8, 51, 20],
["load_field", 12, 3, "tokens", 52, 23],
["get", 13, 6, 1, 52, 57],
["get", 15, 13, 1, 52, 13],
["get", 15, 4, 1, 52, 13],
["frame", 16, 15, 4, 52, 13],
["null", 17, 52, 13],
["setarg", 16, 0, 17, 52, 13],
@@ -522,20 +522,20 @@
"nr_slots": 29,
"nr_close_slots": 0,
"instructions": [
["get", 8, 9, 1, 72, 18],
["get", 8, 7, 1, 72, 18],
["frame", 9, 8, 1, 72, 18],
["null", 10, 72, 18],
["setarg", 9, 0, 10, 72, 18],
["setarg", 9, 1, 2, 72, 18],
["invoke", 9, 7, 72, 18],
["move", 4, 7, 72, 18],
["get", 12, 16, 1, 73, 19],
["get", 12, 17, 1, 73, 19],
["frame", 13, 12, 1, 73, 19],
["null", 14, 73, 19],
["setarg", 13, 0, 14, 73, 19],
["setarg", 13, 1, 4, 73, 19],
["invoke", 13, 11, 73, 19],
["move", 5, 11, 73, 19],
["move", 6, 11, 73, 19],
[
"access",
16,
@@ -552,7 +552,7 @@
["null", 18, 74, 20],
["access", 19, "encode", 74, 20],
["array", 20, 0, 74, 20],
["push", 20, 5, 74, 20],
["push", 20, 6, 74, 20],
["frame", 21, 16, 2, 74, 20],
["setarg", 21, 0, 18, 74, 20],
["setarg", 21, 1, 19, 74, 20],
@@ -563,10 +563,10 @@
["load_field", 22, 16, "encode", 74, 20],
["frame", 23, 22, 1, 74, 20],
["setarg", 23, 0, 16, 74, 20],
["setarg", 23, 1, 5, 74, 20],
["setarg", 23, 1, 6, 74, 20],
["invoke", 23, 15, 74, 20],
"call_done_42",
["move", 6, 15, 74, 20],
["move", 5, 15, 74, 20],
[
"access",
25,
@@ -582,7 +582,7 @@
["null", 27, 75, 10],
["setarg", 26, 0, 27, 75, 10],
["setarg", 26, 1, 1, 75, 10],
["setarg", 26, 2, 6, 75, 10],
["setarg", 26, 2, 5, 75, 10],
["setarg", 26, 3, 3, 75, 10],
["tail_invoke", 26, 24, 75, 10],
["return", 24, 75, 10],
@@ -598,12 +598,12 @@
"nr_slots": 122,
"nr_close_slots": 0,
"instructions": [
["null", 2, 79, 16],
["null", 6, 80, 19],
["null", 3, 81, 16],
["null", 4, 82, 13],
["null", 3, 79, 16],
["null", 2, 80, 19],
["null", 4, 81, 16],
["null", 5, 82, 13],
["null", 7, 83, 20],
["null", 5, 84, 20],
["null", 6, 84, 20],
["get", 8, 1, 1, 85, 7],
["load_dynamic", 9, 8, 1, 85, 17],
["jump_false", 9, "if_else_43", 85, 17],
@@ -637,17 +637,17 @@
["add", 19, 12, 15, 89, 39],
["access", 20, "_use", 89, 65],
["add", 21, 19, 20, 89, 65],
["get", 23, 15, 1, 89, 12],
["get", 23, 9, 1, 89, 12],
["frame", 24, 23, 1, 89, 12],
["null", 25, 89, 12],
["setarg", 24, 0, 25, 89, 12],
["setarg", 24, 1, 21, 89, 12],
["invoke", 24, 22, 89, 12],
["move", 2, 22, 89, 12],
["jump_false", 2, "if_else_45", 90, 7],
["move", 3, 22, 89, 12],
["jump_false", 3, "if_else_45", 90, 7],
["get", 26, 1, 1, 91, 5],
["store_dynamic", 26, 2, 1, 91, 15],
["return", 2, 92, 12],
["store_dynamic", 26, 3, 1, 91, 15],
["return", 3, 92, 12],
"_nop_ur_2",
"if_else_45",
"if_end_46",
@@ -725,7 +725,7 @@
["setarg", 53, 0, 54, 98, 18],
["setarg", 53, 1, 42, 98, 18],
["invoke", 53, 51, 98, 18],
["move", 5, 51, 98, 18],
["move", 6, 51, 98, 18],
["record", 55, 0],
["get", 56, 11, 1, 99, 54],
["store_field", 55, 56, "use", 99, 54],
@@ -744,26 +744,26 @@
["null", 60, 99, 14],
["setarg", 59, 0, 60, 99, 14],
["setarg", 59, 1, 1, 99, 14],
["setarg", 59, 2, 5, 99, 14],
["setarg", 59, 2, 6, 99, 14],
["setarg", 59, 3, 55, 99, 14],
["invoke", 59, 57, 99, 14],
["move", 2, 57, 99, 14],
["move", 3, 57, 99, 14],
["get", 61, 1, 1, 100, 5],
["store_dynamic", 61, 2, 1, 100, 15],
["return", 2, 101, 12],
["store_dynamic", 61, 3, 1, 100, 15],
["return", 3, 101, 12],
"_nop_ur_3",
"if_else_47",
"if_end_48",
["access", 62, ".cm", 105, 22],
["add", 63, 1, 62, 105, 22],
["move", 6, 63, 105, 22],
["move", 2, 63, 105, 22],
["get", 65, 3, 1, 106, 8],
["is_proxy", 66, 65, 106, 8],
["jump_false", 66, "record_path_55", 106, 8],
["null", 67, 106, 8],
["access", 68, "is_file", 106, 8],
["array", 69, 0, 106, 8],
["push", 69, 6, 106, 8],
["push", 69, 2, 106, 8],
["frame", 70, 65, 2, 106, 8],
["setarg", 70, 0, 67, 106, 8],
["setarg", 70, 1, 68, 106, 8],
@@ -774,7 +774,7 @@
["load_field", 71, 65, "is_file", 106, 8],
["frame", 72, 71, 1, 106, 8],
["setarg", 72, 0, 65, 106, 8],
["setarg", 72, 1, 6, 106, 8],
["setarg", 72, 1, 2, 106, 8],
["invoke", 72, 64, 106, 8],
"call_done_56",
"_nop_bl_1",
@@ -795,7 +795,7 @@
["add", 77, 76, 1, 107, 35],
["access", 78, ".cm", 107, 42],
["add", 79, 77, 78, 107, 42],
["move", 6, 79, 107, 42],
["move", 2, 79, 107, 42],
["jump", "if_end_54", 107, 42],
"if_else_53",
"if_end_54",
@@ -805,7 +805,7 @@
["null", 83, 108, 7],
["access", 84, "is_file", 108, 7],
["array", 85, 0, 108, 7],
["push", 85, 6, 108, 7],
["push", 85, 2, 108, 7],
["frame", 86, 81, 2, 108, 7],
["setarg", 86, 0, 83, 108, 7],
["setarg", 86, 1, 84, 108, 7],
@@ -816,7 +816,7 @@
["load_field", 87, 81, "is_file", 108, 7],
["frame", 88, 87, 1, 108, 7],
["setarg", 88, 0, 81, 108, 7],
["setarg", 88, 1, 6, 108, 7],
["setarg", 88, 1, 2, 108, 7],
["invoke", 88, 80, 108, 7],
"call_done_60",
["jump_false", 80, "if_else_57", 108, 7],
@@ -826,7 +826,7 @@
["null", 92, 109, 19],
["access", 93, "slurp", 109, 19],
["array", 94, 0, 109, 19],
["push", 94, 6, 109, 19],
["push", 94, 2, 109, 19],
["frame", 95, 90, 2, 109, 19],
["setarg", 95, 0, 92, 109, 19],
["setarg", 95, 1, 93, 109, 19],
@@ -837,7 +837,7 @@
["load_field", 96, 90, "slurp", 109, 19],
["frame", 97, 96, 1, 109, 19],
["setarg", 97, 0, 90, 109, 19],
["setarg", 97, 1, 6, 109, 19],
["setarg", 97, 1, 2, 109, 19],
["invoke", 97, 89, 109, 19],
"call_done_62",
[
@@ -856,30 +856,30 @@
["setarg", 100, 0, 101, 109, 14],
["setarg", 100, 1, 89, 109, 14],
["invoke", 100, 98, 109, 14],
["move", 3, 98, 109, 14],
["move", 4, 98, 109, 14],
["get", 103, 10, 1, 110, 11],
["frame", 104, 103, 2, 110, 11],
["null", 105, 110, 11],
["setarg", 104, 0, 105, 110, 11],
["setarg", 104, 1, 3, 110, 11],
["setarg", 104, 2, 6, 110, 11],
["setarg", 104, 1, 4, 110, 11],
["setarg", 104, 2, 2, 110, 11],
["invoke", 104, 102, 110, 11],
["move", 4, 102, 110, 11],
["move", 5, 102, 110, 11],
["record", 106, 0],
["get", 107, 11, 1, 111, 39],
["store_field", 106, 107, "use", 111, 39],
["get", 109, 12, 1, 111, 14],
["get", 109, 13, 1, 111, 14],
["frame", 110, 109, 3, 111, 14],
["null", 111, 111, 14],
["setarg", 110, 0, 111, 111, 14],
["setarg", 110, 1, 1, 111, 14],
["setarg", 110, 2, 4, 111, 14],
["setarg", 110, 2, 5, 111, 14],
["setarg", 110, 3, 106, 111, 14],
["invoke", 110, 108, 111, 14],
["move", 2, 108, 111, 14],
["move", 3, 108, 111, 14],
["get", 112, 1, 1, 112, 5],
["store_dynamic", 112, 2, 1, 112, 15],
["return", 2, 113, 12],
["store_dynamic", 112, 3, 1, 112, 15],
["return", 3, 113, 12],
"_nop_ur_4",
"if_else_57",
"if_end_58",
@@ -920,11 +920,11 @@
["function", 20, 0, 0, 0],
["move", 19, 20, 0, 0],
["function", 21, 1, 0, 0],
["move", 14, 21, 0, 0],
["move", 12, 21, 0, 0],
["function", 22, 2, 0, 0],
["move", 10, 22, 0, 0],
["function", 23, 3, 0, 0],
["move", 12, 23, 0, 0],
["move", 13, 23, 0, 0],
["function", 24, 4, 0, 0],
["move", 11, 24, 0, 0],
[
@@ -939,9 +939,9 @@
21
],
["load_field", 26, 25, "load_internal", 7, 21],
["move", 15, 26, 7, 21],
["move", 9, 26, 7, 21],
["access", 27, "js_core_internal_fd_use", 8, 24],
["frame", 29, 15, 1, 8, 10],
["frame", 29, 9, 1, 8, 10],
["null", 30, 8, 10],
["setarg", 29, 0, 30, 8, 10],
["setarg", 29, 1, 27, 8, 10],
@@ -978,50 +978,50 @@
["access", 36, "json", 13, 11],
["store_field", 1, 35, 36, 13, 11],
["access", 37, "tokenize", 38, 30],
["frame", 39, 14, 1, 38, 20],
["frame", 39, 12, 1, 38, 20],
["null", 40, 38, 20],
["setarg", 39, 0, 40, 38, 20],
["setarg", 39, 1, 37, 38, 20],
["invoke", 39, 38, 38, 20],
["move", 6, 38, 38, 20],
["access", 41, "parse", 39, 27],
["frame", 43, 14, 1, 39, 17],
["frame", 43, 12, 1, 39, 17],
["null", 44, 39, 17],
["setarg", 43, 0, 44, 39, 17],
["setarg", 43, 1, 41, 39, 17],
["invoke", 43, 42, 39, 17],
["move", 13, 42, 39, 17],
["move", 4, 42, 39, 17],
["access", 45, "fold", 40, 26],
["frame", 47, 14, 1, 40, 16],
["frame", 47, 12, 1, 40, 16],
["null", 48, 40, 16],
["setarg", 47, 0, 48, 40, 16],
["setarg", 47, 1, 45, 40, 16],
["invoke", 47, 46, 40, 16],
["move", 2, 46, 40, 16],
["access", 49, "mcode", 41, 27],
["frame", 51, 14, 1, 41, 17],
["frame", 51, 12, 1, 41, 17],
["null", 52, 41, 17],
["setarg", 51, 0, 52, 41, 17],
["setarg", 51, 1, 49, 41, 17],
["invoke", 51, 50, 41, 17],
["move", 9, 50, 41, 17],
["move", 7, 50, 41, 17],
["access", 53, "streamline", 42, 32],
["frame", 55, 14, 1, 42, 22],
["frame", 55, 12, 1, 42, 22],
["null", 56, 42, 22],
["setarg", 55, 0, 56, 42, 22],
["setarg", 55, 1, 53, 42, 22],
["invoke", 55, 54, 42, 22],
["move", 16, 54, 42, 22],
["move", 17, 54, 42, 22],
["access", 57, "tokenize", 44, 11],
["store_field", 1, 6, 57, 44, 11],
["access", 58, "parse", 45, 11],
["store_field", 1, 13, 58, 45, 11],
["store_field", 1, 4, 58, 45, 11],
["access", 59, "fold", 46, 11],
["store_field", 1, 2, 59, 46, 11],
["access", 60, "mcode", 47, 11],
["store_field", 1, 9, 60, 47, 11],
["store_field", 1, 7, 60, 47, 11],
["access", 61, "streamline", 48, 11],
["store_field", 1, 16, 61, 48, 11],
["store_field", 1, 17, 61, 48, 11],
[
"access",
62,
@@ -1035,15 +1035,15 @@
],
["access", 63, 0, 121, 20],
["load_index", 64, 62, 63, 121, 20],
["move", 17, 64, 121, 20],
["move", 16, 64, 121, 20],
["array", 65, 0, 122, 17],
["move", 5, 65, 122, 17],
["access", 7, 1, 123, 10],
["null", 4, 124, 17],
["null", 8, 125, 14],
["move", 14, 65, 122, 17],
["access", 8, 1, 123, 10],
["null", 15, 124, 17],
["null", 5, 125, 14],
["null", 18, 126, 11],
"_nop_bl_1",
["jump_true", 17, "if_else_63", 128, 6],
["jump_true", 16, "if_else_63", 128, 6],
["access", 67, "seed: no program specified\n", 129, 9],
[
"access",
@@ -1078,25 +1078,25 @@
20
],
["length", 73, 72, 133, 20],
["is_int", 75, 7, 133, 20],
["is_int", 75, 8, 133, 20],
["jump_false", 75, "rel_ni_67", 133, 20],
"_nop_tc_1",
"_nop_tc_2",
["lt_int", 74, 7, 73, 133, 20],
["lt_int", 74, 8, 73, 133, 20],
["jump", "rel_done_69", 133, 20],
"rel_ni_67",
["is_num", 75, 7, 133, 20],
["is_num", 75, 8, 133, 20],
["jump_false", 75, "rel_nn_68", 133, 20],
"_nop_tc_3",
"_nop_tc_4",
["lt_float", 74, 7, 73, 133, 20],
["lt_float", 74, 8, 73, 133, 20],
["jump", "rel_done_69", 133, 20],
"rel_nn_68",
["is_text", 75, 7, 133, 20],
["is_text", 75, 8, 133, 20],
["jump_false", 75, "rel_err_70", 133, 20],
"_nop_tc_5",
["jump", "rel_err_70", 133, 20],
["lt_text", 74, 7, 73, 133, 20],
["lt_text", 74, 8, 73, 133, 20],
["jump", "rel_done_69", 133, 20],
"rel_err_70",
["disrupt", 133, 20],
@@ -1113,28 +1113,28 @@
134,
19
],
["load_dynamic", 78, 77, 7, 134, 24],
["is_array", 79, 5, 134, 24],
["load_dynamic", 78, 77, 8, 134, 24],
["is_array", 79, 14, 134, 24],
["jump_false", 79, "push_err_71", 134, 24],
["push", 5, 78, 134, 24],
["push", 14, 78, 134, 24],
["jump", "push_done_72", 134, 24],
"push_err_71",
["disrupt", 134, 24],
"push_done_72",
["access", 80, 1, 135, 13],
["add", 81, 7, 80, 135, 13],
["move", 7, 81, 135, 13],
["add", 81, 8, 80, 135, 13],
["move", 8, 81, 135, 13],
["jump", "while_start_65", 135, 13],
"while_end_66",
["access", 82, ".ce", 138, 23],
["add", 83, 17, 82, 138, 23],
["move", 4, 83, 138, 23],
["add", 83, 16, 82, 138, 23],
["move", 15, 83, 138, 23],
["is_proxy", 85, 3, 139, 6],
["jump_false", 85, "record_path_75", 139, 6],
["null", 86, 139, 6],
["access", 87, "is_file", 139, 6],
["array", 88, 0, 139, 6],
["push", 88, 4, 139, 6],
["push", 88, 15, 139, 6],
["frame", 89, 3, 2, 139, 6],
["setarg", 89, 0, 86, 139, 6],
["setarg", 89, 1, 87, 139, 6],
@@ -1145,7 +1145,7 @@
["load_field", 90, 3, "is_file", 139, 6],
["frame", 91, 90, 1, 139, 6],
["setarg", 91, 0, 3, 139, 6],
["setarg", 91, 1, 4, 139, 6],
["setarg", 91, 1, 15, 139, 6],
["invoke", 91, 84, 139, 6],
"call_done_76",
"_nop_bl_2",
@@ -1163,10 +1163,10 @@
],
["access", 94, "/", 140, 27],
["add", 95, 93, 94, 140, 27],
["add", 96, 95, 17, 140, 33],
["add", 96, 95, 16, 140, 33],
["access", 97, ".ce", 140, 43],
["add", 98, 96, 97, 140, 43],
["move", 4, 98, 140, 43],
["move", 15, 98, 140, 43],
["jump", "if_end_74", 140, 43],
"if_else_73",
"if_end_74",
@@ -1175,7 +1175,7 @@
["null", 101, 141, 6],
["access", 102, "is_file", 141, 6],
["array", 103, 0, 141, 6],
["push", 103, 4, 141, 6],
["push", 103, 15, 141, 6],
["frame", 104, 3, 2, 141, 6],
["setarg", 104, 0, 101, 141, 6],
["setarg", 104, 1, 102, 141, 6],
@@ -1186,20 +1186,20 @@
["load_field", 105, 3, "is_file", 141, 6],
["frame", 106, 105, 1, 141, 6],
["setarg", 106, 0, 3, 141, 6],
["setarg", 106, 1, 4, 141, 6],
["setarg", 106, 1, 15, 141, 6],
["invoke", 106, 99, 141, 6],
"call_done_80",
"_nop_bl_3",
["jump_true", 99, "if_else_77", 141, 6],
["access", 108, ".cm", 142, 25],
["add", 109, 17, 108, 142, 25],
["move", 4, 109, 142, 25],
["add", 109, 16, 108, 142, 25],
["move", 15, 109, 142, 25],
["is_proxy", 111, 3, 143, 8],
["jump_false", 111, "record_path_83", 143, 8],
["null", 112, 143, 8],
["access", 113, "is_file", 143, 8],
["array", 114, 0, 143, 8],
["push", 114, 4, 143, 8],
["push", 114, 15, 143, 8],
["frame", 115, 3, 2, 143, 8],
["setarg", 115, 0, 112, 143, 8],
["setarg", 115, 1, 113, 143, 8],
@@ -1210,7 +1210,7 @@
["load_field", 116, 3, "is_file", 143, 8],
["frame", 117, 116, 1, 143, 8],
["setarg", 117, 0, 3, 143, 8],
["setarg", 117, 1, 4, 143, 8],
["setarg", 117, 1, 15, 143, 8],
["invoke", 117, 110, 143, 8],
"call_done_84",
"_nop_bl_4",
@@ -1228,10 +1228,10 @@
],
["access", 120, "/", 144, 29],
["add", 121, 119, 120, 144, 29],
["add", 122, 121, 17, 144, 35],
["add", 122, 121, 16, 144, 35],
["access", 123, ".cm", 144, 45],
["add", 124, 122, 123, 144, 45],
["move", 4, 124, 144, 45],
["move", 15, 124, 144, 45],
["jump", "if_end_82", 144, 45],
"if_else_81",
"if_end_82",
@@ -1243,7 +1243,7 @@
["null", 127, 146, 6],
["access", 128, "is_file", 146, 6],
["array", 129, 0, 146, 6],
["push", 129, 4, 146, 6],
["push", 129, 15, 146, 6],
["frame", 130, 3, 2, 146, 6],
["setarg", 130, 0, 127, 146, 6],
["setarg", 130, 1, 128, 146, 6],
@@ -1254,13 +1254,13 @@
["load_field", 131, 3, "is_file", 146, 6],
["frame", 132, 131, 1, 146, 6],
["setarg", 132, 0, 3, 146, 6],
["setarg", 132, 1, 4, 146, 6],
["setarg", 132, 1, 15, 146, 6],
["invoke", 132, 125, 146, 6],
"call_done_88",
"_nop_bl_5",
["jump_true", 125, "if_else_85", 146, 6],
["access", 134, "seed: program not found: ", 147, 9],
["add", 135, 134, 17, 147, 39],
["add", 135, 134, 16, 147, 39],
["access", 136, "\n", 147, 49],
["add", 137, 135, 136, 147, 49],
[
@@ -1288,7 +1288,7 @@
["null", 144, 151, 15],
["access", 145, "slurp", 151, 15],
["array", 146, 0, 151, 15],
["push", 146, 4, 151, 15],
["push", 146, 15, 151, 15],
["frame", 147, 3, 2, 151, 15],
["setarg", 147, 0, 144, 151, 15],
["setarg", 147, 1, 145, 151, 15],
@@ -1299,7 +1299,7 @@
["load_field", 148, 3, "slurp", 151, 15],
["frame", 149, 148, 1, 151, 15],
["setarg", 149, 0, 3, 151, 15],
["setarg", 149, 1, 4, 151, 15],
["setarg", 149, 1, 15, 151, 15],
["invoke", 149, 142, 151, 15],
"call_done_90",
[
@@ -1318,21 +1318,21 @@
["setarg", 152, 0, 153, 151, 10],
["setarg", 152, 1, 142, 151, 10],
["invoke", 152, 150, 151, 10],
["move", 8, 150, 151, 10],
["move", 5, 150, 151, 10],
["frame", 155, 10, 2, 152, 7],
["null", 156, 152, 7],
["setarg", 155, 0, 156, 152, 7],
["setarg", 155, 1, 8, 152, 7],
["setarg", 155, 2, 4, 152, 7],
["setarg", 155, 1, 5, 152, 7],
["setarg", 155, 2, 15, 152, 7],
["invoke", 155, 154, 152, 7],
["move", 18, 154, 152, 7],
["record", 157, 0],
["store_field", 157, 11, "use", 153, 29],
["store_field", 157, 5, "args", 153, 43],
["frame", 159, 12, 3, 153, 1],
["store_field", 157, 14, "args", 153, 43],
["frame", 159, 13, 3, 153, 1],
["null", 160, 153, 1],
["setarg", 159, 0, 160, 153, 1],
["setarg", 159, 1, 17, 153, 1],
["setarg", 159, 1, 16, 153, 1],
["setarg", 159, 2, 18, 153, 1],
["setarg", 159, 3, 157, 153, 1],
["invoke", 159, 158, 153, 1],

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -97,7 +97,7 @@
["access", 25, 0, 166, 18],
["load_index", 26, 6, 25, 166, 18],
["move", 8, 26, 166, 18],
["get", 27, 3, 1, 167, 19],
["get", 27, 2, 1, 167, 19],
["load_dynamic", 28, 27, 8, 167, 34],
["move", 5, 28, 167, 34],
["null", 29, 168, 24],
@@ -400,13 +400,13 @@
["load_field", 10, 1, "instructions", 190, 22],
["move", 5, 10, 190, 22],
["array", 11, 0, 191, 16],
["move", 7, 11, 191, 16],
["move", 8, 11, 191, 16],
["record", 12, 0],
["move", 2, 12, 192, 16],
["access", 8, 0, 193, 11],
["access", 9, 0, 193, 11],
["null", 4, 194, 15],
["null", 6, 195, 12],
["null", 9, 196, 19],
["null", 7, 196, 19],
["null", 3, 197, 16],
["null", 13, 199, 23],
["is_identical", 14, 5, 13, 199, 23],
@@ -449,37 +449,37 @@
["false", 14, 199, 23],
"eq_done_54",
["jump_false", 14, "if_else_52", 199, 23],
["return", 7, 199, 36],
["return", 8, 199, 36],
"_nop_ur_1",
"if_else_52",
"if_end_53",
"while_start_60",
["length", 17, 5, 202, 21],
["is_int", 19, 8, 202, 21],
["is_int", 19, 9, 202, 21],
["jump_false", 19, "rel_ni_62", 202, 21],
"_nop_tc_7",
"_nop_tc_8",
["lt_int", 18, 8, 17, 202, 21],
["lt_int", 18, 9, 17, 202, 21],
["jump", "rel_done_64", 202, 21],
"rel_ni_62",
["is_num", 19, 8, 202, 21],
["is_num", 19, 9, 202, 21],
["jump_false", 19, "rel_nn_63", 202, 21],
"_nop_tc_9",
"_nop_tc_10",
["lt_float", 18, 8, 17, 202, 21],
["lt_float", 18, 9, 17, 202, 21],
["jump", "rel_done_64", 202, 21],
"rel_nn_63",
["is_text", 19, 8, 202, 21],
["is_text", 19, 9, 202, 21],
["jump_false", 19, "rel_err_65", 202, 21],
"_nop_tc_11",
["jump", "rel_err_65", 202, 21],
["lt_text", 18, 8, 17, 202, 21],
["lt_text", 18, 9, 17, 202, 21],
["jump", "rel_done_64", 202, 21],
"rel_err_65",
["disrupt", 202, 21],
"rel_done_64",
["jump_false", 18, "while_end_61", 202, 21],
["load_dynamic", 21, 5, 8, 203, 26],
["load_dynamic", 21, 5, 9, 203, 26],
["move", 4, 21, 203, 26],
["is_text", 22, 4, 204, 17],
["move", 23, 22, 204, 17],
@@ -512,96 +512,96 @@
"if_else_66",
"if_end_67",
["access", 31, 1, 207, 13],
["add", 32, 8, 31, 207, 13],
["move", 8, 32, 207, 13],
["add", 32, 9, 31, 207, 13],
["move", 9, 32, 207, 13],
["jump", "while_start_60", 207, 13],
"while_end_61",
["access", 33, 0, 211, 7],
["move", 8, 33, 211, 7],
["move", 9, 33, 211, 7],
"while_start_69",
["length", 34, 5, 212, 21],
["is_int", 36, 8, 212, 21],
["is_int", 36, 9, 212, 21],
["jump_false", 36, "rel_ni_71", 212, 21],
"_nop_tc_12",
"_nop_tc_13",
["lt_int", 35, 8, 34, 212, 21],
["lt_int", 35, 9, 34, 212, 21],
["jump", "rel_done_73", 212, 21],
"rel_ni_71",
["is_num", 36, 8, 212, 21],
["is_num", 36, 9, 212, 21],
["jump_false", 36, "rel_nn_72", 212, 21],
"_nop_tc_14",
"_nop_tc_15",
["lt_float", 35, 8, 34, 212, 21],
["lt_float", 35, 9, 34, 212, 21],
["jump", "rel_done_73", 212, 21],
"rel_nn_72",
["is_text", 36, 8, 212, 21],
["is_text", 36, 9, 212, 21],
["jump_false", 36, "rel_err_74", 212, 21],
"_nop_tc_16",
["jump", "rel_err_74", 212, 21],
["lt_text", 35, 8, 34, 212, 21],
["lt_text", 35, 9, 34, 212, 21],
["jump", "rel_done_73", 212, 21],
"rel_err_74",
["disrupt", 212, 21],
"rel_done_73",
["jump_false", 35, "while_end_70", 212, 21],
["load_dynamic", 38, 5, 8, 213, 26],
["load_dynamic", 38, 5, 9, 213, 26],
["move", 4, 38, 213, 26],
["is_array", 39, 4, 214, 18],
["jump_false", 39, "if_else_75", 214, 18],
["access", 40, 0, 215, 18],
["load_index", 41, 4, 40, 215, 18],
["move", 6, 41, 215, 18],
["get", 42, 6, 1, 216, 19],
["get", 42, 5, 1, 216, 19],
["load_dynamic", 43, 42, 6, 216, 34],
["move", 9, 43, 216, 34],
["move", 7, 43, 216, 34],
["null", 44, 217, 24],
["is_identical", 45, 9, 44, 217, 24],
["is_identical", 45, 7, 44, 217, 24],
["jump_true", 45, "ne_nid_80", 217, 24],
["jump", "ne_ni_81", 217, 24],
"ne_nid_80",
["false", 45, 217, 24],
["jump", "ne_done_79", 217, 24],
"ne_ni_81",
["is_int", 46, 9, 217, 24],
["is_int", 46, 7, 217, 24],
["jump_false", 46, "ne_nn_82", 217, 24],
"_nop_tc_17",
["jump", "ne_nn_82", 217, 24],
["ne_int", 45, 9, 44, 217, 24],
["ne_int", 45, 7, 44, 217, 24],
["jump", "ne_done_79", 217, 24],
"ne_nn_82",
["is_num", 46, 9, 217, 24],
["is_num", 46, 7, 217, 24],
["jump_false", 46, "ne_nt_83", 217, 24],
"_nop_tc_18",
["jump", "ne_nt_83", 217, 24],
["ne_float", 45, 9, 44, 217, 24],
["ne_float", 45, 7, 44, 217, 24],
["jump", "ne_done_79", 217, 24],
"ne_nt_83",
["is_text", 46, 9, 217, 24],
["is_text", 46, 7, 217, 24],
["jump_false", 46, "ne_nnl_84", 217, 24],
"_nop_tc_19",
["jump", "ne_nnl_84", 217, 24],
["ne_text", 45, 9, 44, 217, 24],
["ne_text", 45, 7, 44, 217, 24],
["jump", "ne_done_79", 217, 24],
"ne_nnl_84",
["is_null", 46, 9, 217, 24],
["is_null", 46, 7, 217, 24],
["jump_false", 46, "ne_nb_85", 217, 24],
"_nop_tc_20",
"_nop_tc_21",
["false", 45, 217, 24],
["jump", "ne_done_79", 217, 24],
"ne_nb_85",
["is_bool", 46, 9, 217, 24],
["is_bool", 46, 7, 217, 24],
["jump_false", 46, "ne_mis_86", 217, 24],
"_nop_tc_22",
["jump", "ne_mis_86", 217, 24],
["ne_bool", 45, 9, 44, 217, 24],
["ne_bool", 45, 7, 44, 217, 24],
["jump", "ne_done_79", 217, 24],
"ne_mis_86",
["true", 45, 217, 24],
"ne_done_79",
["jump_false", 45, "if_else_77", 217, 24],
["access", 48, 1, 218, 36],
["add", 49, 9, 48, 218, 36],
["add", 49, 7, 48, 218, 36],
["load_dynamic", 50, 4, 49, 218, 36],
["move", 3, 50, 218, 36],
["is_text", 51, 3, 219, 21],
@@ -670,7 +670,7 @@
["frame", 60, 59, 1, 1, 1],
["null", 61, 1, 1],
["setarg", 60, 0, 61, 1, 1],
["setarg", 60, 1, 8, 1, 1],
["setarg", 60, 1, 9, 1, 1],
["invoke", 60, 58, 1, 1],
["array", 62, 0, 1, 1],
["push", 62, 58, 1, 1],
@@ -694,9 +694,9 @@
["setarg", 66, 1, 64, 1, 1],
["setarg", 66, 2, 62, 1, 1],
["invoke", 66, 65, 1, 1],
["is_array", 68, 7, 1, 1],
["is_array", 68, 8, 1, 1],
["jump_false", 68, "push_err_98", 1, 1],
["push", 7, 65, 1, 1],
["push", 8, 65, 1, 1],
["jump", "push_done_99", 1, 1],
"push_err_98",
["disrupt", 1, 1],
@@ -711,11 +711,11 @@
"if_else_75",
"if_end_76",
["access", 69, 1, 224, 13],
["add", 70, 8, 69, 224, 13],
["move", 8, 70, 224, 13],
["add", 70, 9, 69, 224, 13],
["move", 9, 70, 224, 13],
["jump", "while_start_69", 224, 13],
"while_end_70",
["return", 7, 226, 10],
["return", 8, 226, 10],
"_nop_ur_2",
"_nop_ur_3"
],
@@ -729,7 +729,7 @@
"nr_close_slots": 0,
"instructions": [
["load_field", 20, 1, "instructions", 232, 22],
["move", 5, 20, 232, 22],
["move", 4, 20, 232, 22],
["array", 21, 0, 233, 16],
["move", 18, 21, 233, 16],
["record", 22, 0],
@@ -742,41 +742,41 @@
["null", 9, 240, 12],
["null", 16, 241, 12],
["null", 23, 243, 23],
["is_identical", 24, 5, 23, 243, 23],
["is_identical", 24, 4, 23, 243, 23],
["jump_true", 24, "eq_done_102", 243, 23],
["is_int", 25, 5, 243, 23],
["is_int", 25, 4, 243, 23],
["jump_false", 25, "eq_ni_103", 243, 23],
"_nop_tc_1",
["jump", "eq_ni_103", 243, 23],
["eq_int", 24, 5, 23, 243, 23],
["eq_int", 24, 4, 23, 243, 23],
["jump", "eq_done_102", 243, 23],
"eq_ni_103",
["is_num", 25, 5, 243, 23],
["is_num", 25, 4, 243, 23],
["jump_false", 25, "eq_nn_104", 243, 23],
"_nop_tc_2",
["jump", "eq_nn_104", 243, 23],
["eq_float", 24, 5, 23, 243, 23],
["eq_float", 24, 4, 23, 243, 23],
["jump", "eq_done_102", 243, 23],
"eq_nn_104",
["is_text", 25, 5, 243, 23],
["is_text", 25, 4, 243, 23],
["jump_false", 25, "eq_nt_105", 243, 23],
"_nop_tc_3",
["jump", "eq_nt_105", 243, 23],
["eq_text", 24, 5, 23, 243, 23],
["eq_text", 24, 4, 23, 243, 23],
["jump", "eq_done_102", 243, 23],
"eq_nt_105",
["is_null", 25, 5, 243, 23],
["is_null", 25, 4, 243, 23],
["jump_false", 25, "eq_nnl_106", 243, 23],
"_nop_tc_4",
"_nop_tc_5",
["true", 24, 243, 23],
["jump", "eq_done_102", 243, 23],
"eq_nnl_106",
["is_bool", 25, 5, 243, 23],
["is_bool", 25, 4, 243, 23],
["jump_false", 25, "eq_nb_107", 243, 23],
"_nop_tc_6",
["jump", "eq_nb_107", 243, 23],
["eq_bool", 24, 5, 23, 243, 23],
["eq_bool", 24, 4, 23, 243, 23],
["jump", "eq_done_102", 243, 23],
"eq_nb_107",
["false", 24, 243, 23],
@@ -803,7 +803,7 @@
["store_field", 27, 32, "le_int", 252, 69],
["true", 33, 252, 83],
["store_field", 27, 33, "ge_int", 252, 83],
["move", 4, 27, 252, 83],
["move", 3, 27, 252, 83],
["record", 34, 0],
["true", 35, 255, 15],
["store_field", 34, 35, "eq_float", 255, 15],
@@ -817,7 +817,7 @@
["store_field", 34, 39, "le_float", 255, 79],
["true", 40, 255, 95],
["store_field", 34, 40, "ge_float", 255, 95],
["move", 3, 34, 255, 95],
["move", 5, 34, 255, 95],
["record", 41, 0],
["true", 42, 258, 14],
["store_field", 41, 42, "eq_text", 258, 14],
@@ -847,7 +847,7 @@
["store_field", 49, 54, "or", 262, 61],
["move", 17, 49, 262, 61],
"while_start_108",
["length", 55, 5, 265, 21],
["length", 55, 4, 265, 21],
["is_int", 57, 19, 265, 21],
["jump_false", 57, "rel_ni_110", 265, 21],
"_nop_tc_7",
@@ -872,7 +872,7 @@
["disrupt", 265, 21],
"rel_done_112",
["jump_false", 56, "while_end_109", 265, 21],
["load_dynamic", 59, 5, 19, 266, 26],
["load_dynamic", 59, 4, 19, 266, 26],
["move", 12, 59, 266, 26],
["is_text", 60, 12, 269, 17],
["move", 61, 60, 269, 17],
@@ -1213,7 +1213,7 @@
"if_end_142",
"if_end_128",
"if_end_120",
["load_dynamic", 133, 4, 15, 300, 17],
["load_dynamic", 133, 3, 15, 300, 17],
["true", 134, 300, 24],
["is_identical", 135, 133, 134, 300, 24],
["jump_true", 135, "eq_done_159", 300, 24],
@@ -1741,7 +1741,7 @@
"if_end_200",
["jump", "if_end_157", 1, 1],
"if_else_156",
["load_dynamic", 211, 3, 15, 313, 26],
["load_dynamic", 211, 5, 15, 313, 26],
["true", 212, 313, 33],
["is_identical", 213, 211, 212, 313, 33],
["jump_true", 213, "eq_done_238", 313, 33],
@@ -3087,7 +3087,7 @@
"if_end_315",
"if_end_236",
"if_end_157",
["get", 409, 1, 1, 348, 9],
["get", 409, 8, 1, 348, 9],
["load_dynamic", 410, 409, 15, 348, 21],
["true", 411, 348, 28],
["is_identical", 412, 410, 411, 348, 28],
@@ -3331,52 +3331,52 @@
"nr_close_slots": 0,
"instructions": [
["load_field", 10, 1, "instructions", 367, 22],
["move", 5, 10, 367, 22],
["move", 4, 10, 367, 22],
["array", 11, 0, 368, 16],
["move", 7, 11, 368, 16],
["record", 12, 0],
["move", 9, 12, 369, 14],
["access", 8, 0, 370, 11],
["null", 3, 371, 15],
["null", 6, 372, 12],
["null", 4, 373, 19],
["null", 5, 372, 12],
["null", 6, 373, 19],
["null", 2, 374, 16],
["null", 13, 376, 23],
["is_identical", 14, 5, 13, 376, 23],
["is_identical", 14, 4, 13, 376, 23],
["jump_true", 14, "eq_done_470", 376, 23],
["is_int", 15, 5, 376, 23],
["is_int", 15, 4, 376, 23],
["jump_false", 15, "eq_ni_471", 376, 23],
"_nop_tc_1",
["jump", "eq_ni_471", 376, 23],
["eq_int", 14, 5, 13, 376, 23],
["eq_int", 14, 4, 13, 376, 23],
["jump", "eq_done_470", 376, 23],
"eq_ni_471",
["is_num", 15, 5, 376, 23],
["is_num", 15, 4, 376, 23],
["jump_false", 15, "eq_nn_472", 376, 23],
"_nop_tc_2",
["jump", "eq_nn_472", 376, 23],
["eq_float", 14, 5, 13, 376, 23],
["eq_float", 14, 4, 13, 376, 23],
["jump", "eq_done_470", 376, 23],
"eq_nn_472",
["is_text", 15, 5, 376, 23],
["is_text", 15, 4, 376, 23],
["jump_false", 15, "eq_nt_473", 376, 23],
"_nop_tc_3",
["jump", "eq_nt_473", 376, 23],
["eq_text", 14, 5, 13, 376, 23],
["eq_text", 14, 4, 13, 376, 23],
["jump", "eq_done_470", 376, 23],
"eq_nt_473",
["is_null", 15, 5, 376, 23],
["is_null", 15, 4, 376, 23],
["jump_false", 15, "eq_nnl_474", 376, 23],
"_nop_tc_4",
"_nop_tc_5",
["true", 14, 376, 23],
["jump", "eq_done_470", 376, 23],
"eq_nnl_474",
["is_bool", 15, 5, 376, 23],
["is_bool", 15, 4, 376, 23],
["jump_false", 15, "eq_nb_475", 376, 23],
"_nop_tc_6",
["jump", "eq_nb_475", 376, 23],
["eq_bool", 14, 5, 13, 376, 23],
["eq_bool", 14, 4, 13, 376, 23],
["jump", "eq_done_470", 376, 23],
"eq_nb_475",
["false", 14, 376, 23],
@@ -3387,7 +3387,7 @@
"if_else_468",
"if_end_469",
"while_start_476",
["length", 17, 5, 379, 21],
["length", 17, 4, 379, 21],
["is_int", 19, 8, 379, 21],
["jump_false", 19, "rel_ni_478", 379, 21],
"_nop_tc_7",
@@ -3412,7 +3412,7 @@
["disrupt", 379, 21],
"rel_done_480",
["jump_false", 18, "while_end_477", 379, 21],
["load_dynamic", 21, 5, 8, 380, 26],
["load_dynamic", 21, 4, 8, 380, 26],
["move", 3, 21, 380, 26],
["is_text", 22, 3, 381, 17],
["move", 23, 22, 381, 17],
@@ -3451,7 +3451,7 @@
["access", 32, 0, 388, 7],
["move", 8, 32, 388, 7],
"while_start_485",
["length", 33, 5, 389, 21],
["length", 33, 4, 389, 21],
["is_int", 35, 8, 389, 21],
["jump_false", 35, "rel_ni_487", 389, 21],
"_nop_tc_12",
@@ -3476,64 +3476,64 @@
["disrupt", 389, 21],
"rel_done_489",
["jump_false", 34, "while_end_486", 389, 21],
["load_dynamic", 37, 5, 8, 390, 26],
["load_dynamic", 37, 4, 8, 390, 26],
["move", 3, 37, 390, 26],
["is_array", 38, 3, 391, 18],
["jump_false", 38, "if_else_491", 391, 18],
["access", 39, 0, 392, 18],
["load_index", 40, 3, 39, 392, 18],
["move", 6, 40, 392, 18],
["get", 41, 6, 1, 393, 19],
["load_dynamic", 42, 41, 6, 393, 34],
["move", 4, 42, 393, 34],
["move", 5, 40, 392, 18],
["get", 41, 5, 1, 393, 19],
["load_dynamic", 42, 41, 5, 393, 34],
["move", 6, 42, 393, 34],
["null", 43, 394, 24],
["is_identical", 44, 4, 43, 394, 24],
["is_identical", 44, 6, 43, 394, 24],
["jump_true", 44, "ne_nid_496", 394, 24],
["jump", "ne_ni_497", 394, 24],
"ne_nid_496",
["false", 44, 394, 24],
["jump", "ne_done_495", 394, 24],
"ne_ni_497",
["is_int", 45, 4, 394, 24],
["is_int", 45, 6, 394, 24],
["jump_false", 45, "ne_nn_498", 394, 24],
"_nop_tc_17",
["jump", "ne_nn_498", 394, 24],
["ne_int", 44, 4, 43, 394, 24],
["ne_int", 44, 6, 43, 394, 24],
["jump", "ne_done_495", 394, 24],
"ne_nn_498",
["is_num", 45, 4, 394, 24],
["is_num", 45, 6, 394, 24],
["jump_false", 45, "ne_nt_499", 394, 24],
"_nop_tc_18",
["jump", "ne_nt_499", 394, 24],
["ne_float", 44, 4, 43, 394, 24],
["ne_float", 44, 6, 43, 394, 24],
["jump", "ne_done_495", 394, 24],
"ne_nt_499",
["is_text", 45, 4, 394, 24],
["is_text", 45, 6, 394, 24],
["jump_false", 45, "ne_nnl_500", 394, 24],
"_nop_tc_19",
["jump", "ne_nnl_500", 394, 24],
["ne_text", 44, 4, 43, 394, 24],
["ne_text", 44, 6, 43, 394, 24],
["jump", "ne_done_495", 394, 24],
"ne_nnl_500",
["is_null", 45, 4, 394, 24],
["is_null", 45, 6, 394, 24],
["jump_false", 45, "ne_nb_501", 394, 24],
"_nop_tc_20",
"_nop_tc_21",
["false", 44, 394, 24],
["jump", "ne_done_495", 394, 24],
"ne_nb_501",
["is_bool", 45, 4, 394, 24],
["is_bool", 45, 6, 394, 24],
["jump_false", 45, "ne_mis_502", 394, 24],
"_nop_tc_22",
["jump", "ne_mis_502", 394, 24],
["ne_bool", 44, 4, 43, 394, 24],
["ne_bool", 44, 6, 43, 394, 24],
["jump", "ne_done_495", 394, 24],
"ne_mis_502",
["true", 44, 394, 24],
"ne_done_495",
["jump_false", 44, "if_else_493", 394, 24],
["access", 47, 1, 395, 36],
["add", 48, 4, 47, 395, 36],
["add", 48, 6, 47, 395, 36],
["load_dynamic", 49, 3, 48, 395, 36],
["move", 2, 49, 395, 36],
["is_text", 50, 2, 396, 21],
@@ -3601,7 +3601,7 @@
["invoke", 59, 57, 1, 1],
["array", 61, 0, 1, 1],
["push", 61, 57, 1, 1],
["push", 61, 6, 1, 1],
["push", 61, 5, 1, 1],
["push", 61, 2, 1, 1],
[
"access",
@@ -3769,7 +3769,7 @@
["move", 22, 24, 413, 49],
"tern_end_525",
["move", 6, 22, 413, 49],
["get", 26, 2, 1, 415, 18],
["get", 26, 3, 1, 415, 18],
["frame", 27, 26, 1, 415, 18],
["null", 28, 415, 18],
["setarg", 27, 0, 28, 415, 18],
@@ -3909,7 +3909,7 @@
["move", 7, 62, 426, 13],
["jump", "while_start_542", 426, 13],
"while_end_543",
["get", 64, 5, 1, 429, 18],
["get", 64, 6, 1, 429, 18],
["frame", 65, 64, 1, 429, 18],
["null", 66, 429, 18],
["setarg", 65, 0, 66, 429, 18],
@@ -3979,7 +3979,7 @@
["move", 7, 81, 433, 13],
["jump", "while_start_550", 433, 13],
"while_end_551",
["get", 83, 7, 1, 436, 18],
["get", 83, 1, 1, 436, 18],
["frame", 84, 83, 1, 436, 18],
["null", 85, 436, 18],
["setarg", 84, 0, 85, 436, 18],
@@ -4656,7 +4656,7 @@
["push", 305, 303, 108, 15],
["push", 305, 304, 108, 15],
["store_field", 9, 305, "setarg", 108, 15],
["move", 3, 9, 108, 15],
["move", 2, 9, 108, 15],
["record", 306, 0],
["true", 307, 113, 11],
["store_field", 306, 307, "access", 113, 11],
@@ -4808,7 +4808,7 @@
["store_field", 306, 380, "invoke", 132, 11],
["true", 381, 133, 16],
["store_field", 306, 381, "tail_invoke", 133, 16],
["move", 1, 306, 133, 16],
["move", 8, 306, 133, 16],
["record", 382, 0],
["access", 383, 0, 141, 9],
["store_field", 382, 383, "jump", 141, 9],
@@ -4818,23 +4818,23 @@
["store_field", 382, 385, "jump_false", 143, 15],
["access", 386, 1, 144, 18],
["store_field", 382, 386, "jump_not_null", 144, 18],
["move", 6, 382, 144, 18],
["move", 5, 382, 144, 18],
["function", 387, 0, 149, 25],
["move", 2, 387, 149, 25],
["move", 3, 387, 149, 25],
["function", 388, 1, 189, 26],
["move", 4, 388, 189, 26],
["function", 389, 2, 231, 30],
["move", 5, 389, 231, 30],
["move", 6, 389, 231, 30],
["function", 390, 3, 366, 29],
["move", 7, 390, 366, 29],
["move", 1, 390, 366, 29],
["function", 391, 4, 408, 18],
["move", 8, 391, 408, 18],
["move", 7, 391, 408, 18],
["record", 392, 0],
["store_field", 392, 8, "verify_all", 447, 15],
["store_field", 392, 2, "check_slot_bounds", 448, 22],
["store_field", 392, 7, "verify_all", 447, 15],
["store_field", 392, 3, "check_slot_bounds", 448, 22],
["store_field", 392, 4, "check_jump_targets", 449, 23],
["store_field", 392, 5, "check_type_consistency", 450, 27],
["store_field", 392, 7, "check_nop_consistency", 451, 26],
["store_field", 392, 6, "check_type_consistency", 450, 27],
["store_field", 392, 1, "check_nop_consistency", 451, 26],
["return", 392, 451, 26],
"_nop_ur_1",
"_nop_ur_2"

View File

@@ -17,8 +17,16 @@ var target_package = null
var buildtype = 'release'
var force_rebuild = false
var dry_run = false
var i = 0
var targets = null
var t = 0
var resolved = null
var lib = null
var results = null
var success = 0
var failed = 0
for (var i = 0; i < length(args); i++) {
for (i = 0; i < length(args); i++) {
if (args[i] == '-t' || args[i] == '--target') {
if (i + 1 < length(args)) {
target = args[++i]
@@ -51,8 +59,8 @@ for (var i = 0; i < length(args); i++) {
dry_run = true
} else if (args[i] == '--list-targets') {
log.console('Available targets:')
var targets = build.list_targets()
for (var t = 0; t < length(targets); t++) {
targets = build.list_targets()
for (t = 0; t < length(targets); t++) {
log.console(' ' + targets[t])
}
$stop()
@@ -65,7 +73,7 @@ for (var i = 0; i < length(args); i++) {
// Resolve local paths to absolute paths
if (target_package) {
if (target_package == '.' || starts_with(target_package, './') || starts_with(target_package, '../') || fd.is_dir(target_package)) {
var resolved = fd.realpath(target_package)
resolved = fd.realpath(target_package)
if (resolved) {
target_package = resolved
}
@@ -91,33 +99,35 @@ arrfor(packages, function(package) {
shop.extract(package)
})
var _build = null
if (target_package) {
// Build single package
log.console('Building ' + target_package + '...')
try {
var lib = build.build_dynamic(target_package, target, buildtype)
_build = function() {
lib = build.build_dynamic(target_package, target, buildtype)
if (lib) {
log.console('Built: ' + lib)
}
} catch (e) {
log.error('Build failed: ' + e)
} disruption {
log.error('Build failed')
$stop()
}
_build()
} else {
// Build all packages
log.console('Building all packages...')
var results = build.build_all_dynamic(target, buildtype)
var success = 0
var failed = 0
for (var i = 0; i < length(results); i++) {
results = build.build_all_dynamic(target, buildtype)
success = 0
failed = 0
for (i = 0; i < length(results); i++) {
if (results[i].library) {
success++
} else if (results[i].error) {
failed++
}
}
log.console(`Build complete: ${success} libraries built${failed > 0 ? `, ${failed} failed` : ''}`)
}

View File

@@ -85,7 +85,8 @@ function ensure_dir(path) {
if (fd.stat(path).isDirectory) return
var parts = array(path, '/')
var current = starts_with(path, '/') ? '/' : ''
for (var i = 0; i < length(parts); i++) {
var i = 0
for (i = 0; i < length(parts); i++) {
if (parts[i] == '') continue
current += parts[i] + '/'
if (!fd.stat(current).isDirectory) fd.mkdir(current)
@@ -100,12 +101,13 @@ Build.ensure_dir = ensure_dir
// Compile a single C file for a package
// Returns the object file path (content-addressed in .cell/build)
Build.compile_file = function(pkg, file, target, buildtype = 'release') {
Build.compile_file = function(pkg, file, target, buildtype) {
var _buildtype = buildtype || 'release'
var pkg_dir = shop.get_package_dir(pkg)
var src_path = pkg_dir + '/' + file
if (!fd.is_file(src_path)) {
throw Error('Source file not found: ' + src_path)
print('Source file not found: ' + src_path); disrupt
}
// Get flags (with sigil replacement)
@@ -120,11 +122,11 @@ Build.compile_file = function(pkg, file, target, buildtype = 'release') {
var cmd_parts = [cc, '-c', '-fPIC']
// Add buildtype-specific flags
if (buildtype == 'release') {
if (_buildtype == 'release') {
cmd_parts = array(cmd_parts, ['-O3', '-DNDEBUG'])
} else if (buildtype == 'debug') {
} else if (_buildtype == 'debug') {
cmd_parts = array(cmd_parts, ['-O2', '-g'])
} else if (buildtype == 'minsize') {
} else if (_buildtype == 'minsize') {
cmd_parts = array(cmd_parts, ['-Os', '-DNDEBUG'])
}
@@ -167,7 +169,7 @@ Build.compile_file = function(pkg, file, target, buildtype = 'release') {
log.console('Compiling ' + file)
var ret = os.system(full_cmd)
if (ret != 0) {
throw Error('Compilation failed: ' + file)
print('Compilation failed: ' + file); disrupt
}
return obj_path
@@ -175,12 +177,14 @@ Build.compile_file = function(pkg, file, target, buildtype = 'release') {
// Build all C files for a package
// Returns array of object file paths
Build.build_package = function(pkg, target = Build.detect_host_target(), exclude_main, buildtype = 'release') {
var c_files = pkg_tools.get_c_files(pkg, target, exclude_main)
Build.build_package = function(pkg, target, exclude_main, buildtype) {
var _target = target || Build.detect_host_target()
var _buildtype = buildtype || 'release'
var c_files = pkg_tools.get_c_files(pkg, _target, exclude_main)
var objects = []
arrfor(c_files, function(file) {
var obj = Build.compile_file(pkg, file, target, buildtype)
var obj = Build.compile_file(pkg, file, _target, _buildtype)
push(objects, obj)
})
@@ -320,7 +324,9 @@ Build.build_dynamic = function(pkg, target, buildtype) {
// Build a static binary from multiple packages
// packages: array of package names
// output: output binary path
Build.build_static = function(packages, target = Build.detect_host_target(), output, buildtype = 'release') {
Build.build_static = function(packages, target, output, buildtype) {
var _target = target || Build.detect_host_target()
var _buildtype = buildtype || 'release'
var all_objects = []
var all_ldflags = []
var seen_flags = {}
@@ -330,14 +336,14 @@ Build.build_static = function(packages, target = Build.detect_host_target(), out
var is_core = (pkg == 'core')
// For core, include main.c; for others, exclude it
var objects = Build.build_package(pkg, target, !is_core, buildtype)
var objects = Build.build_package(pkg, _target, !is_core, _buildtype)
arrfor(objects, function(obj) {
push(all_objects, obj)
})
// Collect LDFLAGS (with sigil replacement)
var ldflags = replace_sigils_array(pkg_tools.get_flags(pkg, 'LDFLAGS', target))
var ldflags = replace_sigils_array(pkg_tools.get_flags(pkg, 'LDFLAGS', _target))
var pkg_dir = shop.get_package_dir(pkg)
// Deduplicate based on the entire LDFLAGS string for this package
@@ -355,13 +361,13 @@ Build.build_static = function(packages, target = Build.detect_host_target(), out
})
if (length(all_objects) == 0) {
throw Error('No object files to link')
print('No object files to link'); disrupt
}
// Link
var cc = toolchains[target].c
var target_ldflags = toolchains[target].c_link_args || []
var exe_ext = toolchains[target].system == 'windows' ? '.exe' : ''
var cc = toolchains[_target].c
var target_ldflags = toolchains[_target].c_link_args || []
var exe_ext = toolchains[_target].system == 'windows' ? '.exe' : ''
if (!ends_with(output, exe_ext) && exe_ext) {
output = output + exe_ext
@@ -388,7 +394,7 @@ Build.build_static = function(packages, target = Build.detect_host_target(), out
log.console('Linking ' + output)
var ret = os.system(cmd_str)
if (ret != 0) {
throw Error('Linking failed with command: ' + cmd_str)
print('Linking failed: ' + cmd_str); disrupt
}
log.console('Built ' + output)

View File

@@ -22,55 +22,55 @@ function normalize_path(path) {
// Check if a file exists in a specific mount
function mount_exists(mount, path) {
var result = false
var _check = null
if (mount.type == 'zip') {
try {
_check = function() {
mount.handle.mod(path)
return true
} catch (e) {
return false
}
result = true
} disruption {}
_check()
} else if (mount.type == 'qop') {
try {
return mount.handle.stat(path) != null
} catch (e) {
return false
}
} else { // fs
_check = function() {
result = mount.handle.stat(path) != null
} disruption {}
_check()
} else {
var full_path = fd.join_paths(mount.source, path)
try {
_check = function() {
var st = fd.stat(full_path)
return st.isFile || st.isDirectory
} catch (e) {
return false
}
result = st.isFile || st.isDirectory
} disruption {}
_check()
}
return result
}
// Check if a path refers to a directory in a specific mount
function is_directory(path) {
var res = resolve(path)
var mount = res.mount
var result = false
var _check = null
if (mount.type == 'zip') {
try {
return mount.handle.is_directory(path);
} catch (e) {
return false;
}
_check = function() {
result = mount.handle.is_directory(path)
} disruption {}
_check()
} else if (mount.type == 'qop') {
try {
return mount.handle.is_directory(path);
} catch (e) {
return false;
}
} else { // fs
_check = function() {
result = mount.handle.is_directory(path)
} disruption {}
_check()
} else {
var full_path = fd.join_paths(mount.source, path)
try {
_check = function() {
var st = fd.stat(full_path)
return st.isDirectory
} catch (e) {
return false
}
result = st.isDirectory
} disruption {}
_check()
}
return result
}
// Resolve a path to a specific mount and relative path
@@ -102,7 +102,7 @@ function resolve(path, must_exist) {
}, false, true)
if (!mount) {
throw Error("Unknown mount point: @" + mount_name)
print("Unknown mount point: @" + mount_name); disrupt
}
return { mount: mount, path: rel_path }
@@ -122,7 +122,7 @@ function resolve(path, must_exist) {
}
if (must_exist) {
throw Error("File not found in any mount: " + path)
print("File not found in any mount: " + path); disrupt
}
}
@@ -144,12 +144,11 @@ function mount(source, name) {
} else if (st.isFile) {
var blob = fd.slurp(source)
// Try QOP first (it's likely faster to fail?) or Zip?
// QOP open checks magic.
var qop_archive = null
try {
qop_archive = qop.open(blob)
} catch(e) {}
var _try_qop = function() {
qop_archive = qop.open(blob)
} disruption {}
_try_qop()
if (qop_archive) {
mount_info.type = 'qop'
@@ -158,7 +157,7 @@ function mount(source, name) {
} else {
var zip = miniz.read(blob)
if (!is_object(zip) || !is_function(zip.count)) {
throw Error("Invalid archive file (not zip or qop): " + source)
print("Invalid archive file (not zip or qop): " + source); disrupt
}
mount_info.type = 'zip'
@@ -166,7 +165,7 @@ function mount(source, name) {
mount_info.zip_blob = blob // keep blob alive
}
} else {
throw Error("Unsupported mount source type: " + source)
print("Unsupported mount source type: " + source); disrupt
}
push(mounts, mount_info)
@@ -182,13 +181,13 @@ function unmount(name_or_source) {
// Read file
function slurp(path) {
var res = resolve(path, true)
if (!res) throw Error("File not found: " + path)
if (!res) { print("File not found: " + path); disrupt }
if (res.mount.type == 'zip') {
return res.mount.handle.slurp(res.path)
} else if (res.mount.type == 'qop') {
var data = res.mount.handle.read(res.path)
if (!data) throw Error("File not found in qop: " + path)
if (!data) { print("File not found in qop: " + path); disrupt }
return data
} else {
var full_path = fd.join_paths(res.mount.source, res.path)
@@ -217,8 +216,8 @@ function exists(path) {
// Stat
function stat(path) {
var res = resolve(path, true)
if (!res) throw Error("File not found: " + path)
if (!res) { print("File not found: " + path); disrupt }
if (res.mount.type == 'zip') {
var mod = res.mount.handle.mod(res.path)
return {
@@ -228,7 +227,7 @@ function stat(path) {
}
} else if (res.mount.type == 'qop') {
var s = res.mount.handle.stat(res.path)
if (!s) throw Error("File not found in qop: " + path)
if (!s) { print("File not found in qop: " + path); disrupt }
return {
filesize: s.size,
modtime: s.modtime,
@@ -261,7 +260,7 @@ function mount_package(name) {
var dir = shop.get_package_dir(name)
if (!dir) {
throw Error("Package not found: " + name)
print("Package not found: " + name); disrupt
}
mount(dir, name)
@@ -275,7 +274,7 @@ function match(str, pattern) {
function rm(path) {
var res = resolve(path, true)
if (res.mount.type != 'fs') throw Error("Cannot delete from non-fs mount")
if (res.mount.type != 'fs') { print("Cannot delete from non-fs mount"); disrupt }
var full_path = fd.join_paths(res.mount.source, res.path)
var st = fd.stat(full_path)

View File

@@ -23,8 +23,11 @@ var clean_build = false
var clean_fetch = false
var deep = false
var dry_run = false
var i = 0
var resolved = null
var deps = null
for (var i = 0; i < length(args); i++) {
for (i = 0; i < length(args); i++) {
if (args[i] == '--build') {
clean_build = true
} else if (args[i] == '--fetch') {
@@ -74,7 +77,7 @@ var is_world_scope = (scope == 'world')
if (!is_shop_scope && !is_world_scope) {
if (scope == '.' || starts_with(scope, './') || starts_with(scope, '../') || fd.is_dir(scope)) {
var resolved = fd.realpath(scope)
resolved = fd.realpath(scope)
if (resolved) {
scope = resolved
}
@@ -96,15 +99,17 @@ if (is_shop_scope) {
// Single package
push(packages_to_clean, scope)
var _gather = null
if (deep) {
try {
var deps = pkg.gather_dependencies(scope)
_gather = function() {
deps = pkg.gather_dependencies(scope)
arrfor(deps, function(dep) {
push(packages_to_clean, dep)
})
} catch (e) {
} disruption {
// Skip if can't read dependencies
}
_gather()
}
}
@@ -168,6 +173,7 @@ if (clean_fetch) {
}
// Execute or report
var deleted_count = 0
if (dry_run) {
log.console("Would delete:")
if (length(files_to_delete) == 0 && length(dirs_to_delete) == 0) {
@@ -181,20 +187,19 @@ if (dry_run) {
})
}
} else {
var deleted_count = 0
arrfor(files_to_delete, function(f) {
try {
var _del = function() {
fd.unlink(f)
log.console("Deleted: " + f)
deleted_count++
} catch (e) {
log.error("Failed to delete " + f + ": " + e)
} disruption {
log.error("Failed to delete " + f)
}
_del()
})
arrfor(dirs_to_delete, function(d) {
try {
var _del = function() {
if (fd.is_link(d)) {
fd.unlink(d)
} else {
@@ -202,9 +207,10 @@ if (dry_run) {
}
log.console("Deleted: " + d)
deleted_count++
} catch (e) {
log.error("Failed to delete " + d + ": " + e)
} disruption {
log.error("Failed to delete " + d)
}
_del()
})
if (deleted_count == 0) {

View File

@@ -7,11 +7,14 @@ var fd = use('fd')
var http = use('http')
var miniz = use('miniz')
var resolved = null
var cwd = null
var parent = null
if (length(args) < 2) {
log.console("Usage: cell clone <origin> <path>")
log.console("Clones a cell package to a local path and links it.")
$stop()
return
}
var origin = args[0]
@@ -19,19 +22,19 @@ var target_path = args[1]
// Resolve target path to absolute
if (target_path == '.' || starts_with(target_path, './') || starts_with(target_path, '../')) {
var resolved = fd.realpath(target_path)
resolved = fd.realpath(target_path)
if (resolved) {
target_path = resolved
} else {
// Path doesn't exist yet, resolve relative to cwd
var cwd = fd.realpath('.')
cwd = fd.realpath('.')
if (target_path == '.') {
target_path = cwd
} else if (starts_with(target_path, './')) {
target_path = cwd + text(target_path, 1)
} else if (starts_with(target_path, '../')) {
// Go up one directory from cwd
var parent = fd.dirname(cwd)
parent = fd.dirname(cwd)
target_path = parent + text(target_path, 2)
}
}
@@ -41,7 +44,6 @@ if (target_path == '.' || starts_with(target_path, './') || starts_with(target_p
if (fd.is_dir(target_path)) {
log.console("Error: " + target_path + " already exists")
$stop()
return
}
log.console("Cloning " + origin + " to " + target_path + "...")
@@ -51,7 +53,6 @@ var info = shop.resolve_package_info(origin)
if (!info || info == 'local') {
log.console("Error: " + origin + " is not a remote package")
$stop()
return
}
// Update to get the commit hash
@@ -59,7 +60,6 @@ var update_result = shop.update(origin)
if (!update_result) {
log.console("Error: Could not fetch " + origin)
$stop()
return
}
// Fetch and extract to the target path
@@ -68,54 +68,61 @@ var entry = lock[origin]
if (!entry || !entry.commit) {
log.console("Error: No commit found for " + origin)
$stop()
return
}
var download_url = shop.get_download_url(origin, entry.commit)
log.console("Downloading from " + download_url)
try {
var zip_blob = http.fetch(download_url)
var zip_blob = null
var zip = null
var count = 0
var i = 0
var filename = null
var first_slash = null
var rel_path = null
var full_path = null
var dir_path = null
var _clone = function() {
zip_blob = http.fetch(download_url)
// Extract zip to target path
var zip = miniz.read(zip_blob)
zip = miniz.read(zip_blob)
if (!zip) {
log.console("Error: Failed to read zip archive")
$stop()
return
}
// Create target directory
fd.mkdir(target_path)
var count = zip.count()
for (var i = 0; i < count; i++) {
count = zip.count()
for (i = 0; i < count; i++) {
if (zip.is_directory(i)) continue
var filename = zip.get_filename(i)
var first_slash = search(filename, '/')
filename = zip.get_filename(i)
first_slash = search(filename, '/')
if (first_slash == null) continue
if (first_slash + 1 >= length(filename)) continue
var rel_path = text(filename, first_slash + 1)
var full_path = target_path + '/' + rel_path
var dir_path = fd.dirname(full_path)
rel_path = text(filename, first_slash + 1)
full_path = target_path + '/' + rel_path
dir_path = fd.dirname(full_path)
// Ensure directory exists
if (!fd.is_dir(dir_path)) {
fd.mkdir(dir_path)
}
fd.slurpwrite(full_path, zip.slurp(filename))
}
log.console("Extracted to " + target_path)
// Link the origin to the cloned path
link.add(origin, target_path, shop)
log.console("Linked " + origin + " -> " + target_path)
} catch (e) {
log.console("Error: " + e.message)
if (e.stack) log.console(e.stack)
} disruption {
log.console("Error during clone")
}
_clone()
$stop()

261
config.ce
View File

@@ -47,8 +47,10 @@ function get_nested(obj, path) {
// Set a value in nested object using path
function set_nested(obj, path, value) {
var current = obj
for (var i = 0; i < length(path) - 1; i++) {
var segment = path[i]
var i = 0
var segment = null
for (i = 0; i < length(path) - 1; i++) {
segment = path[i]
if (is_null(current[segment]) || !is_object(current[segment])) {
current[segment] = {}
}
@@ -59,15 +61,17 @@ function set_nested(obj, path, value) {
// Parse value string into appropriate type
function parse_value(str) {
var num_str = null
var n = null
// Boolean
if (str == 'true') return true
if (str == 'false') return false
// Number (including underscores)
var num_str = replace(str, /_/g, '')
if (/^-?\d+$/.test(num_str)) return parseInt(num_str)
if (/^-?\d*\.\d+$/.test(num_str)) return parseFloat(num_str)
// Number
num_str = replace(str, /_/g, '')
n = number(num_str)
if (n != null) return n
// String
return str
}
@@ -75,22 +79,19 @@ function parse_value(str) {
// Format value for display
function format_value(val) {
if (is_text(val)) return '"' + val + '"'
if (is_number(val) && val >= 1000) {
// Add underscores to large numbers
return replace(val.toString(), /\B(?=(\d{3})+(?!\d))/g, '_')
}
return text(val)
}
// Print configuration tree recursively
function print_config(obj, prefix = '') {
function print_config(obj, pfx) {
var p = pfx || ''
arrfor(array(obj), function(key) {
var val = obj[key]
var full_key = prefix ? prefix + '.' + key : key
var full_key = p ? p + '.' + key : key
if (is_object(val))
print_config(val, full_key)
else
else if (!is_null(val))
log.console(full_key + ' = ' + format_value(val))
})
}
@@ -99,151 +100,123 @@ function print_config(obj, prefix = '') {
if (length(args) == 0) {
print_help()
$stop()
return
}
var config = pkg.load_config()
if (!config) {
log.error("Failed to load cell.toml")
$stop()
return
}
var command = args[0]
var key
var path
var value
var key = null
var path = null
var value = null
var value_str = null
var valid_system_keys = null
var actor_name = null
var actor_cmd = null
switch (command) {
case 'help':
case '-h':
case '--help':
print_help()
break
case 'list':
log.console("# Cell Configuration")
log.console("")
print_config(config)
break
case 'get':
if (length(args) < 2) {
log.error("Usage: cell config get <key>")
if (command == 'help' || command == '-h' || command == '--help') {
print_help()
} else if (command == 'list') {
log.console("# Cell Configuration")
log.console("")
print_config(config)
} else if (command == 'get') {
if (length(args) < 2) {
log.error("Usage: cell config get <key>")
$stop()
}
key = args[1]
path = parse_key(key)
value = get_nested(config, path)
if (value == null) {
log.error("Key not found: " + key)
} else if (is_object(value)) {
print_config(value, key)
} else {
log.console(key + ' = ' + format_value(value))
}
} else if (command == 'set') {
if (length(args) < 3) {
log.error("Usage: cell config set <key> <value>")
$stop()
}
key = args[1]
value_str = args[2]
path = parse_key(key)
value = parse_value(value_str)
if (path[0] == 'system') {
valid_system_keys = [
'ar_timer', 'actor_memory', 'net_service',
'reply_timeout', 'actor_max', 'stack_max'
]
if (find(valid_system_keys, path[1]) == null) {
log.error("Invalid system key. Valid keys: " + text(valid_system_keys, ', '))
$stop()
return
}
key = args[1]
path = parse_key(key)
value = get_nested(config, path)
if (value == null) {
log.error("Key not found: " + key)
} else if (isa(value, object)) {
// Print all nested values
print_config(value, key)
}
set_nested(config, path, value)
pkg.save_config(config)
log.console("Set " + key + " = " + format_value(value))
} else if (command == 'actor') {
if (length(args) < 3) {
log.error("Usage: cell config actor <name> <command> [options]")
$stop()
}
actor_name = args[1]
actor_cmd = args[2]
config.actors = config.actors || {}
config.actors[actor_name] = config.actors[actor_name] || {}
if (actor_cmd == 'list') {
if (length(array(config.actors[actor_name])) == 0) {
log.console("No configuration for actor: " + actor_name)
} else {
log.console(key + ' = ' + format_value(value))
log.console("# Configuration for actor: " + actor_name)
log.console("")
print_config(config.actors[actor_name], 'actors.' + actor_name)
}
break
case 'set':
if (length(args) < 3) {
log.error("Usage: cell config set <key> <value>")
} else if (actor_cmd == 'get') {
if (length(args) < 4) {
log.error("Usage: cell config actor <name> get <key>")
$stop()
return
}
var key = args[1]
var value_str = args[2]
var path = parse_key(key)
var value = parse_value(value_str)
// Validate system keys
if (path[0] == 'system') {
var valid_system_keys = [
'ar_timer', 'actor_memory', 'net_service',
'reply_timeout', 'actor_max', 'stack_max'
]
if (find(valid_system_keys, path[1]) == null) {
log.error("Invalid system key. Valid keys: " + text(valid_system_keys, ', '))
$stop()
return
}
key = args[3]
path = parse_key(key)
value = get_nested(config.actors[actor_name], path)
if (value == null) {
log.error("Key not found for actor " + actor_name + ": " + key)
} else {
log.console('actors.' + actor_name + '.' + key + ' = ' + format_value(value))
}
set_nested(config, path, value)
} else if (actor_cmd == 'set') {
if (length(args) < 5) {
log.error("Usage: cell config actor <name> set <key> <value>")
$stop()
}
key = args[3]
value_str = args[4]
path = parse_key(key)
value = parse_value(value_str)
set_nested(config.actors[actor_name], path, value)
pkg.save_config(config)
log.console("Set " + key + " = " + format_value(value))
break
case 'actor':
// Handle actor-specific configuration
if (length(args) < 3) {
log.error("Usage: cell config actor <name> <command> [options]")
$stop()
return
}
var actor_name = args[1]
var actor_cmd = args[2]
// Initialize actors section if needed
config.actors = config.actors || {}
config.actors[actor_name] = config.actors[actor_name] || {}
switch (actor_cmd) {
case 'list':
if (length(array(config.actors[actor_name])) == 0) {
log.console("No configuration for actor: " + actor_name)
} else {
log.console("# Configuration for actor: " + actor_name)
log.console("")
print_config(config.actors[actor_name], 'actors.' + actor_name)
}
break
case 'get':
if (length(args) < 4) {
log.error("Usage: cell config actor <name> get <key>")
$stop()
return
}
key = args[3]
path = parse_key(key)
value = get_nested(config.actors[actor_name], path)
if (value == null) {
log.error("Key not found for actor " + actor_name + ": " + key)
} else {
log.console('actors.' + actor_name + '.' + key + ' = ' + format_value(value))
}
break
case 'set':
if (length(args) < 5) {
log.error("Usage: cell config actor <name> set <key> <value>")
$stop()
return
}
key = args[3]
var value_str = args[4]
path = parse_key(key)
value = parse_value(value_str)
set_nested(config.actors[actor_name], path, value)
pkg.save_config(config)
log.console("Set actors." + actor_name + "." + key + " = " + format_value(value))
break
default:
log.error("Unknown actor command: " + actor_cmd)
log.console("Valid commands: list, get, set")
}
break
default:
log.error("Unknown command: " + command)
print_help()
log.console("Set actors." + actor_name + "." + key + " = " + format_value(value))
} else {
log.error("Unknown actor command: " + actor_cmd)
log.console("Valid commands: list, get, set")
}
} else {
log.error("Unknown command: " + command)
print_help()
}
$stop()
$stop()

View File

@@ -123,6 +123,103 @@ Clean build artifacts.
pit clean
```
### pit add
Add a dependency to the current package. Updates `cell.toml` and installs the package to the shop.
```bash
pit add gitea.pockle.world/john/prosperon # default alias
pit add gitea.pockle.world/john/prosperon myalias # custom alias
```
### pit clone
Clone a package to a local path and link it for development.
```bash
pit clone gitea.pockle.world/john/prosperon ./prosperon
```
### pit unlink
Remove a link created by `pit link` or `pit clone` and restore the original package.
```bash
pit unlink gitea.pockle.world/john/prosperon
```
### pit search
Search for packages, actors, or modules matching a query.
```bash
pit search math
```
### pit why
Show which installed packages depend on a given package (reverse dependency lookup).
```bash
pit why gitea.pockle.world/john/prosperon
```
### pit resolve
Print the fully resolved dependency closure for a package.
```bash
pit resolve # resolve current package
pit resolve <package> # resolve specific package
pit resolve --locked # show lock state without links
```
### pit graph
Emit a dependency graph.
```bash
pit graph # tree of current package
pit graph --format dot # graphviz dot output
pit graph --format json # json output
pit graph --world # graph all installed packages
pit graph --locked # show lock view without links
```
### pit verify
Verify integrity and consistency of packages, links, and builds.
```bash
pit verify # verify current package
pit verify shop # verify entire shop
pit verify --deep # traverse full dependency closure
pit verify --target <triple>
```
### pit pack
Build a statically linked binary from a package and all its dependencies.
```bash
pit pack <package> # build static binary (output: app)
pit pack <package> -o myapp # specify output name
pit pack <package> -t <triple> # cross-compile for target
```
### pit config
Manage system and actor configuration values in `cell.toml`.
```bash
pit config list # list all config
pit config get system.ar_timer # get a value
pit config set system.ar_timer 5.0 # set a value
pit config actor <name> list # list actor config
pit config actor <name> get <key> # get actor config
pit config actor <name> set <key> <val> # set actor config
```
### pit help
Display help information.
@@ -132,16 +229,6 @@ pit help
pit help <command>
```
## Running Scripts
Any `.ce` file in the ƿit core can be run as a command:
```bash
pit version # runs version.ce
pit build # runs build.ce
pit test # runs test.ce
```
## Package Locators
Packages are identified by locators:

View File

@@ -12,8 +12,9 @@ var shop = use('internal/shop')
// Parse arguments
var target_pkg = null
var i = 0
for (var i = 0; i < length(args); i++) {
for (i = 0; i < length(args); i++) {
if (args[i] == '--help' || args[i] == '-h') {
log.console("Usage: cell fetch [package]")
log.console("Fetch package zips from remote sources.")

View File

@@ -22,8 +22,10 @@ var target_locator = null
var format = 'tree'
var show_locked = false
var show_world = false
var i = 0
var resolved = null
for (var i = 0; i < length(args); i++) {
for (i = 0; i < length(args); i++) {
if (args[i] == '--format' || args[i] == '-f') {
if (i + 1 < length(args)) {
format = args[++i]
@@ -91,7 +93,7 @@ function gather_graph(locator, visited) {
add_node(locator)
try {
var _gather = function() {
var deps = pkg.dependencies(locator)
if (deps) {
arrfor(array(deps), function(alias) {
@@ -101,17 +103,19 @@ function gather_graph(locator, visited) {
gather_graph(dep_locator, visited)
})
}
} catch (e) {
} disruption {
// Package might not have dependencies
}
_gather()
}
// Gather graph from roots
var roots = []
var packages = null
if (show_world) {
// Use all packages in shop as roots
var packages = shop.list_packages()
packages = shop.list_packages()
arrfor(packages, function(p) {
if (p != 'core') {
push(roots, p)
@@ -125,7 +129,7 @@ if (show_world) {
// Resolve local paths
if (target_locator == '.' || starts_with(target_locator, './') || starts_with(target_locator, '../') || fd.is_dir(target_locator)) {
var resolved = fd.realpath(target_locator)
resolved = fd.realpath(target_locator)
if (resolved) {
target_locator = resolved
}
@@ -141,14 +145,19 @@ arrfor(roots, function(root) {
// Output based on format
if (format == 'tree') {
function print_tree(locator, prefix, is_last, visited) {
var node = null
var suffix = null
var children = null
var j = 0
var child_prefix = null
if (visited[locator]) {
log.console(prefix + (is_last ? "\\-- " : "|-- ") + locator + " (circular)")
return
}
visited[locator] = true
var node = nodes[locator]
var suffix = ""
node = nodes[locator]
suffix = ""
if (node.linked) suffix += " -> " + node.effective
if (node.commit) suffix += " @" + node.commit
if (node.local) suffix += " (local)"
@@ -156,30 +165,32 @@ if (format == 'tree') {
log.console(prefix + (is_last ? "\\-- " : "|-- ") + locator + suffix)
// Get children
var children = []
children = []
arrfor(edges, function(e) {
if (e.from == locator) {
push(children, e)
}
})
for (var i = 0; i < length(children); i++) {
var child_prefix = prefix + (is_last ? " " : "| ")
print_tree(children[i].to, child_prefix, i == length(children) - 1, visited)
for (j = 0; j < length(children); j++) {
child_prefix = prefix + (is_last ? " " : "| ")
print_tree(children[j].to, child_prefix, j == length(children) - 1, visited)
}
}
for (var i = 0; i < length(roots); i++) {
var children = null
var j = 0
for (i = 0; i < length(roots); i++) {
log.console(roots[i])
var children = []
children = []
arrfor(edges, function(e) {
if (e.from == roots[i]) {
push(children, e)
}
})
for (var j = 0; j < length(children); j++) {
for (j = 0; j < length(children); j++) {
print_tree(children[j].to, "", j == length(children) - 1, {})
}

16
help.ce
View File

@@ -3,27 +3,29 @@
var fd = use('fd')
var command = length(args) > 0 ? args[0] : null
var man_file = null
var stat = null
var content = null
// Display specific command help
if (command) {
var man_file = 'scripts/man/' + command + '.man'
var stat = fd.stat(man_file);
man_file = 'scripts/man/' + command + '.man'
stat = fd.stat(man_file)
if (stat && stat.isFile) {
var content = text(fd.slurp(man_file))
content = text(fd.slurp(man_file))
log.console(content)
} else {
log.error("No help available for command: " + command)
log.console("Run 'cell help' to see available commands.")
}
$stop()
return
}
// Display general help
var cell_man = 'scripts/man/cell.man'
var stat = fd.stat(cell_man);
man_file = 'scripts/man/cell.man'
stat = fd.stat(man_file)
if (stat && stat.isFile) {
var content = text(fd.slurp(cell_man))
content = text(fd.slurp(man_file))
log.console(content)
} else {
// Fallback if man file doesn't exist

View File

@@ -28,8 +28,10 @@ var locator = null
var target_triple = null
var refresh = false
var dry_run = false
var i = 0
var resolved = null
for (var i = 0; i < length(args); i++) {
for (i = 0; i < length(args); i++) {
if (args[i] == '--target' || args[i] == '-t') {
if (i + 1 < length(args)) {
target_triple = args[++i]
@@ -64,7 +66,7 @@ if (!locator) {
// Resolve relative paths to absolute paths
// Local paths like '.' or '../foo' need to be converted to absolute paths
if (locator == '.' || starts_with(locator, './') || starts_with(locator, '../') || fd.is_dir(locator)) {
var resolved = fd.realpath(locator)
resolved = fd.realpath(locator)
if (resolved) {
locator = resolved
}
@@ -83,6 +85,9 @@ var skipped_packages = []
var visited = {}
function gather_packages(pkg_locator) {
var lock = null
var update_result = null
var deps = null
if (visited[pkg_locator]) return
visited[pkg_locator] = true
@@ -96,12 +101,12 @@ function gather_packages(pkg_locator) {
push(packages_to_install, pkg_locator)
// Try to read dependencies
try {
var _gather = function() {
// For packages not yet extracted, we need to update and extract first to read deps
var lock = shop.load_lock()
lock = shop.load_lock()
if (!lock[pkg_locator]) {
if (!dry_run) {
var update_result = shop.update(pkg_locator)
update_result = shop.update(pkg_locator)
if (update_result) {
shop.extract(pkg_locator)
} else {
@@ -117,19 +122,20 @@ function gather_packages(pkg_locator) {
}
}
var deps = pkg.dependencies(pkg_locator)
deps = pkg.dependencies(pkg_locator)
if (deps) {
arrfor(array(deps), function(alias) {
var dep_locator = deps[alias]
gather_packages(dep_locator)
})
}
} catch (e) {
} disruption {
// Package might not have dependencies or cell.toml issue
if (!dry_run) {
log.console(`Warning: Could not read dependencies for ${pkg_locator}: ${e.message}`)
log.console(`Warning: Could not read dependencies for ${pkg_locator}`)
}
}
_gather()
}
// Gather all packages
@@ -164,11 +170,12 @@ function install_package(pkg_locator) {
shop.build_package_scripts(pkg_locator)
// Build C code
try {
var _build_c = function() {
build.build_dynamic(pkg_locator, target_triple, 'release')
} catch (e) {
} disruption {
// Not all packages have C code
}
_build_c()
}
arrfor(packages_to_install, function(p) {

113
link.ce
View File

@@ -17,6 +17,24 @@ var shop = use('internal/shop')
var fd = use('fd')
var toml = use('toml')
var links = null
var count = 0
var result = null
var i = 0
var pkg = null
var cmd = null
var pkg_name = null
var target = null
var start_idx = 0
var arg1 = null
var arg2 = null
var cwd = null
var toml_path = null
var content = null
var _restore = null
var _read_toml = null
var _add_link = null
if (length(args) < 1) {
log.console("Usage: link <command> [args] or link [package] <target>")
log.console("Commands:")
@@ -27,154 +45,149 @@ if (length(args) < 1) {
log.console(" <path> Link the package in <path> to that path")
log.console(" <package> <target> Link <package> to <target> (path or package)")
$stop()
return
}
var cmd = args[0]
cmd = args[0]
if (cmd == 'list') {
var links = link.load()
var count = 0
links = link.load()
count = 0
arrfor(array(links), function(k) {
log.console(k + " -> " + links[k])
count++
})
if (count == 0) log.console("No links.")
} else if (cmd == 'sync') {
log.console("Syncing links...")
var result = link.sync_all(shop)
result = link.sync_all(shop)
log.console("Synced " + result.synced + " link(s)")
if (length(result.errors) > 0) {
log.console("Errors:")
for (var i = 0; i < length(result.errors); i++) {
for (i = 0; i < length(result.errors); i++) {
log.console(" " + result.errors[i])
}
}
} else if (cmd == 'delete' || cmd == 'rm') {
if (length(args) < 2) {
log.console("Usage: link delete <package>")
$stop()
return
}
var pkg = args[1]
pkg = args[1]
var _restore = null
if (link.remove(pkg)) {
// Try to restore the original package
log.console("Restoring " + pkg + "...")
try {
_restore = function() {
shop.fetch(pkg)
shop.extract(pkg)
log.console("Restored " + pkg)
} catch (e) {
log.console("Could not restore: " + e.message)
} disruption {
log.console("Could not restore")
log.console("Run 'cell update " + pkg + "' to restore")
}
_restore()
} else {
log.console("No link found for " + pkg)
}
} else if (cmd == 'clear') {
link.clear()
log.console("Links cleared. Run 'cell update' to restore packages.")
} else {
// Linking logic
var pkg_name = null
var target = null
pkg_name = null
target = null
// Check for 'add' compatibility
var start_idx = 0
start_idx = 0
if (cmd == 'add') {
start_idx = 1
}
var arg1 = args[start_idx]
var arg2 = (length(args) > start_idx + 1) ? args[start_idx + 1] : null
arg1 = args[start_idx]
arg2 = (length(args) > start_idx + 1) ? args[start_idx + 1] : null
if (!arg1) {
log.console("Error: target or package required")
$stop()
return
}
if (arg2) {
// Two arguments: explicit package name and target
pkg_name = arg1
target = arg2
// Resolve target if it's a local path
if (target == '.' || fd.is_dir(target)) {
target = fd.realpath(target)
} else if (starts_with(target, './') || starts_with(target, '../')) {
// Relative path that doesn't exist yet - try to resolve anyway
var cwd = fd.realpath('.')
cwd = fd.realpath('.')
if (starts_with(target, './')) {
target = cwd + text(target, 1)
} else {
// For ../ paths, var fd.realpath handle it if possible
// For ../ paths, let fd.realpath handle it if possible
target = fd.realpath(target) || target
}
}
// Otherwise target is a package name (e.g., github.com/prosperon)
} else {
// One argument: assume it's a local path, infer package name from cell.toml
target = arg1
// Resolve path
if (target == '.' || fd.is_dir(target)) {
target = fd.realpath(target)
} else if (starts_with(target, './') || starts_with(target, '../')) {
target = fd.realpath(target) || target
}
// Must be a local path with cell.toml
var toml_path = target + '/cell.toml'
toml_path = target + '/cell.toml'
if (!fd.is_file(toml_path)) {
log.console("Error: No cell.toml found at " + target)
log.console("For linking to another package, use: link <package> <target>")
$stop()
return
}
// Read package name from cell.toml
try {
var content = toml.decode(text(fd.slurp(toml_path)))
_read_toml = function() {
content = toml.decode(text(fd.slurp(toml_path)))
if (content.package) {
pkg_name = content.package
} else {
log.console("Error: cell.toml at " + target + " does not define 'package'")
$stop()
return
}
} catch (e) {
log.console("Error reading cell.toml: " + e)
} disruption {
log.console("Error reading cell.toml")
$stop()
return
}
_read_toml()
}
// Validate: if target is a local path, it must have cell.toml
if (starts_with(target, '/')) {
if (!fd.is_file(target + '/cell.toml')) {
log.console("Error: " + target + " is not a valid package (no cell.toml)")
$stop()
return
}
}
// Add the link (this also creates the symlink)
try {
_add_link = function() {
link.add(pkg_name, target, shop)
} catch (e) {
log.console("Error: " + e.message)
log.error(e)
} disruption {
log.console("Error adding link")
$stop()
return
}
_add_link()
}
$stop()
$stop()

48
list.ce
View File

@@ -12,6 +12,13 @@ var fd = use('fd')
var mode = 'local'
var target_pkg = null
var resolved = null
var i = 0
var deps = null
var packages = null
var local_pkgs = null
var linked_pkgs = null
var remote_pkgs = null
if (args && length(args) > 0) {
if (args[0] == 'shop') {
@@ -32,7 +39,7 @@ if (args && length(args) > 0) {
// Resolve local paths
if (target_pkg == '.' || starts_with(target_pkg, './') || starts_with(target_pkg, '../') || fd.is_dir(target_pkg)) {
var resolved = fd.realpath(target_pkg)
resolved = fd.realpath(target_pkg)
if (resolved) {
target_pkg = resolved
}
@@ -44,21 +51,23 @@ var links = link.load()
var lock = shop.load_lock()
function print_deps(ctx, indent) {
var aliases = null
indent = indent || ""
var deps
try {
deps = null
var _read = function() {
deps = pkg.dependencies(ctx)
} catch (e) {
} disruption {
log.console(indent + " (could not read dependencies)")
return
}
_read()
if (!deps) {
log.console(indent + " (none)")
return
}
var aliases = array(deps)
aliases = array(deps)
aliases = sort(aliases)
if (length(aliases) == 0) {
@@ -66,19 +75,26 @@ function print_deps(ctx, indent) {
return
}
for (var i = 0; i < length(aliases); i++) {
var alias = aliases[i]
var locator = deps[alias]
var link_target = links[locator]
var lock_entry = lock[locator]
var j = 0
var alias = null
var locator = null
var link_target = null
var lock_entry = null
var line = null
var status = null
for (j = 0; j < length(aliases); j++) {
alias = aliases[j]
locator = deps[alias]
link_target = links[locator]
lock_entry = lock[locator]
var line = indent + " " + alias
line = indent + " " + alias
if (alias != locator) {
line += " -> " + locator
}
// Add status indicators
var status = []
status = []
if (link_target) {
push(status, "linked -> " + link_target)
}
@@ -110,16 +126,16 @@ if (mode == 'local') {
log.console("Shop packages:")
log.console("")
var packages = shop.list_packages()
packages = shop.list_packages()
if (length(packages) == 0) {
log.console(" (none)")
} else {
packages = sort(packages)
// Group by type
var local_pkgs = []
var linked_pkgs = []
var remote_pkgs = []
local_pkgs = []
linked_pkgs = []
remote_pkgs = []
arrfor(packages, function(p) {
if (p == 'core') return

5
ls.ce
View File

@@ -9,13 +9,14 @@ var ctx = null
var pkg = args[0] || package.find_package_dir('.')
var modules = package.list_modules(pkg)
var programs = package.list_programs(pkg)
var i = 0
log.console("Modules in " + pkg + ":")
modules = sort(modules)
if (length(modules) == 0) {
log.console(" (none)")
} else {
for (var i = 0; i < length(modules); i++) {
for (i = 0; i < length(modules); i++) {
log.console(" " + modules[i])
}
}
@@ -26,7 +27,7 @@ programs = sort(programs)
if (length(programs) == 0) {
log.console(" (none)")
} else {
for (var i = 0; i < length(programs); i++) {
for (i = 0; i < length(programs); i++) {
log.console(" " + programs[i])
}
}

16
pack.ce
View File

@@ -13,6 +13,7 @@ var target = null
var output_name = 'app'
var target_package = null
var buildtype = 'debug'
var i = 0
if (length(args) < 1) {
log.error('Usage: cell pack <package> [options]')
@@ -24,12 +25,11 @@ if (length(args) < 1) {
log.error('')
log.error('Available targets: ' + text(build.list_targets(), ', '))
$stop()
return
}
target_package = args[0]
for (var i = 1; i < length(args); i++) {
for (i = 1; i < length(args); i++) {
if (args[i] == '-t' || args[i] == '--target') {
if (i + 1 < length(args)) {
target = args[++i]
@@ -87,7 +87,7 @@ if (target && !build.has_target(target)) {
var packages = ['core']
var deps = pkg_tools.gather_dependencies(target_package)
for (var i = 0; i < length(deps); i++) {
for (i = 0; i < length(deps); i++) {
push(packages, deps[i])
}
push(packages, target_package)
@@ -95,7 +95,7 @@ push(packages, target_package)
// Remove duplicates
var unique_packages = []
var seen = {}
for (var i = 0; i < length(packages); i++) {
for (i = 0; i < length(packages); i++) {
if (!seen[packages[i]]) {
seen[packages[i]] = true
push(unique_packages, packages[i])
@@ -111,13 +111,13 @@ arrfor(packages, function(package) {
log.console('Building static binary from ' + text(length(packages)) + ' packages: ' + text(packages, ', '))
try {
var _build = function() {
var result = build.build_static(packages, target, output_name, buildtype)
log.console('Build complete: ' + result)
} catch (e) {
log.error('Build failed: ')
log.error(e)
} disruption {
log.error('Build failed')
$stop()
}
_build()
$stop()

View File

@@ -9,19 +9,20 @@ function print_usage() {
log.console(" <sources...> <archive> .. create archive from sources")
}
function list(archive_path) {
function list_archive(archive_path) {
var blob = fd.slurp(archive_path)
var archive = null
if (!blob) {
log.console("Could not open archive " + archive_path)
return
}
var archive = null
try {
var _open = function() {
archive = qop.open(blob)
} catch(e) {
log.console("Could not open archive " + archive_path + ": " + e.message)
} disruption {
log.console("Could not open archive " + archive_path)
return
}
_open()
var files = archive.list()
arrfor(files, function(f) {
@@ -35,34 +36,41 @@ function list(archive_path) {
function unpack(archive_path) {
var blob = fd.slurp(archive_path)
var archive = null
if (!blob) {
log.console("Could not open archive " + archive_path)
return
}
var archive = null
try {
var _open = function() {
archive = qop.open(blob)
} catch(e) {
log.console("Could not open archive " + archive_path + ": " + e.message)
} disruption {
log.console("Could not open archive " + archive_path)
return
}
_open()
var files = archive.list()
arrfor(files, function(f) {
var data = archive.read(f)
var dir = null
var parts = null
var curr = null
var fh = null
var _mk = null
if (data) {
// Ensure directory exists
var dir = fd.dirname(f)
dir = fd.dirname(f)
if (dir) {
// recursive mkdir
var parts = array(dir, '/')
var curr = "."
parts = array(dir, '/')
curr = "."
arrfor(parts, function(p) {
curr += "/" + p
try { fd.mkdir(curr) } catch(e) {}
_mk = function() { fd.mkdir(curr) } disruption {}
_mk()
})
}
var fh = fd.open(f, "w")
fh = fd.open(f, "w")
fd.write(fh, data)
fd.close(fh)
log.console("Extracted " + f)
@@ -73,9 +81,9 @@ function unpack(archive_path) {
function pack(sources, archive_path, read_dir) {
var writer = qop.write(archive_path)
var base_dir = read_dir || "."
function add_recursive(path) {
var full_path = base_dir + "/" + path
if (path == ".") full_path = base_dir
@@ -86,7 +94,7 @@ function pack(sources, archive_path, read_dir) {
log.console("Could not stat " + full_path)
return
}
if (st.isDirectory) {
var list = fd.readdir(full_path)
arrfor(list, function(item) {
@@ -102,39 +110,44 @@ function pack(sources, archive_path, read_dir) {
}
}
}
arrfor(sources, function(s) {
add_recursive(s)
})
writer.finalize()
log.console("Created " + archive_path)
}
if (!is_array(arg) || length(arg) < 1) {
var sources = null
var archive = null
var read_dir = null
var i = 0
if (!is_array(args) || length(args) < 1) {
print_usage()
} else {
if (arg[0] == "-l") {
if (length(arg) < 2) print_usage()
else list(arg[1])
} else if (arg[0] == "-u") {
if (length(arg) < 2) print_usage()
else unpack(arg[1])
if (args[0] == "-l") {
if (length(args) < 2) print_usage()
else list_archive(args[1])
} else if (args[0] == "-u") {
if (length(args) < 2) print_usage()
else unpack(args[1])
} else {
var sources = []
var archive = null
var read_dir = null
var i = 0
if (arg[0] == "-d") {
read_dir = arg[1]
sources = []
archive = null
read_dir = null
i = 0
if (args[0] == "-d") {
read_dir = args[1]
i = 2
}
for (; i < length(arg) - 1; i++) {
push(sources, arg[i])
for (; i < length(args) - 1; i++) {
push(sources, args[i])
}
archive = arg[length(arg) - 1]
archive = args[length(args) - 1]
if (length(sources) == 0) {
print_usage()
} else {
@@ -143,4 +156,4 @@ if (!is_array(arg) || length(arg) < 1) {
}
}
$stop()
$stop()

View File

@@ -16,8 +16,10 @@ var fd = use('fd')
var target_pkg = null
var prune = false
var dry_run = false
var i = 0
var resolved = null
for (var i = 0; i < length(args); i++) {
for (i = 0; i < length(args); i++) {
if (args[i] == '--prune') {
prune = true
} else if (args[i] == '--dry-run') {
@@ -43,7 +45,7 @@ if (!target_pkg) {
// Resolve relative paths to absolute paths
if (target_pkg == '.' || starts_with(target_pkg, './') || starts_with(target_pkg, '../') || fd.is_dir(target_pkg)) {
var resolved = fd.realpath(target_pkg)
resolved = fd.realpath(target_pkg)
if (resolved) {
target_pkg = resolved
}
@@ -51,27 +53,31 @@ if (target_pkg == '.' || starts_with(target_pkg, './') || starts_with(target_pkg
var packages_to_remove = [target_pkg]
var lock = null
var all_packages = null
var needed = null
if (prune) {
// Find packages no longer needed
// Get all dependencies of remaining packages
var lock = shop.load_lock()
var all_packages = shop.list_packages()
lock = shop.load_lock()
all_packages = shop.list_packages()
// Build set of all needed packages (excluding target)
var needed = {}
needed = {}
arrfor(all_packages, function(p) {
if (p == target_pkg || p == 'core') return
// Mark this package and its deps as needed
needed[p] = true
try {
var _gather = function() {
var deps = pkg.gather_dependencies(p)
arrfor(deps, function(dep) {
needed[dep] = true
})
} catch (e) {
} disruption {
// Skip if can't read deps
}
_gather()
})
// Find packages that are NOT needed

View File

@@ -20,8 +20,10 @@ var target_locator = null
var target_triple = null
var show_locked = false
var refresh_first = false
var i = 0
var resolved = null
for (var i = 0; i < length(args); i++) {
for (i = 0; i < length(args); i++) {
if (args[i] == '--target' || args[i] == '-t') {
if (i + 1 < length(args)) {
target_triple = args[++i]
@@ -55,16 +57,17 @@ if (!target_locator) {
// Resolve local paths
if (target_locator == '.' || starts_with(target_locator, './') || starts_with(target_locator, '../') || fd.is_dir(target_locator)) {
var resolved = fd.realpath(target_locator)
resolved = fd.realpath(target_locator)
if (resolved) {
target_locator = resolved
}
}
// Check if it's a valid package
var pkg_dir = null
if (!fd.is_file(target_locator + '/cell.toml')) {
// Try to find it in the shop
var pkg_dir = shop.get_package_dir(target_locator)
pkg_dir = shop.get_package_dir(target_locator)
if (!fd.is_file(pkg_dir + '/cell.toml')) {
log.error("Not a valid package: " + target_locator)
$stop()
@@ -89,7 +92,7 @@ function gather_deps(locator, depth) {
all_deps[locator] = { depth: depth }
try {
var _gather = function() {
var deps = pkg.dependencies(locator)
if (deps) {
arrfor(array(deps), function(alias) {
@@ -97,9 +100,10 @@ function gather_deps(locator, depth) {
gather_deps(dep_locator, depth + 1)
})
}
} catch (e) {
} disruption {
// Package might not have dependencies
}
_gather()
}
gather_deps(target_locator, 0)
@@ -114,51 +118,74 @@ var sorted = array(array(all_deps), function(locator) { return { locator: locato
sorted = sort(sorted, "locator")
sorted = sort(sorted, "depth")
for (var i = 0; i < length(sorted); i++) {
var locator = sorted[i].locator
var depth = sorted[i].depth
var j = 0
var locator = null
var depth = 0
var indent = null
var info = null
var lock_entry = null
var link_target = null
var effective_locator = null
var is_linked = false
var is_in_lock = false
var is_local = false
var is_fetched = false
var lib_dir = null
var lib_name = null
var dylib_ext = null
var lib_path = null
var is_built = false
var status_parts = null
var commit_str = null
var line = null
var cflags = null
var ldflags = null
var indent = ""
for (var j = 0; j < depth; j++) indent += " "
for (i = 0; i < length(sorted); i++) {
locator = sorted[i].locator
depth = sorted[i].depth
indent = ""
for (j = 0; j < depth; j++) indent += " "
// Get info about this package
var info = shop.resolve_package_info(locator)
var lock_entry = lock[locator]
var link_target = show_locked ? null : links[locator]
var effective_locator = link_target || locator
info = shop.resolve_package_info(locator)
lock_entry = lock[locator]
link_target = show_locked ? null : links[locator]
effective_locator = link_target || locator
// Check status
var is_linked = link_target != null
var is_in_lock = lock_entry != null
var is_local = info == 'local'
is_linked = link_target != null
is_in_lock = lock_entry != null
is_local = info == 'local'
// Check if fetched (package directory exists)
var pkg_dir = shop.get_package_dir(locator)
var is_fetched = fd.is_dir(pkg_dir) || fd.is_link(pkg_dir)
pkg_dir = shop.get_package_dir(locator)
is_fetched = fd.is_dir(pkg_dir) || fd.is_link(pkg_dir)
// Check if built (library exists)
var lib_dir = shop.get_lib_dir()
var lib_name = shop.lib_name_for_package(locator)
var dylib_ext = '.dylib' // TODO: detect from target
var lib_path = lib_dir + '/' + lib_name + dylib_ext
var is_built = fd.is_file(lib_path)
lib_dir = shop.get_lib_dir()
lib_name = shop.lib_name_for_package(locator)
dylib_ext = '.dylib' // TODO: detect from target
lib_path = lib_dir + '/' + lib_name + dylib_ext
is_built = fd.is_file(lib_path)
// Format output
var status_parts = []
status_parts = []
if (is_linked) push(status_parts, "linked")
if (is_local) push(status_parts, "local")
if (!is_in_lock) push(status_parts, "not in lock")
if (!is_fetched) push(status_parts, "not fetched")
if (is_built) push(status_parts, "built")
var commit_str = ""
commit_str = ""
if (lock_entry && lock_entry.commit) {
commit_str = " @" + text(lock_entry.commit, 0, 8)
} else if (lock_entry && lock_entry.type == 'local') {
commit_str = " (local)"
}
var line = indent + locator + commit_str
line = indent + locator + commit_str
if (is_linked && !show_locked) {
line += " -> " + link_target
@@ -172,9 +199,9 @@ for (var i = 0; i < length(sorted); i++) {
// Show compilation inputs if requested (verbose)
if (depth == 0) {
try {
var cflags = pkg.get_flags(locator, 'CFLAGS', target_triple)
var ldflags = pkg.get_flags(locator, 'LDFLAGS', target_triple)
var _show_flags = function() {
cflags = pkg.get_flags(locator, 'CFLAGS', target_triple)
ldflags = pkg.get_flags(locator, 'LDFLAGS', target_triple)
if (length(cflags) > 0 || length(ldflags) > 0) {
log.console(indent + " Compilation inputs:")
if (length(cflags) > 0) {
@@ -184,9 +211,10 @@ for (var i = 0; i < length(sorted); i++) {
log.console(indent + " LDFLAGS: " + text(ldflags, ' '))
}
}
} catch (e) {
} disruption {
// Skip if can't read config
}
_show_flags()
}
}

View File

@@ -8,7 +8,6 @@ if (length(args) < 1) {
log.console("Usage: cell search <query>")
log.console("Searches for packages, actors, or modules matching the query.")
$stop()
return
}
var query = args[0]
@@ -24,25 +23,26 @@ arrfor(packages, function(package_name) {
if (search(package_name, query) != null) {
push(found_packages, package_name)
}
// Search modules and actors within the package
try {
var _search = function() {
var modules = pkg.list_modules(package_name)
arrfor(modules, function(mod) {
if (search(mod, query) != null) {
push(found_modules, package_name + ':' + mod)
}
})
var actors = pkg.list_programs(package_name)
arrfor(actors, function(actor) {
if (search(actor, query) != null) {
push(found_actors, package_name + ':' + actor)
}
})
} catch (e) {
} disruption {
// Skip packages that can't be read
}
_search()
})
// Print results
@@ -53,7 +53,7 @@ if (total == 0) {
} else {
log.console("Found " + text(total) + " result(s) for '" + query + "':")
log.console("")
if (length(found_packages) > 0) {
log.console("Packages:")
arrfor(found_packages, function(p) {
@@ -61,7 +61,7 @@ if (total == 0) {
})
log.console("")
}
if (length(found_modules) > 0) {
log.console("Modules:")
arrfor(found_modules, function(m) {
@@ -69,7 +69,7 @@ if (total == 0) {
})
log.console("")
}
if (length(found_actors) > 0) {
log.console("Actors:")
arrfor(found_actors, function(a) {

View File

@@ -8,24 +8,25 @@ if (length(args) < 1) {
log.console("Usage: cell unlink <origin>")
log.console("Removes a link and restores the original package.")
$stop()
return
}
var origin = args[0]
var _restore = null
if (link.remove(origin)) {
log.console("Removed link for " + origin)
// Try to restore the original package
log.console("Restoring " + origin + "...")
try {
_restore = function() {
shop.fetch(origin)
shop.extract(origin)
log.console("Restored " + origin)
} catch (e) {
log.console("Could not restore: " + e.message)
} disruption {
log.console("Could not restore")
log.console("Run 'cell update " + origin + "' to restore")
}
_restore()
} else {
log.console("No link found for " + origin)
}

View File

@@ -18,9 +18,11 @@ var target_pkg = null
var run_build = false
var target_triple = null
var follow_links = false
var i = 0
var resolved = null
// Parse arguments
for (var i = 0; i < length(args); i++) {
for (i = 0; i < length(args); i++) {
if (args[i] == '--help' || args[i] == '-h') {
log.console("Usage: cell update [<locator>] [options]")
log.console("")
@@ -46,7 +48,7 @@ for (var i = 0; i < length(args); i++) {
target_pkg = args[i]
// Resolve relative paths to absolute paths
if (target_pkg == '.' || starts_with(target_pkg, './') || starts_with(target_pkg, '../') || fd.is_dir(target_pkg)) {
var resolved = fd.realpath(target_pkg)
resolved = fd.realpath(target_pkg)
if (resolved) {
target_pkg = resolved
}
@@ -61,27 +63,29 @@ if (run_build && !target_triple) {
var link = use('link')
function update_and_fetch(pkg)
{
function update_and_fetch(pkg) {
var lock = shop.load_lock()
var old_entry = lock[pkg]
var old_commit = old_entry ? old_entry.commit : null
var effective_pkg = pkg
var link_target = null
var new_entry = null
var old_str = null
// Handle follow-links option
var effective_pkg = pkg
if (follow_links) {
var link_target = link.get_target(pkg)
link_target = link.get_target(pkg)
if (link_target) {
effective_pkg = link_target
log.console(" Following link: " + pkg + " -> " + effective_pkg)
}
}
var new_entry = shop.update(effective_pkg)
new_entry = shop.update(effective_pkg)
if (new_entry) {
if (new_entry.commit) {
var old_str = old_commit ? text(old_commit, 0, 8) : "(new)"
old_str = old_commit ? text(old_commit, 0, 8) : "(new)"
log.console(" " + effective_pkg + " " + old_str + " -> " + text(new_entry.commit, 0, 8))
shop.fetch(effective_pkg)
} else {
@@ -97,8 +101,12 @@ function update_and_fetch(pkg)
var updated_packages = []
var updated = null
var packages = null
var pkg_count = 0
var pkg = null
if (target_pkg) {
var updated = update_and_fetch(target_pkg)
updated = update_and_fetch(target_pkg)
if (updated) {
push(updated_packages, updated)
log.console("Updated " + target_pkg + ".")
@@ -106,15 +114,15 @@ if (target_pkg) {
log.console(target_pkg + " is up to date.")
}
} else {
var packages = shop.list_packages()
var pkg_count = length(packages)
packages = shop.list_packages()
pkg_count = length(packages)
log.console("Checking for updates (" + text(pkg_count) + " package" + (pkg_count == 1 ? "" : "s") + ")...")
for (var i = 0; i < length(packages); i++) {
var pkg = packages[i]
for (i = 0; i < length(packages); i++) {
pkg = packages[i]
if (pkg == 'core') continue
var updated = update_and_fetch(pkg)
updated = update_and_fetch(pkg)
if (updated) {
push(updated_packages, updated)
}
@@ -133,13 +141,14 @@ if (run_build && length(updated_packages) > 0) {
log.console("Building updated packages...")
arrfor(updated_packages, function(pkg) {
try {
var _build = function() {
var lib = build.build_dynamic(pkg, target_triple, 'release')
if (lib)
log.console(" Built: " + lib)
} catch (e) {
log.error(" Failed to build " + pkg + ": " + e)
} disruption {
log.error(" Failed to build " + pkg)
}
_build()
})
}

View File

@@ -2,13 +2,15 @@ var shop = use('internal/shop')
var fd = use('fd')
var cmd = length(args) > 0 ? args[0] : null
var target = null
var core_dir = null
if (cmd == 'link') {
if (length(args) < 2) {
log.console("Usage: cell upgrade link <core_dir>")
return
$stop()
}
var target = args[1]
target = args[1]
if (shop.link_core(target)) {
log.console("Linked core -> " + fd.realpath(target))
} else {
@@ -25,7 +27,7 @@ if (cmd == 'link') {
} else {
// cell upgrade (no args)
if (shop.is_core_linked()) {
var core_dir = shop.get_core_dir()
core_dir = shop.get_core_dir()
log.console("Core is linked to " + fd.readlink(core_dir))
log.console("Unlink first to upgrade standard core.")
} else {
@@ -34,4 +36,4 @@ if (cmd == 'link') {
}
}
$stop()
$stop()

View File

@@ -20,8 +20,10 @@ var fd = use('fd')
var scope = null
var deep = false
var target_triple = null
var i = 0
var resolved = null
for (var i = 0; i < length(args); i++) {
for (i = 0; i < length(args); i++) {
if (args[i] == '--deep') {
deep = true
} else if (args[i] == '--target' || args[i] == '-t') {
@@ -74,12 +76,27 @@ function add_warning(msg) {
// Verify a single package
function verify_package(locator) {
var lock = null
var lock_entry = null
var links = null
var link_target = null
var pkg_dir = null
var dir_exists = false
var current_target = null
var expected_target = null
var target_dir = null
var lib_dir = null
var lib_name = null
var dylib_ext = null
var lib_path = null
var c_files = null
checked++
var lock = shop.load_lock()
var lock_entry = lock[locator]
var links = link.load()
var link_target = links[locator]
lock = shop.load_lock()
lock_entry = lock[locator]
links = link.load()
link_target = links[locator]
// Check lock entry exists
if (!lock_entry) {
@@ -87,8 +104,8 @@ function verify_package(locator) {
}
// Check package directory exists
var pkg_dir = shop.get_package_dir(locator)
var dir_exists = fd.is_dir(pkg_dir) || fd.is_link(pkg_dir)
pkg_dir = shop.get_package_dir(locator)
dir_exists = fd.is_dir(pkg_dir) || fd.is_link(pkg_dir)
if (!dir_exists) {
add_error(locator + ": package directory missing at " + pkg_dir)
@@ -112,7 +129,7 @@ function verify_package(locator) {
}
} else {
// Package target
var target_dir = shop.get_package_dir(link_target)
target_dir = shop.get_package_dir(link_target)
if (!fd.is_dir(target_dir) && !fd.is_link(target_dir)) {
add_error(locator + ": link target package not found: " + link_target)
}
@@ -120,8 +137,8 @@ function verify_package(locator) {
// Check symlink is correct
if (fd.is_link(pkg_dir)) {
var current_target = fd.readlink(pkg_dir)
var expected_target = starts_with(link_target, '/') ? link_target : shop.get_package_dir(link_target)
current_target = fd.readlink(pkg_dir)
expected_target = starts_with(link_target, '/') ? link_target : shop.get_package_dir(link_target)
if (current_target != expected_target) {
add_warning(locator + ": symlink target mismatch (expected " + expected_target + ", got " + current_target + ")")
}
@@ -131,22 +148,23 @@ function verify_package(locator) {
}
// Check build output exists
var lib_dir = shop.get_lib_dir()
var lib_name = shop.lib_name_for_package(locator)
var dylib_ext = '.dylib' // TODO: detect from target
var lib_path = lib_dir + '/' + lib_name + dylib_ext
lib_dir = shop.get_lib_dir()
lib_name = shop.lib_name_for_package(locator)
dylib_ext = '.dylib' // TODO: detect from target
lib_path = lib_dir + '/' + lib_name + dylib_ext
// Only check for builds if package has C files
try {
var c_files = pkg.get_c_files(locator, target_triple, true)
var _check_build = function() {
c_files = pkg.get_c_files(locator, target_triple, true)
if (c_files && length(c_files) > 0) {
if (!fd.is_file(lib_path)) {
add_warning(locator + ": library not built at " + lib_path)
}
}
} catch (e) {
} disruption {
// Skip build check if can't determine C files
}
_check_build()
}
// Check for link cycles
@@ -154,19 +172,20 @@ function check_link_cycles() {
var links = link.load()
function follow_chain(origin, visited) {
var target = null
if (visited[origin]) {
return origin // cycle detected
}
visited[origin] = true
var target = links[origin]
target = links[origin]
if (target && links[target]) {
return follow_chain(target, visited)
}
return null
}
arrfor(links, function(origin) {
arrfor(array(links), function(origin) {
var cycle_start = follow_chain(origin, {})
if (cycle_start) {
add_error("Link cycle detected starting from: " + origin)
@@ -190,20 +209,21 @@ function check_dangling_links() {
// Gather packages to verify
var packages_to_verify = []
var locator = null
var all_deps = null
if (scope == 'shop') {
packages_to_verify = shop.list_packages()
} else if (scope == 'world') {
// For now, world is the same as shop
// In future, this could be a separate concept
packages_to_verify = shop.list_packages()
} else {
// Single package
var locator = scope
locator = scope
// Resolve local paths
if (locator == '.' || starts_with(locator, './') || starts_with(locator, '../') || fd.is_dir(locator)) {
var resolved = fd.realpath(locator)
resolved = fd.realpath(locator)
if (resolved) {
locator = resolved
}
@@ -211,7 +231,7 @@ if (scope == 'shop') {
if (deep) {
// Gather all dependencies
var all_deps = pkg.gather_dependencies(locator)
all_deps = pkg.gather_dependencies(locator)
push(packages_to_verify, locator)
arrfor(all_deps, function(dep) {
push(packages_to_verify, dep)
@@ -249,7 +269,6 @@ if (length(errors) > 0) {
})
log.console("")
log.console("Verification FAILED: " + text(length(errors)) + " error(s), " + text(length(warnings)) + " warning(s)")
// Note: would use process.exit(1) if available
} else {
log.console("Verification PASSED: " + text(checked) + " package(s) checked, " + text(length(warnings)) + " warning(s)")
}

85
why.ce
View File

@@ -4,7 +4,6 @@ var pkg = use('package')
if (!args || length(args) < 1) {
log.console("Usage: cell why <package>")
$stop()
return
}
var target = args[0]
@@ -19,56 +18,65 @@ var found = false
// current_pkg: canonical path of current package (null for root)
// stack: array of {alias, pkg} leading to current_pkg
function search(current_pkg, stack) {
function search_deps(current_pkg, stack) {
var deps = pkg.dependencies(current_pkg)
// Sort for consistent output
var aliases = sort(array(deps))
for (var i = 0; i < length(aliases); i++) {
var alias = aliases[i]
var locator = deps[alias]
var parsed = shop.parse_package(locator)
var i = 0
var alias = null
var locator = null
var parsed = null
var canon = null
var locator_clean = null
var match = false
var node = null
var new_stack = null
var cycle = false
var j = 0
for (i = 0; i < length(aliases); i++) {
alias = aliases[i]
locator = deps[alias]
parsed = shop.parse_package(locator)
if (!parsed) continue
var canon = parsed.path
var locator_clean = locator
canon = parsed.path
locator_clean = locator
if (search(locator, '@') != null) locator_clean = array(locator, '@')[0]
// Check if match
// 1. Alias matches
// 2. Package name matches
// 3. Canonical path matches (exact or clean)
// 4. Locator matches (exact or clean)
var match = (alias == target) ||
(parsed.name == target) ||
(canon == target) ||
match = (alias == target) ||
(parsed.name == target) ||
(canon == target) ||
(canon == target_clean) ||
(locator == target) ||
(locator_clean == target)
var node = { alias: alias, pkg: canon, locator: locator }
var new_stack = stack.concat([node])
node = { alias: alias, pkg: canon, locator: locator }
new_stack = stack.concat([node])
if (match) {
found = true
print_stack(new_stack)
// Don't recurse if we found the target in this branch
continue
continue
}
// Recurse if not seen in current stack (cycle detection)
var cycle = false
for (var j = 0; j < length(stack); j++) {
cycle = false
for (j = 0; j < length(stack); j++) {
if (stack[j].pkg == canon) {
cycle = true
break
}
}
if (!cycle) {
search(canon, new_stack)
search_deps(canon, new_stack)
}
}
}
@@ -76,18 +84,23 @@ function search(current_pkg, stack) {
function print_stack(stack) {
// Calculate max width for alignment if needed, but simple tree is fine
var output = "project"
var i = 0
var node = null
var indent = null
var j = 0
var info = null
log.console(output)
for (var i = 0; i < length(stack); i++) {
var node = stack[i]
var indent = ""
for (var j = 0; j <= i; j++) indent += " "
var info = node.locator
for (i = 0; i < length(stack); i++) {
node = stack[i]
indent = ""
for (j = 0; j <= i; j++) indent += " "
info = node.locator
if (node.alias != parsed_name(node.locator)) {
// info += " (aliased as " + node.alias + ")"
}
log.console(indent + "-> " + node.alias + " (" + info + ")")
}
log.console("")
@@ -98,7 +111,7 @@ function parsed_name(locator) {
return parsed ? parsed.name : ""
}
search(null, [])
search_deps(null, [])
if (!found) {
log.console("Package '" + target + "' not found in dependency tree.")