jspm 3.2.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -201
- package/README.md +26 -26
- package/dist/cli.js +442 -435
- package/jspm.js +10 -10
- package/package.json +33 -33
package/dist/cli.js
CHANGED
|
@@ -232,14 +232,14 @@ function escapeId(id) {
|
|
|
232
232
|
return id;
|
|
233
233
|
return id.replace(backSlashRegEx, "\\\\").replace(quoteNewlineRegEx, "\\$1");
|
|
234
234
|
}
|
|
235
|
-
function isAbsolute(
|
|
236
|
-
return ABSOLUTE_PATH_REGEX.test(
|
|
235
|
+
function isAbsolute(path4) {
|
|
236
|
+
return ABSOLUTE_PATH_REGEX.test(path4);
|
|
237
237
|
}
|
|
238
|
-
function isRelative(
|
|
239
|
-
return RELATIVE_PATH_REGEX.test(
|
|
238
|
+
function isRelative(path4) {
|
|
239
|
+
return RELATIVE_PATH_REGEX.test(path4);
|
|
240
240
|
}
|
|
241
|
-
function normalize(
|
|
242
|
-
return
|
|
241
|
+
function normalize(path4) {
|
|
242
|
+
return path4.replace(BACKSLASH_REGEX, "/");
|
|
243
243
|
}
|
|
244
244
|
function getAliasName(id) {
|
|
245
245
|
const base2 = basename(id);
|
|
@@ -1244,9 +1244,9 @@ function is_reference(node, parent) {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
return false;
|
|
1246
1246
|
}
|
|
1247
|
-
function getGlobalAtPath(
|
|
1247
|
+
function getGlobalAtPath(path4) {
|
|
1248
1248
|
let currentGlobal = knownGlobals;
|
|
1249
|
-
for (const pathSegment of
|
|
1249
|
+
for (const pathSegment of path4) {
|
|
1250
1250
|
if (typeof pathSegment !== "string") {
|
|
1251
1251
|
return null;
|
|
1252
1252
|
}
|
|
@@ -1477,29 +1477,29 @@ function getPathIfNotComputed(memberExpression) {
|
|
|
1477
1477
|
}
|
|
1478
1478
|
return null;
|
|
1479
1479
|
}
|
|
1480
|
-
function getStringFromPath(
|
|
1481
|
-
let pathString =
|
|
1482
|
-
for (let index = 1; index <
|
|
1483
|
-
pathString += "." +
|
|
1480
|
+
function getStringFromPath(path4) {
|
|
1481
|
+
let pathString = path4[0].key;
|
|
1482
|
+
for (let index = 1; index < path4.length; index++) {
|
|
1483
|
+
pathString += "." + path4[index].key;
|
|
1484
1484
|
}
|
|
1485
1485
|
return pathString;
|
|
1486
1486
|
}
|
|
1487
|
-
function resolveNamespaceVariables(baseVariable,
|
|
1488
|
-
if (
|
|
1487
|
+
function resolveNamespaceVariables(baseVariable, path4, astContext) {
|
|
1488
|
+
if (path4.length === 0)
|
|
1489
1489
|
return baseVariable;
|
|
1490
1490
|
if (!baseVariable.isNamespace || baseVariable instanceof ExternalVariable)
|
|
1491
1491
|
return null;
|
|
1492
|
-
const exportName =
|
|
1492
|
+
const exportName = path4[0].key;
|
|
1493
1493
|
const variable = baseVariable.context.traceExport(exportName);
|
|
1494
1494
|
if (!variable) {
|
|
1495
|
-
if (
|
|
1495
|
+
if (path4.length === 1) {
|
|
1496
1496
|
const fileName = baseVariable.context.fileName;
|
|
1497
|
-
astContext.log(LOGLEVEL_WARN, logMissingExport(exportName, astContext.module.id, fileName),
|
|
1497
|
+
astContext.log(LOGLEVEL_WARN, logMissingExport(exportName, astContext.module.id, fileName), path4[0].pos);
|
|
1498
1498
|
return "undefined";
|
|
1499
1499
|
}
|
|
1500
1500
|
return null;
|
|
1501
1501
|
}
|
|
1502
|
-
return resolveNamespaceVariables(variable,
|
|
1502
|
+
return resolveNamespaceVariables(variable, path4.slice(1), astContext);
|
|
1503
1503
|
}
|
|
1504
1504
|
function hasLoopBodyEffects(context, body) {
|
|
1505
1505
|
const { brokenFlow, hasBreak, hasContinue, ignore: ignore2 } = context;
|
|
@@ -3161,17 +3161,17 @@ function analyseModuleExecution(entryModules) {
|
|
|
3161
3161
|
}
|
|
3162
3162
|
function getCyclePath(module, parent, parents) {
|
|
3163
3163
|
const cycleSymbol = Symbol(module.id);
|
|
3164
|
-
const
|
|
3164
|
+
const path4 = [module.id];
|
|
3165
3165
|
let nextModule = parent;
|
|
3166
3166
|
module.cycles.add(cycleSymbol);
|
|
3167
3167
|
while (nextModule !== module) {
|
|
3168
3168
|
nextModule.cycles.add(cycleSymbol);
|
|
3169
|
-
|
|
3169
|
+
path4.push(nextModule.id);
|
|
3170
3170
|
nextModule = parents.get(nextModule);
|
|
3171
3171
|
}
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
return
|
|
3172
|
+
path4.push(path4[0]);
|
|
3173
|
+
path4.reverse();
|
|
3174
|
+
return path4;
|
|
3175
3175
|
}
|
|
3176
3176
|
function getGenerateCodeSnippets({ compact, generatedCode: { arrowFunctions, constBindings, objectShorthand, reservedNamesAsProps } }) {
|
|
3177
3177
|
const { _, n: n2, s } = compact ? { _: "", n: "", s: "" } : { _: " ", n: "\n", s: ";" };
|
|
@@ -4827,7 +4827,7 @@ async function writeOutputFile(outputFile, outputOptions) {
|
|
|
4827
4827
|
var version$1, comma, semicolon, chars$1, intToChar, charToInt, td, BitSet, Chunk$1, btoa, SourceMap, toString$1, wordRegex, Mappings, n, warned, MagicString, hasOwnProp, Bundle$1, ANY_SLASH_REGEX, needsEscapeRegEx, quoteNewlineRegEx, backSlashRegEx, ABSOLUTE_PATH_REGEX, RELATIVE_PATH_REGEX, BACKSLASH_REGEX, UPPER_DIR_REGEX, ExternalChunk, UnknownKey, UnknownNonAccessorKey, UnknownInteger, SymbolToStringTag, EMPTY_PATH, UNKNOWN_PATH, UNKNOWN_NON_ACCESSOR_PATH, UNKNOWN_INTEGER_PATH, EntitiesKey, PathTracker, SHARED_RECURSION_TRACKER, DiscriminatedPathTracker, UnknownValue, UnknownTruthyValue, ExpressionEntity, UNKNOWN_EXPRESSION, UNKNOWN_RETURN_EXPRESSION, deoptimizeInteraction, INTERACTION_ACCESSED, INTERACTION_ASSIGNED, INTERACTION_CALLED, NODE_INTERACTION_UNKNOWN_ACCESS, NODE_INTERACTION_UNKNOWN_ASSIGNMENT, NODE_INTERACTION_UNKNOWN_CALL, Variable, ExternalVariable, BLANK, EMPTY_OBJECT, EMPTY_ARRAY, EMPTY_SET, RESERVED_NAMES, RESERVED_NAMES$1, illegalCharacters, startsWithDigit, needsEscape, LOGLEVEL_SILENT, LOGLEVEL_ERROR, LOGLEVEL_WARN, LOGLEVEL_INFO, LOGLEVEL_DEBUG, logLevelPriority, LINE_TRUNCATE_LENGTH, MIN_CHARACTERS_SHOWN_AFTER_LOCATION, ELLIPSIS, URL_AVOIDING_EVAL, URL_NAME_IS_NOT_EXPORTED, URL_THIS_IS_UNDEFINED, URL_TREATING_MODULE_AS_EXTERNAL_DEPENDENCY, URL_SOURCEMAP_IS_LIKELY_TO_BE_INCORRECT, URL_MAXPARALLELFILEOPS, URL_OUTPUT_AMD_ID, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_DIR, URL_OUTPUT_DYNAMICIMPORTFUNCTION, URL_OUTPUT_EXPORTS, URL_OUTPUT_EXTEND, URL_OUTPUT_FORMAT, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_EXPERIMENTALDEEPCHUNKOPTIMIZATION, URL_OUTPUT_GENERATEDCODE_CONSTBINDINGS, URL_OUTPUT_GENERATEDCODE_SYMBOLS, URL_OUTPUT_GLOBALS, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, URL_OUTPUT_NAME, URL_OUTPUT_PRESERVEMODULES, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_SOURCEMAPFILE, URL_PRESERVEENTRYSIGNATURES, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_RENDERDYNAMICIMPORT, URL_THIS_GETMODULEIDS, URL_THIS_GETMODULEINFO, ADDON_ERROR, ALREADY_CLOSED, AMBIGUOUS_EXTERNAL_NAMESPACES, ANONYMOUS_PLUGIN_CACHE, ASSET_NOT_FINALISED, ASSET_NOT_FOUND, ASSET_SOURCE_ALREADY_SET, ASSET_SOURCE_MISSING, BAD_LOADER, CANNOT_CALL_NAMESPACE, CANNOT_EMIT_FROM_OPTIONS_HOOK, CHUNK_NOT_GENERATED, CHUNK_INVALID, CIRCULAR_DEPENDENCY, CIRCULAR_REEXPORT, CYCLIC_CROSS_CHUNK_REEXPORT, DEPRECATED_FEATURE, DUPLICATE_PLUGIN_NAME, EMPTY_BUNDLE, EVAL, EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS, EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES, EXTERNAL_SYNTHETIC_EXPORTS, FILE_NAME_CONFLICT, FILE_NOT_FOUND, FIRST_SIDE_EFFECT, ILLEGAL_IDENTIFIER_AS_NAME, ILLEGAL_REASSIGNMENT, INCONSISTENT_IMPORT_ASSERTIONS, INPUT_HOOK_IN_OUTPUT_PLUGIN, INVALID_CHUNK, INVALID_EXPORT_OPTION, INVALID_EXTERNAL_ID, INVALID_LOG_POSITION, INVALID_OPTION, INVALID_PLUGIN_HOOK, INVALID_ROLLUP_PHASE, INVALID_SETASSETSOURCE, INVALID_TLA_FORMAT, MISSING_EXPORT, MISSING_GLOBAL_NAME, MISSING_IMPLICIT_DEPENDANT, MISSING_NAME_OPTION_FOR_IIFE_EXPORT, MISSING_NODE_BUILTINS, MISSING_OPTION, MIXED_EXPORTS, MODULE_LEVEL_DIRECTIVE, NAMESPACE_CONFLICT, NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE, OPTIMIZE_CHUNK_STATUS, PARSE_ERROR, PLUGIN_ERROR, SHIMMED_EXPORT, SOURCEMAP_BROKEN, SOURCEMAP_ERROR, SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT, THIS_IS_UNDEFINED, UNEXPECTED_NAMED_IMPORT, UNKNOWN_OPTION, UNRESOLVED_ENTRY, UNRESOLVED_IMPORT, UNUSED_EXTERNAL_IMPORT, VALIDATION_ERROR, formatAssertions, ExternalModule, utils$3, path$1, WIN_SLASH, WIN_NO_SLASH, DOT_LITERAL, PLUS_LITERAL, QMARK_LITERAL, SLASH_LITERAL, ONE_CHAR, QMARK, END_ANCHOR, START_ANCHOR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK_NO_DOT, STAR, POSIX_CHARS, WINDOWS_CHARS, POSIX_REGEX_SOURCE$1, constants$2, utils$2, CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET, isPathSeparator, depth, scan$1, scan_1, constants$1, utils$1, MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS, expandRange, syntaxError, parse$2, parse_1, path2, scan, parse$1, utils, constants, isObject, picomatch$1, extractors, extractAssignedNames, reservedWords$1, builtins, forbiddenIdentifiers, UNDEFINED_EXPRESSION, returnsUnknown, UNKNOWN_LITERAL_BOOLEAN, returnsBoolean, UNKNOWN_LITERAL_NUMBER, returnsNumber, UNKNOWN_LITERAL_STRING, returnsString, stringReplace, objectMembers, literalBooleanMembers, literalNumberMembers, literalRegExpMembers, literalStringMembers, base$1, ArrowFunctionExpression$1, BinaryExpression$1, BlockStatement$1, CallExpression$1, ChainExpression$1, ConditionalExpression$1, ExportDefaultDeclaration$1, ExportNamedDeclaration$1, ExpressionStatement$1, FunctionDeclaration$1, Identifier$1, LogicalExpression$1, NewExpression$1, Program$1, Property$1, ReturnStatement$1, SequenceExpression$1, VariableDeclarator$1, VariableDeclaration$1, SOURCEMAPPING_URL, whiteSpaceNoNewline, SOURCEMAPPING_URL_RE, ANNOTATION_KEY, INVALID_COMMENT_KEY, neitherWithespaceNorBrackets, noWhitespace, annotationsRegexes, keys, INCLUDE_PARAMETERS, NodeBase, SpreadElement, Method, METHOD_RETURNS_BOOLEAN, METHOD_RETURNS_STRING, METHOD_RETURNS_NUMBER, METHOD_RETURNS_UNKNOWN, INTEGER_REG_EXP, ObjectEntity, isInteger, OBJECT_PROTOTYPE_FALLBACK, OBJECT_PROTOTYPE, NEW_ARRAY_PROPERTIES, METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_BOOLEAN, METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_NUMBER, METHOD_MUTATES_SELF_RETURNS_NEW_ARRAY, METHOD_DEOPTS_SELF_RETURNS_NEW_ARRAY, METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_NEW_ARRAY, METHOD_MUTATES_SELF_RETURNS_NUMBER, METHOD_MUTATES_SELF_RETURNS_UNKNOWN, METHOD_DEOPTS_SELF_RETURNS_UNKNOWN, METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_UNKNOWN, METHOD_MUTATES_SELF_RETURNS_SELF, METHOD_CALLS_ARG_MUTATES_SELF_RETURNS_SELF, ARRAY_PROTOTYPE, ArrayExpression, ArrayPattern, LocalVariable, MAX_TRACKED_INTERACTIONS, NO_INTERACTIONS, UNKNOWN_DEOPTIMIZED_FIELD, EMPTY_PATH_TRACKER, UNKNOWN_DEOPTIMIZED_ENTITY, ParameterVariable, chars, base, Scope$1, ChildScope, ParameterScope, ReturnValueScope, PureFunctionKey, getPureFunctions, doNothing, ValueProperties, getTruthyLiteralValue, returnFalse, returnTrue, PURE, IMPURE, PURE_WITH_ARRAY, GETTER_ACCESS, O, PF, PF_NO_GETTER, MUTATES_ARG_WITHOUT_ACCESSOR, C, PC, PC_WITH_ARRAY, ARRAY_TYPE, INTL_MEMBER, knownGlobals, GlobalVariable, tdzVariableKinds, Identifier, NO_SEMICOLON, NON_WHITESPACE, BlockScope, ExpressionStatement, BlockStatement, RestElement, FunctionBase, ArrowFunctionExpression, ObjectPattern, AssignmentExpression, AssignmentPattern, ArgumentsVariable, ThisVariable, FunctionScope, FunctionNode, AwaitExpression, binaryOperators, BinaryExpression, BreakStatement, Literal, MAX_PATH_DEPTH, MemberExpression, CallExpressionBase, CallExpression, CatchScope, CatchClause, ChainExpression, ClassBodyScope, ClassBody, MethodBase, MethodDefinition, ObjectMember, ClassNode, ClassDeclaration, ClassExpression, MultiExpression, ConditionalExpression, ContinueStatement, DoWhileStatement, EmptyStatement, ExportAllDeclaration, FunctionDeclaration, ExportDefaultDeclaration, ExportNamedDeclaration, ExportSpecifier, ForInStatement, ForOfStatement, ForStatement, FunctionExpression, TrackingScope, unset, IfStatement, ImportAttribute, ImportDeclaration, ImportDefaultSpecifier, INTEROP_DEFAULT_VARIABLE, INTEROP_DEFAULT_COMPAT_VARIABLE, INTEROP_NAMESPACE_VARIABLE, INTEROP_NAMESPACE_COMPAT_VARIABLE, INTEROP_NAMESPACE_DEFAULT_VARIABLE, INTEROP_NAMESPACE_DEFAULT_ONLY_VARIABLE, MERGE_NAMESPACES_VARIABLE, DOCUMENT_CURRENT_SCRIPT, defaultInteropHelpersByInteropType, isDefaultAProperty, namespaceInteropHelpersByInteropType, canDefaultBeTakenFromNamespace, getHelpersBlock, HELPER_GENERATORS, getDefaultLiveBinding, getDefaultStatic, getIsCompatNamespace, createNamespaceObject, loopOverKeys, loopOverNamespaces, copyNonDefaultOwnPropertyLiveBinding, copyOwnPropertyLiveBinding, copyPropertyLiveBinding, copyPropertyStatic, getFrozen, getWithToStringTag, HELPER_NAMES, VariableDeclarator, ImportExpression, accessedImportGlobals, ImportNamespaceSpecifier, ImportSpecifier, LabeledStatement, LogicalExpression, FILE_PREFIX, IMPORT, MetaProperty, formatsMaybeAccessDocumentCurrentScript, accessedMetaUrlGlobals, accessedFileUrlGlobals, getResolveUrl, getRelativeUrlFromDocument, getGenericImportMetaMechanism, getFileUrlFromFullPath, getFileUrlFromRelativePath, getUrlFromDocument, relativeUrlMechanisms, importMetaMechanisms, NewExpression, ObjectExpression, PrivateIdentifier, Program, Property, PropertyDefinition, ReturnStatement, SequenceExpression, StaticBlock, Super, SwitchCase, SwitchStatement, TaggedTemplateExpression, TemplateElement, TemplateLiteral, UndefinedVariable, ExportDefaultVariable, ModuleScope, ThisExpression, ThrowStatement, TryStatement, unaryOperators, UnaryExpression, UnknownNode, UpdateExpression, VariableDeclaration, WhileStatement, YieldExpression, nodeConstructors, MISSING_EXPORT_SHIM_VARIABLE, ExportShimVariable, NamespaceVariable, SyntheticNamedExportVariable, BuildPhase, sourceMapCache, getPropertyKey, timers, timeStart, timeEnd, TIMED_PLUGIN_HOOKS, MISSING_EXPORT_SHIM_DESCRIPTION, Module, copyNameToModulesMap, getDefineProperty, require$$0, _static, builtinModules, nodeBuiltins, keypath, getStarExcludes, getStarExcludesBlock, getImportBindingsBlock, getHoistedExportsBlock, getSyntheticExportsBlock, getMissingExportsBlock, finalisers, concatSeparator, concatDblSeparator, DECONFLICT_IMPORTED_VARIABLES_BY_FORMAT, hashPlaceholderLeft, hashPlaceholderRight, hashPlaceholderOverhead, maxHashSize, defaultHashSize, getHashPlaceholderGenerator, REPLACER_REGEX, replacePlaceholders, replaceSinglePlaceholder, replacePlaceholdersWithDefaultAndGetContainedPlaceholders, lowercaseBundleKeys, FILE_PLACEHOLDER, getOutputBundle, removeUnreferencedAssets, NON_ASSET_EXTENSIONS, Chunk2, QUERY_HASH_REGEX, resolveFileName, compareExecIndex, wrapIfNeeded, validPropertyName, Source, Link, createHash, Bundle2, astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars, nonASCIIidentifierStartChars, reservedWords, ecma5AndLessKeywords, keywords$1, keywordRelationalOperator, nonASCIIidentifierStart, nonASCIIidentifier, TokenType, beforeExpr, startsExpr, keywords, types$1, lineBreak, lineBreakG, nonASCIIwhitespace, skipWhiteSpace, ref, hasOwnProperty, toString, hasOwn, isArray, loneSurrogate, Position, SourceLocation, defaultOptions, warnedAboutEcmaVersion, SCOPE_TOP, SCOPE_FUNCTION, SCOPE_ASYNC, SCOPE_GENERATOR, SCOPE_ARROW, SCOPE_SIMPLE_CATCH, SCOPE_SUPER, SCOPE_DIRECT_SUPER, SCOPE_CLASS_STATIC_BLOCK, SCOPE_VAR, BIND_NONE, BIND_VAR, BIND_LEXICAL, BIND_FUNCTION, BIND_SIMPLE_CATCH, BIND_OUTSIDE, Parser, prototypeAccessors, pp$9, literal, DestructuringErrors, pp$8, loopLabel, switchLabel, empty$1, FUNC_STATEMENT$1, FUNC_HANGING_STATEMENT, FUNC_NULLABLE_ID$1, pp$7, TokContext, types, pp$6, pp$5, empty, pp$4, pp$3, Scope2, Node, pp$2, ecma9BinaryProperties, ecma10BinaryProperties, ecma11BinaryProperties, ecma12BinaryProperties, ecma13BinaryProperties, ecma14BinaryProperties, unicodeBinaryProperties, ecma14BinaryPropertiesOfStrings, unicodeBinaryPropertiesOfStrings, unicodeGeneralCategoryValues, ecma9ScriptValues, ecma10ScriptValues, ecma11ScriptValues, ecma12ScriptValues, ecma13ScriptValues, ecma14ScriptValues, unicodeScriptValues, data, ecmaVersion, i, list, pp$1, RegExpValidationState, CharSetNone, CharSetOk, CharSetString, Token, pp, INVALID_TEMPLATE_ESCAPE_ERROR, version2, _acorn, ANONYMOUS_PLUGIN_PREFIX, ANONYMOUS_OUTPUT_PLUGIN_PREFIX, NO_CACHE, getOnLog, getDefaultOnLog, addLogToString, normalizeLog, getExtendedLogMessage, defaultPrintLog, treeshakePresets, generatedCodePresets, objectifyOption, objectifyOptionWithPresets, getOptionWithPreset, normalizePluginOption, RESOLVE_DEPENDENCIES, ModuleLoader, GlobalScope, emittedFileTypes, FileEmitter, inputHookNames, inputHooks, PluginDriver, Queue, Graph, handleBeforeExit, rejectByPluginDriver, leftCurlyBrace, space, keyword, FUNC_STATEMENT, FUNC_NULLABLE_ID, getAcorn, getAcornInjectPlugins, getCache, getIdMatcher, getInlineDynamicImports$1, getInput2, getManualChunks$1, getMaxParallelFileOps, getModuleContext, getPreserveModules$1, getTreeshake, getHasModuleSideEffects, INVALID_CHAR_REGEX, DRIVE_LETTER_REGEX, getFile, getFormat, getInlineDynamicImports, getPreserveModules, getPreferConst, getPreserveModulesRoot, getAmd, getAddon, getDir, getDynamicImportFunction, getEntryFileNames, getGeneratedCode, getIndent, ALLOWED_INTEROP_TYPES, getInterop, validateInterop, getManualChunks, getMinifyInternalExports, getNamespaceToStringTag, getSourcemapFileNames, getSourcemapBaseUrl, SortingFileType, env, argv, platform, isDisabled, isForced, isWindows, isDumbTerminal, isCompatibleTerminal, isCI, isColorSupported, replaceClose, clearBleed, filterEmpty, init, colors, createColors, bold, cyan, dim, gray, green, red, underline, yellow;
|
|
4828
4828
|
var init_node_entry = __esm({
|
|
4829
4829
|
"node_modules/rollup/dist/es/shared/node-entry.js"() {
|
|
4830
|
-
version$1 = "3.29.
|
|
4830
|
+
version$1 = "3.29.4";
|
|
4831
4831
|
comma = ",".charCodeAt(0);
|
|
4832
4832
|
semicolon = ";".charCodeAt(0);
|
|
4833
4833
|
chars$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
@@ -6036,15 +6036,15 @@ var init_node_entry = __esm({
|
|
|
6036
6036
|
[EntitiesKey]: { value: /* @__PURE__ */ new Set() }
|
|
6037
6037
|
});
|
|
6038
6038
|
}
|
|
6039
|
-
trackEntityAtPathAndGetIfTracked(
|
|
6040
|
-
const trackedEntities = this.getEntities(
|
|
6039
|
+
trackEntityAtPathAndGetIfTracked(path4, entity) {
|
|
6040
|
+
const trackedEntities = this.getEntities(path4);
|
|
6041
6041
|
if (trackedEntities.has(entity))
|
|
6042
6042
|
return true;
|
|
6043
6043
|
trackedEntities.add(entity);
|
|
6044
6044
|
return false;
|
|
6045
6045
|
}
|
|
6046
|
-
withTrackedEntityAtPath(
|
|
6047
|
-
const trackedEntities = this.getEntities(
|
|
6046
|
+
withTrackedEntityAtPath(path4, entity, onUntracked, returnIfTracked) {
|
|
6047
|
+
const trackedEntities = this.getEntities(path4);
|
|
6048
6048
|
if (trackedEntities.has(entity))
|
|
6049
6049
|
return returnIfTracked;
|
|
6050
6050
|
trackedEntities.add(entity);
|
|
@@ -6052,9 +6052,9 @@ var init_node_entry = __esm({
|
|
|
6052
6052
|
trackedEntities.delete(entity);
|
|
6053
6053
|
return result;
|
|
6054
6054
|
}
|
|
6055
|
-
getEntities(
|
|
6055
|
+
getEntities(path4) {
|
|
6056
6056
|
let currentPaths = this.entityPaths;
|
|
6057
|
-
for (const pathSegment of
|
|
6057
|
+
for (const pathSegment of path4) {
|
|
6058
6058
|
currentPaths = currentPaths[pathSegment] = currentPaths[pathSegment] || Object.create(null, { [EntitiesKey]: { value: /* @__PURE__ */ new Set() } });
|
|
6059
6059
|
}
|
|
6060
6060
|
return currentPaths[EntitiesKey];
|
|
@@ -6067,9 +6067,9 @@ var init_node_entry = __esm({
|
|
|
6067
6067
|
[EntitiesKey]: { value: /* @__PURE__ */ new Map() }
|
|
6068
6068
|
});
|
|
6069
6069
|
}
|
|
6070
|
-
trackEntityAtPathAndGetIfTracked(
|
|
6070
|
+
trackEntityAtPathAndGetIfTracked(path4, discriminator, entity) {
|
|
6071
6071
|
let currentPaths = this.entityPaths;
|
|
6072
|
-
for (const pathSegment of
|
|
6072
|
+
for (const pathSegment of path4) {
|
|
6073
6073
|
currentPaths = currentPaths[pathSegment] = currentPaths[pathSegment] || Object.create(null, { [EntitiesKey]: { value: /* @__PURE__ */ new Map() } });
|
|
6074
6074
|
}
|
|
6075
6075
|
const trackedEntities = getOrCreate(currentPaths[EntitiesKey], discriminator, getNewSet);
|
|
@@ -6179,8 +6179,8 @@ var init_node_entry = __esm({
|
|
|
6179
6179
|
const name = this.renderName || this.name;
|
|
6180
6180
|
return this.renderBaseName ? `${this.renderBaseName}${getPropertyAccess(name)}` : name;
|
|
6181
6181
|
}
|
|
6182
|
-
hasEffectsOnInteractionAtPath(
|
|
6183
|
-
return type !== INTERACTION_ACCESSED ||
|
|
6182
|
+
hasEffectsOnInteractionAtPath(path4, { type }, _context) {
|
|
6183
|
+
return type !== INTERACTION_ACCESSED || path4.length > 0;
|
|
6184
6184
|
}
|
|
6185
6185
|
/**
|
|
6186
6186
|
* Marks this variable as being part of the bundle, which is usually the case when one of
|
|
@@ -6211,8 +6211,8 @@ var init_node_entry = __esm({
|
|
|
6211
6211
|
this.module.suggestName(identifier.name);
|
|
6212
6212
|
}
|
|
6213
6213
|
}
|
|
6214
|
-
hasEffectsOnInteractionAtPath(
|
|
6215
|
-
return type !== INTERACTION_ACCESSED ||
|
|
6214
|
+
hasEffectsOnInteractionAtPath(path4, { type }) {
|
|
6215
|
+
return type !== INTERACTION_ACCESSED || path4.length > (this.isNamespace ? 1 : 0);
|
|
6216
6216
|
}
|
|
6217
6217
|
include() {
|
|
6218
6218
|
if (!this.included) {
|
|
@@ -6672,7 +6672,7 @@ var init_node_entry = __esm({
|
|
|
6672
6672
|
}
|
|
6673
6673
|
};
|
|
6674
6674
|
(function(exports) {
|
|
6675
|
-
const
|
|
6675
|
+
const path4 = require$$0$1;
|
|
6676
6676
|
const win322 = process.platform === "win32";
|
|
6677
6677
|
const {
|
|
6678
6678
|
REGEX_BACKSLASH,
|
|
@@ -6701,7 +6701,7 @@ var init_node_entry = __esm({
|
|
|
6701
6701
|
if (options && typeof options.windows === "boolean") {
|
|
6702
6702
|
return options.windows;
|
|
6703
6703
|
}
|
|
6704
|
-
return win322 === true ||
|
|
6704
|
+
return win322 === true || path4.sep === "\\";
|
|
6705
6705
|
};
|
|
6706
6706
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
6707
6707
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -8036,18 +8036,18 @@ var init_node_entry = __esm({
|
|
|
8036
8036
|
}
|
|
8037
8037
|
};
|
|
8038
8038
|
UNKNOWN_LITERAL_BOOLEAN = new class UnknownBoolean extends ExpressionEntity {
|
|
8039
|
-
getReturnExpressionWhenCalledAtPath(
|
|
8040
|
-
if (
|
|
8041
|
-
return getMemberReturnExpressionWhenCalled(literalBooleanMembers,
|
|
8039
|
+
getReturnExpressionWhenCalledAtPath(path4) {
|
|
8040
|
+
if (path4.length === 1) {
|
|
8041
|
+
return getMemberReturnExpressionWhenCalled(literalBooleanMembers, path4[0]);
|
|
8042
8042
|
}
|
|
8043
8043
|
return UNKNOWN_RETURN_EXPRESSION;
|
|
8044
8044
|
}
|
|
8045
|
-
hasEffectsOnInteractionAtPath(
|
|
8045
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
8046
8046
|
if (interaction.type === INTERACTION_ACCESSED) {
|
|
8047
|
-
return
|
|
8047
|
+
return path4.length > 1;
|
|
8048
8048
|
}
|
|
8049
|
-
if (interaction.type === INTERACTION_CALLED &&
|
|
8050
|
-
return hasMemberEffectWhenCalled(literalBooleanMembers,
|
|
8049
|
+
if (interaction.type === INTERACTION_CALLED && path4.length === 1) {
|
|
8050
|
+
return hasMemberEffectWhenCalled(literalBooleanMembers, path4[0], interaction, context);
|
|
8051
8051
|
}
|
|
8052
8052
|
return true;
|
|
8053
8053
|
}
|
|
@@ -8059,18 +8059,18 @@ var init_node_entry = __esm({
|
|
|
8059
8059
|
}
|
|
8060
8060
|
};
|
|
8061
8061
|
UNKNOWN_LITERAL_NUMBER = new class UnknownNumber extends ExpressionEntity {
|
|
8062
|
-
getReturnExpressionWhenCalledAtPath(
|
|
8063
|
-
if (
|
|
8064
|
-
return getMemberReturnExpressionWhenCalled(literalNumberMembers,
|
|
8062
|
+
getReturnExpressionWhenCalledAtPath(path4) {
|
|
8063
|
+
if (path4.length === 1) {
|
|
8064
|
+
return getMemberReturnExpressionWhenCalled(literalNumberMembers, path4[0]);
|
|
8065
8065
|
}
|
|
8066
8066
|
return UNKNOWN_RETURN_EXPRESSION;
|
|
8067
8067
|
}
|
|
8068
|
-
hasEffectsOnInteractionAtPath(
|
|
8068
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
8069
8069
|
if (interaction.type === INTERACTION_ACCESSED) {
|
|
8070
|
-
return
|
|
8070
|
+
return path4.length > 1;
|
|
8071
8071
|
}
|
|
8072
|
-
if (interaction.type === INTERACTION_CALLED &&
|
|
8073
|
-
return hasMemberEffectWhenCalled(literalNumberMembers,
|
|
8072
|
+
if (interaction.type === INTERACTION_CALLED && path4.length === 1) {
|
|
8073
|
+
return hasMemberEffectWhenCalled(literalNumberMembers, path4[0], interaction, context);
|
|
8074
8074
|
}
|
|
8075
8075
|
return true;
|
|
8076
8076
|
}
|
|
@@ -8082,18 +8082,18 @@ var init_node_entry = __esm({
|
|
|
8082
8082
|
}
|
|
8083
8083
|
};
|
|
8084
8084
|
UNKNOWN_LITERAL_STRING = new class UnknownString extends ExpressionEntity {
|
|
8085
|
-
getReturnExpressionWhenCalledAtPath(
|
|
8086
|
-
if (
|
|
8087
|
-
return getMemberReturnExpressionWhenCalled(literalStringMembers,
|
|
8085
|
+
getReturnExpressionWhenCalledAtPath(path4) {
|
|
8086
|
+
if (path4.length === 1) {
|
|
8087
|
+
return getMemberReturnExpressionWhenCalled(literalStringMembers, path4[0]);
|
|
8088
8088
|
}
|
|
8089
8089
|
return UNKNOWN_RETURN_EXPRESSION;
|
|
8090
8090
|
}
|
|
8091
|
-
hasEffectsOnInteractionAtPath(
|
|
8091
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
8092
8092
|
if (interaction.type === INTERACTION_ACCESSED) {
|
|
8093
|
-
return
|
|
8093
|
+
return path4.length > 1;
|
|
8094
8094
|
}
|
|
8095
|
-
if (interaction.type === INTERACTION_CALLED &&
|
|
8096
|
-
return hasMemberEffectWhenCalled(literalStringMembers,
|
|
8095
|
+
if (interaction.type === INTERACTION_CALLED && path4.length === 1) {
|
|
8096
|
+
return hasMemberEffectWhenCalled(literalStringMembers, path4[0], interaction, context);
|
|
8097
8097
|
}
|
|
8098
8098
|
return true;
|
|
8099
8099
|
}
|
|
@@ -8669,9 +8669,9 @@ var init_node_entry = __esm({
|
|
|
8669
8669
|
}
|
|
8670
8670
|
};
|
|
8671
8671
|
SpreadElement = class extends NodeBase {
|
|
8672
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
8673
|
-
if (
|
|
8674
|
-
this.argument.deoptimizeArgumentsOnInteractionAtPath(interaction, [UnknownKey, ...
|
|
8672
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
8673
|
+
if (path4.length > 0) {
|
|
8674
|
+
this.argument.deoptimizeArgumentsOnInteractionAtPath(interaction, [UnknownKey, ...path4], recursionTracker);
|
|
8675
8675
|
}
|
|
8676
8676
|
}
|
|
8677
8677
|
hasEffects(context) {
|
|
@@ -8691,13 +8691,13 @@ var init_node_entry = __esm({
|
|
|
8691
8691
|
super();
|
|
8692
8692
|
this.description = description;
|
|
8693
8693
|
}
|
|
8694
|
-
deoptimizeArgumentsOnInteractionAtPath({ args, type },
|
|
8695
|
-
if (type === INTERACTION_CALLED &&
|
|
8694
|
+
deoptimizeArgumentsOnInteractionAtPath({ args, type }, path4) {
|
|
8695
|
+
if (type === INTERACTION_CALLED && path4.length === 0 && this.description.mutatesSelfAsArray) {
|
|
8696
8696
|
args[0]?.deoptimizePath(UNKNOWN_INTEGER_PATH);
|
|
8697
8697
|
}
|
|
8698
8698
|
}
|
|
8699
|
-
getReturnExpressionWhenCalledAtPath(
|
|
8700
|
-
if (
|
|
8699
|
+
getReturnExpressionWhenCalledAtPath(path4, { args }) {
|
|
8700
|
+
if (path4.length > 0) {
|
|
8701
8701
|
return UNKNOWN_RETURN_EXPRESSION;
|
|
8702
8702
|
}
|
|
8703
8703
|
return [
|
|
@@ -8705,9 +8705,9 @@ var init_node_entry = __esm({
|
|
|
8705
8705
|
false
|
|
8706
8706
|
];
|
|
8707
8707
|
}
|
|
8708
|
-
hasEffectsOnInteractionAtPath(
|
|
8708
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
8709
8709
|
const { type } = interaction;
|
|
8710
|
-
if (
|
|
8710
|
+
if (path4.length > (type === INTERACTION_ACCESSED ? 1 : 0)) {
|
|
8711
8711
|
return true;
|
|
8712
8712
|
}
|
|
8713
8713
|
if (type === INTERACTION_CALLED) {
|
|
@@ -8811,15 +8811,15 @@ var init_node_entry = __esm({
|
|
|
8811
8811
|
this.prototypeExpression?.deoptimizePath([UnknownKey, UnknownKey]);
|
|
8812
8812
|
this.deoptimizeCachedEntities();
|
|
8813
8813
|
}
|
|
8814
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
8815
|
-
const [key, ...subPath] =
|
|
8814
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
8815
|
+
const [key, ...subPath] = path4;
|
|
8816
8816
|
const { args, type } = interaction;
|
|
8817
8817
|
if (this.hasLostTrack || // single paths that are deoptimized will not become getters or setters
|
|
8818
|
-
(type === INTERACTION_CALLED ||
|
|
8818
|
+
(type === INTERACTION_CALLED || path4.length > 1) && (this.hasUnknownDeoptimizedProperty || typeof key === "string" && this.deoptimizedPaths[key])) {
|
|
8819
8819
|
deoptimizeInteraction(interaction);
|
|
8820
8820
|
return;
|
|
8821
8821
|
}
|
|
8822
|
-
const [propertiesForExactMatchByKey, relevantPropertiesByKey, relevantUnmatchableProperties] = type === INTERACTION_CALLED ||
|
|
8822
|
+
const [propertiesForExactMatchByKey, relevantPropertiesByKey, relevantUnmatchableProperties] = type === INTERACTION_CALLED || path4.length > 1 ? [
|
|
8823
8823
|
this.propertiesAndGettersByKey,
|
|
8824
8824
|
this.propertiesAndGettersByKey,
|
|
8825
8825
|
this.unmatchablePropertiesAndGetters
|
|
@@ -8869,7 +8869,7 @@ var init_node_entry = __esm({
|
|
|
8869
8869
|
}
|
|
8870
8870
|
}
|
|
8871
8871
|
}
|
|
8872
|
-
this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
8872
|
+
this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
8873
8873
|
}
|
|
8874
8874
|
deoptimizeIntegerProperties() {
|
|
8875
8875
|
if (this.hasLostTrack || this.hasUnknownDeoptimizedProperty || this.hasUnknownDeoptimizedInteger) {
|
|
@@ -8886,12 +8886,12 @@ var init_node_entry = __esm({
|
|
|
8886
8886
|
this.deoptimizeCachedIntegerEntities();
|
|
8887
8887
|
}
|
|
8888
8888
|
// Assumption: If only a specific path is deoptimized, no accessors are created
|
|
8889
|
-
deoptimizePath(
|
|
8889
|
+
deoptimizePath(path4) {
|
|
8890
8890
|
if (this.hasLostTrack || this.immutable) {
|
|
8891
8891
|
return;
|
|
8892
8892
|
}
|
|
8893
|
-
const key =
|
|
8894
|
-
if (
|
|
8893
|
+
const key = path4[0];
|
|
8894
|
+
if (path4.length === 1) {
|
|
8895
8895
|
if (typeof key !== "string") {
|
|
8896
8896
|
if (key === UnknownInteger) {
|
|
8897
8897
|
return this.deoptimizeIntegerProperties();
|
|
@@ -8908,55 +8908,55 @@ var init_node_entry = __esm({
|
|
|
8908
8908
|
}
|
|
8909
8909
|
}
|
|
8910
8910
|
}
|
|
8911
|
-
const subPath =
|
|
8911
|
+
const subPath = path4.length === 1 ? UNKNOWN_PATH : path4.slice(1);
|
|
8912
8912
|
for (const property of typeof key === "string" ? [
|
|
8913
8913
|
...this.propertiesAndGettersByKey[key] || this.unmatchablePropertiesAndGetters,
|
|
8914
8914
|
...this.settersByKey[key] || this.unmatchableSetters
|
|
8915
8915
|
] : this.allProperties) {
|
|
8916
8916
|
property.deoptimizePath(subPath);
|
|
8917
8917
|
}
|
|
8918
|
-
this.prototypeExpression?.deoptimizePath(
|
|
8918
|
+
this.prototypeExpression?.deoptimizePath(path4.length === 1 ? [...path4, UnknownKey] : path4);
|
|
8919
8919
|
}
|
|
8920
|
-
getLiteralValueAtPath(
|
|
8921
|
-
if (
|
|
8920
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
8921
|
+
if (path4.length === 0) {
|
|
8922
8922
|
return UnknownTruthyValue;
|
|
8923
8923
|
}
|
|
8924
|
-
const key =
|
|
8924
|
+
const key = path4[0];
|
|
8925
8925
|
const expressionAtPath = this.getMemberExpressionAndTrackDeopt(key, origin);
|
|
8926
8926
|
if (expressionAtPath) {
|
|
8927
|
-
return expressionAtPath.getLiteralValueAtPath(
|
|
8927
|
+
return expressionAtPath.getLiteralValueAtPath(path4.slice(1), recursionTracker, origin);
|
|
8928
8928
|
}
|
|
8929
8929
|
if (this.prototypeExpression) {
|
|
8930
|
-
return this.prototypeExpression.getLiteralValueAtPath(
|
|
8930
|
+
return this.prototypeExpression.getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
8931
8931
|
}
|
|
8932
|
-
if (
|
|
8932
|
+
if (path4.length === 1) {
|
|
8933
8933
|
return void 0;
|
|
8934
8934
|
}
|
|
8935
8935
|
return UnknownValue;
|
|
8936
8936
|
}
|
|
8937
|
-
getReturnExpressionWhenCalledAtPath(
|
|
8938
|
-
if (
|
|
8937
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
8938
|
+
if (path4.length === 0) {
|
|
8939
8939
|
return UNKNOWN_RETURN_EXPRESSION;
|
|
8940
8940
|
}
|
|
8941
|
-
const [key, ...subPath] =
|
|
8941
|
+
const [key, ...subPath] = path4;
|
|
8942
8942
|
const expressionAtPath = this.getMemberExpressionAndTrackDeopt(key, origin);
|
|
8943
8943
|
if (expressionAtPath) {
|
|
8944
8944
|
return expressionAtPath.getReturnExpressionWhenCalledAtPath(subPath, interaction, recursionTracker, origin);
|
|
8945
8945
|
}
|
|
8946
8946
|
if (this.prototypeExpression) {
|
|
8947
|
-
return this.prototypeExpression.getReturnExpressionWhenCalledAtPath(
|
|
8947
|
+
return this.prototypeExpression.getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin);
|
|
8948
8948
|
}
|
|
8949
8949
|
return UNKNOWN_RETURN_EXPRESSION;
|
|
8950
8950
|
}
|
|
8951
|
-
hasEffectsOnInteractionAtPath(
|
|
8952
|
-
const [key, ...subPath] =
|
|
8951
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
8952
|
+
const [key, ...subPath] = path4;
|
|
8953
8953
|
if (subPath.length > 0 || interaction.type === INTERACTION_CALLED) {
|
|
8954
8954
|
const expressionAtPath = this.getMemberExpression(key);
|
|
8955
8955
|
if (expressionAtPath) {
|
|
8956
8956
|
return expressionAtPath.hasEffectsOnInteractionAtPath(subPath, interaction, context);
|
|
8957
8957
|
}
|
|
8958
8958
|
if (this.prototypeExpression) {
|
|
8959
|
-
return this.prototypeExpression.hasEffectsOnInteractionAtPath(
|
|
8959
|
+
return this.prototypeExpression.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
8960
8960
|
}
|
|
8961
8961
|
return true;
|
|
8962
8962
|
}
|
|
@@ -8990,7 +8990,7 @@ var init_node_entry = __esm({
|
|
|
8990
8990
|
}
|
|
8991
8991
|
}
|
|
8992
8992
|
if (this.prototypeExpression) {
|
|
8993
|
-
return this.prototypeExpression.hasEffectsOnInteractionAtPath(
|
|
8993
|
+
return this.prototypeExpression.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
8994
8994
|
}
|
|
8995
8995
|
return false;
|
|
8996
8996
|
}
|
|
@@ -9084,16 +9084,16 @@ var init_node_entry = __esm({
|
|
|
9084
9084
|
};
|
|
9085
9085
|
isInteger = (property) => typeof property === "string" && /^\d+$/.test(property);
|
|
9086
9086
|
OBJECT_PROTOTYPE_FALLBACK = new class ObjectPrototypeFallbackExpression extends ExpressionEntity {
|
|
9087
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
9088
|
-
if (interaction.type === INTERACTION_CALLED &&
|
|
9087
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4) {
|
|
9088
|
+
if (interaction.type === INTERACTION_CALLED && path4.length === 1 && !isInteger(path4[0])) {
|
|
9089
9089
|
deoptimizeInteraction(interaction);
|
|
9090
9090
|
}
|
|
9091
9091
|
}
|
|
9092
|
-
getLiteralValueAtPath(
|
|
9093
|
-
return
|
|
9092
|
+
getLiteralValueAtPath(path4) {
|
|
9093
|
+
return path4.length === 1 && isInteger(path4[0]) ? void 0 : UnknownValue;
|
|
9094
9094
|
}
|
|
9095
|
-
hasEffectsOnInteractionAtPath(
|
|
9096
|
-
return
|
|
9095
|
+
hasEffectsOnInteractionAtPath(path4, { type }) {
|
|
9096
|
+
return path4.length > 1 || type === INTERACTION_CALLED;
|
|
9097
9097
|
}
|
|
9098
9098
|
}();
|
|
9099
9099
|
OBJECT_PROTOTYPE = new ObjectEntity({
|
|
@@ -9240,20 +9240,20 @@ var init_node_entry = __esm({
|
|
|
9240
9240
|
super(...arguments);
|
|
9241
9241
|
this.objectEntity = null;
|
|
9242
9242
|
}
|
|
9243
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
9244
|
-
this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
9243
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
9244
|
+
this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
9245
9245
|
}
|
|
9246
|
-
deoptimizePath(
|
|
9247
|
-
this.getObjectEntity().deoptimizePath(
|
|
9246
|
+
deoptimizePath(path4) {
|
|
9247
|
+
this.getObjectEntity().deoptimizePath(path4);
|
|
9248
9248
|
}
|
|
9249
|
-
getLiteralValueAtPath(
|
|
9250
|
-
return this.getObjectEntity().getLiteralValueAtPath(
|
|
9249
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
9250
|
+
return this.getObjectEntity().getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
9251
9251
|
}
|
|
9252
|
-
getReturnExpressionWhenCalledAtPath(
|
|
9253
|
-
return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(
|
|
9252
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
9253
|
+
return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin);
|
|
9254
9254
|
}
|
|
9255
|
-
hasEffectsOnInteractionAtPath(
|
|
9256
|
-
return this.getObjectEntity().hasEffectsOnInteractionAtPath(
|
|
9255
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
9256
|
+
return this.getObjectEntity().hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
9257
9257
|
}
|
|
9258
9258
|
applyDeoptimizations() {
|
|
9259
9259
|
this.deoptimized = true;
|
|
@@ -9349,18 +9349,18 @@ var init_node_entry = __esm({
|
|
|
9349
9349
|
this.additionalInitializers = null;
|
|
9350
9350
|
}
|
|
9351
9351
|
}
|
|
9352
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
9352
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
9353
9353
|
if (this.isReassigned) {
|
|
9354
9354
|
deoptimizeInteraction(interaction);
|
|
9355
9355
|
return;
|
|
9356
9356
|
}
|
|
9357
|
-
recursionTracker.withTrackedEntityAtPath(
|
|
9357
|
+
recursionTracker.withTrackedEntityAtPath(path4, this.init, () => this.init.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker), void 0);
|
|
9358
9358
|
}
|
|
9359
|
-
deoptimizePath(
|
|
9360
|
-
if (this.isReassigned || this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(
|
|
9359
|
+
deoptimizePath(path4) {
|
|
9360
|
+
if (this.isReassigned || this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(path4, this)) {
|
|
9361
9361
|
return;
|
|
9362
9362
|
}
|
|
9363
|
-
if (
|
|
9363
|
+
if (path4.length === 0) {
|
|
9364
9364
|
if (!this.isReassigned) {
|
|
9365
9365
|
this.isReassigned = true;
|
|
9366
9366
|
const expressionsToBeDeoptimized = this.expressionsToBeDeoptimized;
|
|
@@ -9371,47 +9371,47 @@ var init_node_entry = __esm({
|
|
|
9371
9371
|
this.init.deoptimizePath(UNKNOWN_PATH);
|
|
9372
9372
|
}
|
|
9373
9373
|
} else {
|
|
9374
|
-
this.init.deoptimizePath(
|
|
9374
|
+
this.init.deoptimizePath(path4);
|
|
9375
9375
|
}
|
|
9376
9376
|
}
|
|
9377
|
-
getLiteralValueAtPath(
|
|
9377
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
9378
9378
|
if (this.isReassigned) {
|
|
9379
9379
|
return UnknownValue;
|
|
9380
9380
|
}
|
|
9381
|
-
return recursionTracker.withTrackedEntityAtPath(
|
|
9381
|
+
return recursionTracker.withTrackedEntityAtPath(path4, this.init, () => {
|
|
9382
9382
|
this.expressionsToBeDeoptimized.push(origin);
|
|
9383
|
-
return this.init.getLiteralValueAtPath(
|
|
9383
|
+
return this.init.getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
9384
9384
|
}, UnknownValue);
|
|
9385
9385
|
}
|
|
9386
|
-
getReturnExpressionWhenCalledAtPath(
|
|
9386
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
9387
9387
|
if (this.isReassigned) {
|
|
9388
9388
|
return UNKNOWN_RETURN_EXPRESSION;
|
|
9389
9389
|
}
|
|
9390
|
-
return recursionTracker.withTrackedEntityAtPath(
|
|
9390
|
+
return recursionTracker.withTrackedEntityAtPath(path4, this.init, () => {
|
|
9391
9391
|
this.expressionsToBeDeoptimized.push(origin);
|
|
9392
|
-
return this.init.getReturnExpressionWhenCalledAtPath(
|
|
9392
|
+
return this.init.getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin);
|
|
9393
9393
|
}, UNKNOWN_RETURN_EXPRESSION);
|
|
9394
9394
|
}
|
|
9395
|
-
hasEffectsOnInteractionAtPath(
|
|
9395
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
9396
9396
|
switch (interaction.type) {
|
|
9397
9397
|
case INTERACTION_ACCESSED: {
|
|
9398
9398
|
if (this.isReassigned)
|
|
9399
9399
|
return true;
|
|
9400
|
-
return !context.accessed.trackEntityAtPathAndGetIfTracked(
|
|
9400
|
+
return !context.accessed.trackEntityAtPathAndGetIfTracked(path4, this) && this.init.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
9401
9401
|
}
|
|
9402
9402
|
case INTERACTION_ASSIGNED: {
|
|
9403
9403
|
if (this.included)
|
|
9404
9404
|
return true;
|
|
9405
|
-
if (
|
|
9405
|
+
if (path4.length === 0)
|
|
9406
9406
|
return false;
|
|
9407
9407
|
if (this.isReassigned)
|
|
9408
9408
|
return true;
|
|
9409
|
-
return !context.assigned.trackEntityAtPathAndGetIfTracked(
|
|
9409
|
+
return !context.assigned.trackEntityAtPathAndGetIfTracked(path4, this) && this.init.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
9410
9410
|
}
|
|
9411
9411
|
case INTERACTION_CALLED: {
|
|
9412
9412
|
if (this.isReassigned)
|
|
9413
9413
|
return true;
|
|
9414
|
-
return !(interaction.withNew ? context.instantiated : context.called).trackEntityAtPathAndGetIfTracked(
|
|
9414
|
+
return !(interaction.withNew ? context.instantiated : context.called).trackEntityAtPathAndGetIfTracked(path4, interaction.args, this) && this.init.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
9415
9415
|
}
|
|
9416
9416
|
}
|
|
9417
9417
|
}
|
|
@@ -9496,39 +9496,39 @@ var init_node_entry = __esm({
|
|
|
9496
9496
|
for (const field of this.deoptimizedFields) {
|
|
9497
9497
|
entity.deoptimizePath([field]);
|
|
9498
9498
|
}
|
|
9499
|
-
for (const { interaction, path:
|
|
9500
|
-
entity.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
9499
|
+
for (const { interaction, path: path4 } of this.deoptimizationInteractions) {
|
|
9500
|
+
entity.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, SHARED_RECURSION_TRACKER);
|
|
9501
9501
|
}
|
|
9502
9502
|
}
|
|
9503
9503
|
}
|
|
9504
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
9505
|
-
if (
|
|
9504
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4) {
|
|
9505
|
+
if (path4.length >= 2 || this.entitiesToBeDeoptimized.has(UNKNOWN_EXPRESSION) || this.deoptimizationInteractions.length >= MAX_TRACKED_INTERACTIONS || path4.length === 1 && (this.deoptimizedFields.has(UnknownKey) || interaction.type === INTERACTION_CALLED && this.deoptimizedFields.has(path4[0]))) {
|
|
9506
9506
|
deoptimizeInteraction(interaction);
|
|
9507
9507
|
return;
|
|
9508
9508
|
}
|
|
9509
|
-
if (!this.deoptimizations.trackEntityAtPathAndGetIfTracked(
|
|
9509
|
+
if (!this.deoptimizations.trackEntityAtPathAndGetIfTracked(path4, interaction.args)) {
|
|
9510
9510
|
for (const entity of this.entitiesToBeDeoptimized) {
|
|
9511
|
-
entity.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
9511
|
+
entity.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, SHARED_RECURSION_TRACKER);
|
|
9512
9512
|
}
|
|
9513
9513
|
if (!this.entitiesToBeDeoptimized.has(UNKNOWN_EXPRESSION)) {
|
|
9514
9514
|
this.deoptimizationInteractions.push({
|
|
9515
9515
|
interaction,
|
|
9516
|
-
path:
|
|
9516
|
+
path: path4
|
|
9517
9517
|
});
|
|
9518
9518
|
}
|
|
9519
9519
|
}
|
|
9520
9520
|
}
|
|
9521
|
-
deoptimizePath(
|
|
9522
|
-
if (
|
|
9521
|
+
deoptimizePath(path4) {
|
|
9522
|
+
if (path4.length === 0 || this.deoptimizedFields.has(UnknownKey)) {
|
|
9523
9523
|
return;
|
|
9524
9524
|
}
|
|
9525
|
-
const key =
|
|
9525
|
+
const key = path4[0];
|
|
9526
9526
|
if (this.deoptimizedFields.has(key)) {
|
|
9527
9527
|
return;
|
|
9528
9528
|
}
|
|
9529
9529
|
this.deoptimizedFields.add(key);
|
|
9530
9530
|
for (const entity of this.entitiesToBeDeoptimized) {
|
|
9531
|
-
entity.deoptimizePath(
|
|
9531
|
+
entity.deoptimizePath([key]);
|
|
9532
9532
|
}
|
|
9533
9533
|
if (key === UnknownKey) {
|
|
9534
9534
|
this.deoptimizationInteractions = NO_INTERACTIONS;
|
|
@@ -9537,11 +9537,11 @@ var init_node_entry = __esm({
|
|
|
9537
9537
|
this.entitiesToBeDeoptimized = UNKNOWN_DEOPTIMIZED_ENTITY;
|
|
9538
9538
|
}
|
|
9539
9539
|
}
|
|
9540
|
-
getReturnExpressionWhenCalledAtPath(
|
|
9541
|
-
if (
|
|
9540
|
+
getReturnExpressionWhenCalledAtPath(path4) {
|
|
9541
|
+
if (path4.length === 0) {
|
|
9542
9542
|
this.deoptimizePath(UNKNOWN_PATH);
|
|
9543
|
-
} else if (!this.deoptimizedFields.has(
|
|
9544
|
-
this.deoptimizePath([
|
|
9543
|
+
} else if (!this.deoptimizedFields.has(path4[0])) {
|
|
9544
|
+
this.deoptimizePath([path4[0]]);
|
|
9545
9545
|
}
|
|
9546
9546
|
return UNKNOWN_RETURN_EXPRESSION;
|
|
9547
9547
|
}
|
|
@@ -10692,43 +10692,43 @@ var init_node_entry = __esm({
|
|
|
10692
10692
|
super(...arguments);
|
|
10693
10693
|
this.isReassigned = true;
|
|
10694
10694
|
}
|
|
10695
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
10695
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
10696
10696
|
switch (interaction.type) {
|
|
10697
10697
|
case INTERACTION_ACCESSED:
|
|
10698
10698
|
case INTERACTION_ASSIGNED: {
|
|
10699
|
-
if (!getGlobalAtPath([this.name, ...
|
|
10700
|
-
super.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
10699
|
+
if (!getGlobalAtPath([this.name, ...path4].slice(0, -1))) {
|
|
10700
|
+
super.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
10701
10701
|
}
|
|
10702
10702
|
return;
|
|
10703
10703
|
}
|
|
10704
10704
|
case INTERACTION_CALLED: {
|
|
10705
|
-
const globalAtPath = getGlobalAtPath([this.name, ...
|
|
10705
|
+
const globalAtPath = getGlobalAtPath([this.name, ...path4]);
|
|
10706
10706
|
if (globalAtPath) {
|
|
10707
10707
|
globalAtPath.deoptimizeArgumentsOnCall(interaction);
|
|
10708
10708
|
} else {
|
|
10709
|
-
super.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
10709
|
+
super.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
10710
10710
|
}
|
|
10711
10711
|
return;
|
|
10712
10712
|
}
|
|
10713
10713
|
}
|
|
10714
10714
|
}
|
|
10715
|
-
getLiteralValueAtPath(
|
|
10716
|
-
const globalAtPath = getGlobalAtPath([this.name, ...
|
|
10715
|
+
getLiteralValueAtPath(path4, _recursionTracker, _origin) {
|
|
10716
|
+
const globalAtPath = getGlobalAtPath([this.name, ...path4]);
|
|
10717
10717
|
return globalAtPath ? globalAtPath.getLiteralValue() : UnknownValue;
|
|
10718
10718
|
}
|
|
10719
|
-
hasEffectsOnInteractionAtPath(
|
|
10719
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
10720
10720
|
switch (interaction.type) {
|
|
10721
10721
|
case INTERACTION_ACCESSED: {
|
|
10722
|
-
if (
|
|
10722
|
+
if (path4.length === 0) {
|
|
10723
10723
|
return this.name !== "undefined" && !getGlobalAtPath([this.name]);
|
|
10724
10724
|
}
|
|
10725
|
-
return !getGlobalAtPath([this.name, ...
|
|
10725
|
+
return !getGlobalAtPath([this.name, ...path4].slice(0, -1));
|
|
10726
10726
|
}
|
|
10727
10727
|
case INTERACTION_ASSIGNED: {
|
|
10728
10728
|
return true;
|
|
10729
10729
|
}
|
|
10730
10730
|
case INTERACTION_CALLED: {
|
|
10731
|
-
const globalAtPath = getGlobalAtPath([this.name, ...
|
|
10731
|
+
const globalAtPath = getGlobalAtPath([this.name, ...path4]);
|
|
10732
10732
|
return !globalAtPath || globalAtPath.hasEffectsWhenCalled(interaction, context);
|
|
10733
10733
|
}
|
|
10734
10734
|
}
|
|
@@ -10790,21 +10790,21 @@ var init_node_entry = __esm({
|
|
|
10790
10790
|
variable.kind = kind;
|
|
10791
10791
|
return [this.variable = variable];
|
|
10792
10792
|
}
|
|
10793
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
10794
|
-
this.variable.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
10793
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
10794
|
+
this.variable.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
10795
10795
|
}
|
|
10796
|
-
deoptimizePath(
|
|
10797
|
-
if (
|
|
10796
|
+
deoptimizePath(path4) {
|
|
10797
|
+
if (path4.length === 0 && !this.scope.contains(this.name)) {
|
|
10798
10798
|
this.disallowImportReassignment();
|
|
10799
10799
|
}
|
|
10800
|
-
this.variable?.deoptimizePath(
|
|
10800
|
+
this.variable?.deoptimizePath(path4);
|
|
10801
10801
|
}
|
|
10802
|
-
getLiteralValueAtPath(
|
|
10803
|
-
return this.getVariableRespectingTDZ().getLiteralValueAtPath(
|
|
10802
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
10803
|
+
return this.getVariableRespectingTDZ().getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
10804
10804
|
}
|
|
10805
|
-
getReturnExpressionWhenCalledAtPath(
|
|
10806
|
-
const [expression, isPure] = this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(
|
|
10807
|
-
return [expression, isPure || this.isPureFunction(
|
|
10805
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
10806
|
+
const [expression, isPure] = this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin);
|
|
10807
|
+
return [expression, isPure || this.isPureFunction(path4)];
|
|
10808
10808
|
}
|
|
10809
10809
|
hasEffects(context) {
|
|
10810
10810
|
if (!this.deoptimized)
|
|
@@ -10814,16 +10814,16 @@ var init_node_entry = __esm({
|
|
|
10814
10814
|
}
|
|
10815
10815
|
return this.context.options.treeshake.unknownGlobalSideEffects && this.variable instanceof GlobalVariable && !this.isPureFunction(EMPTY_PATH) && this.variable.hasEffectsOnInteractionAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_ACCESS, context);
|
|
10816
10816
|
}
|
|
10817
|
-
hasEffectsOnInteractionAtPath(
|
|
10817
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
10818
10818
|
switch (interaction.type) {
|
|
10819
10819
|
case INTERACTION_ACCESSED: {
|
|
10820
|
-
return this.variable !== null && !this.isPureFunction(
|
|
10820
|
+
return this.variable !== null && !this.isPureFunction(path4) && this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
10821
10821
|
}
|
|
10822
10822
|
case INTERACTION_ASSIGNED: {
|
|
10823
|
-
return (
|
|
10823
|
+
return (path4.length > 0 ? this.getVariableRespectingTDZ() : this.variable).hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
10824
10824
|
}
|
|
10825
10825
|
case INTERACTION_CALLED: {
|
|
10826
|
-
return !this.isPureFunction(
|
|
10826
|
+
return !this.isPureFunction(path4) && this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
10827
10827
|
}
|
|
10828
10828
|
}
|
|
10829
10829
|
}
|
|
@@ -10893,9 +10893,9 @@ var init_node_entry = __esm({
|
|
|
10893
10893
|
}
|
|
10894
10894
|
return this.variable;
|
|
10895
10895
|
}
|
|
10896
|
-
isPureFunction(
|
|
10896
|
+
isPureFunction(path4) {
|
|
10897
10897
|
let currentPureFunction = this.context.manualPureFunctions[this.name];
|
|
10898
|
-
for (const segment of
|
|
10898
|
+
for (const segment of path4) {
|
|
10899
10899
|
if (currentPureFunction) {
|
|
10900
10900
|
if (currentPureFunction[PureFunctionKey]) {
|
|
10901
10901
|
return true;
|
|
@@ -11006,11 +11006,11 @@ var init_node_entry = __esm({
|
|
|
11006
11006
|
this.declarationInit = init2;
|
|
11007
11007
|
return this.argument.declare(kind, UNKNOWN_EXPRESSION);
|
|
11008
11008
|
}
|
|
11009
|
-
deoptimizePath(
|
|
11010
|
-
|
|
11009
|
+
deoptimizePath(path4) {
|
|
11010
|
+
path4.length === 0 && this.argument.deoptimizePath(EMPTY_PATH);
|
|
11011
11011
|
}
|
|
11012
|
-
hasEffectsOnInteractionAtPath(
|
|
11013
|
-
return
|
|
11012
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
11013
|
+
return path4.length > 0 || this.argument.hasEffectsOnInteractionAtPath(EMPTY_PATH, interaction, context);
|
|
11014
11014
|
}
|
|
11015
11015
|
markDeclarationReached() {
|
|
11016
11016
|
this.argument.markDeclarationReached();
|
|
@@ -11029,7 +11029,7 @@ var init_node_entry = __esm({
|
|
|
11029
11029
|
this.objectEntity = null;
|
|
11030
11030
|
this.deoptimizedReturn = false;
|
|
11031
11031
|
}
|
|
11032
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
11032
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
11033
11033
|
if (interaction.type === INTERACTION_CALLED) {
|
|
11034
11034
|
const { parameters } = this.scope;
|
|
11035
11035
|
const { args } = interaction;
|
|
@@ -11050,21 +11050,26 @@ var init_node_entry = __esm({
|
|
|
11050
11050
|
}
|
|
11051
11051
|
}
|
|
11052
11052
|
} else {
|
|
11053
|
-
this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
11053
|
+
this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
11054
11054
|
}
|
|
11055
11055
|
}
|
|
11056
|
-
deoptimizePath(
|
|
11057
|
-
this.getObjectEntity().deoptimizePath(
|
|
11058
|
-
if (
|
|
11056
|
+
deoptimizePath(path4) {
|
|
11057
|
+
this.getObjectEntity().deoptimizePath(path4);
|
|
11058
|
+
if (path4.length === 1 && path4[0] === UnknownKey) {
|
|
11059
11059
|
this.scope.getReturnExpression().deoptimizePath(UNKNOWN_PATH);
|
|
11060
|
+
for (const parameterList of this.scope.parameters) {
|
|
11061
|
+
for (const parameter of parameterList) {
|
|
11062
|
+
parameter.deoptimizePath(UNKNOWN_PATH);
|
|
11063
|
+
}
|
|
11064
|
+
}
|
|
11060
11065
|
}
|
|
11061
11066
|
}
|
|
11062
|
-
getLiteralValueAtPath(
|
|
11063
|
-
return this.getObjectEntity().getLiteralValueAtPath(
|
|
11067
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
11068
|
+
return this.getObjectEntity().getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
11064
11069
|
}
|
|
11065
|
-
getReturnExpressionWhenCalledAtPath(
|
|
11066
|
-
if (
|
|
11067
|
-
return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(
|
|
11070
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
11071
|
+
if (path4.length > 0) {
|
|
11072
|
+
return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin);
|
|
11068
11073
|
}
|
|
11069
11074
|
if (this.async) {
|
|
11070
11075
|
if (!this.deoptimizedReturn) {
|
|
@@ -11076,9 +11081,9 @@ var init_node_entry = __esm({
|
|
|
11076
11081
|
}
|
|
11077
11082
|
return [this.scope.getReturnExpression(), false];
|
|
11078
11083
|
}
|
|
11079
|
-
hasEffectsOnInteractionAtPath(
|
|
11080
|
-
if (
|
|
11081
|
-
return this.getObjectEntity().hasEffectsOnInteractionAtPath(
|
|
11084
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
11085
|
+
if (path4.length > 0 || interaction.type !== INTERACTION_CALLED) {
|
|
11086
|
+
return this.getObjectEntity().hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
11082
11087
|
}
|
|
11083
11088
|
if (this.annotationNoSideEffects) {
|
|
11084
11089
|
return false;
|
|
@@ -11141,8 +11146,8 @@ var init_node_entry = __esm({
|
|
|
11141
11146
|
this.applyDeoptimizations();
|
|
11142
11147
|
return false;
|
|
11143
11148
|
}
|
|
11144
|
-
hasEffectsOnInteractionAtPath(
|
|
11145
|
-
if (super.hasEffectsOnInteractionAtPath(
|
|
11149
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
11150
|
+
if (super.hasEffectsOnInteractionAtPath(path4, interaction, context)) {
|
|
11146
11151
|
return true;
|
|
11147
11152
|
}
|
|
11148
11153
|
if (this.annotationNoSideEffects) {
|
|
@@ -11196,10 +11201,10 @@ var init_node_entry = __esm({
|
|
|
11196
11201
|
}
|
|
11197
11202
|
return variables;
|
|
11198
11203
|
}
|
|
11199
|
-
deoptimizePath(
|
|
11200
|
-
if (
|
|
11204
|
+
deoptimizePath(path4) {
|
|
11205
|
+
if (path4.length === 0) {
|
|
11201
11206
|
for (const property of this.properties) {
|
|
11202
|
-
property.deoptimizePath(
|
|
11207
|
+
property.deoptimizePath(path4);
|
|
11203
11208
|
}
|
|
11204
11209
|
}
|
|
11205
11210
|
}
|
|
@@ -11223,8 +11228,8 @@ var init_node_entry = __esm({
|
|
|
11223
11228
|
this.applyDeoptimizations();
|
|
11224
11229
|
return right.hasEffects(context) || left.hasEffectsAsAssignmentTarget(context, operator !== "=");
|
|
11225
11230
|
}
|
|
11226
|
-
hasEffectsOnInteractionAtPath(
|
|
11227
|
-
return this.right.hasEffectsOnInteractionAtPath(
|
|
11231
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
11232
|
+
return this.right.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
11228
11233
|
}
|
|
11229
11234
|
include(context, includeChildrenRecursively) {
|
|
11230
11235
|
const { deoptimized, left, right, operator } = this;
|
|
@@ -11295,11 +11300,11 @@ var init_node_entry = __esm({
|
|
|
11295
11300
|
declare(kind, init2) {
|
|
11296
11301
|
return this.left.declare(kind, init2);
|
|
11297
11302
|
}
|
|
11298
|
-
deoptimizePath(
|
|
11299
|
-
|
|
11303
|
+
deoptimizePath(path4) {
|
|
11304
|
+
path4.length === 0 && this.left.deoptimizePath(path4);
|
|
11300
11305
|
}
|
|
11301
|
-
hasEffectsOnInteractionAtPath(
|
|
11302
|
-
return
|
|
11306
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
11307
|
+
return path4.length > 0 || this.left.hasEffectsOnInteractionAtPath(EMPTY_PATH, interaction, context);
|
|
11303
11308
|
}
|
|
11304
11309
|
markDeclarationReached() {
|
|
11305
11310
|
this.left.markDeclarationReached();
|
|
@@ -11327,8 +11332,8 @@ var init_node_entry = __esm({
|
|
|
11327
11332
|
this.deoptimizedArguments.push(argument);
|
|
11328
11333
|
}
|
|
11329
11334
|
}
|
|
11330
|
-
hasEffectsOnInteractionAtPath(
|
|
11331
|
-
return type !== INTERACTION_ACCESSED ||
|
|
11335
|
+
hasEffectsOnInteractionAtPath(path4, { type }) {
|
|
11336
|
+
return type !== INTERACTION_ACCESSED || path4.length > 1;
|
|
11332
11337
|
}
|
|
11333
11338
|
include() {
|
|
11334
11339
|
super.include();
|
|
@@ -11342,8 +11347,8 @@ var init_node_entry = __esm({
|
|
|
11342
11347
|
constructor(context) {
|
|
11343
11348
|
super("this", null, context);
|
|
11344
11349
|
}
|
|
11345
|
-
hasEffectsOnInteractionAtPath(
|
|
11346
|
-
return (context.replacedVariableInits.get(this) || UNKNOWN_EXPRESSION).hasEffectsOnInteractionAtPath(
|
|
11350
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
11351
|
+
return (context.replacedVariableInits.get(this) || UNKNOWN_EXPRESSION).hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
11347
11352
|
}
|
|
11348
11353
|
};
|
|
11349
11354
|
FunctionScope = class extends ReturnValueScope {
|
|
@@ -11376,9 +11381,9 @@ var init_node_entry = __esm({
|
|
|
11376
11381
|
this.constructedEntity = new ObjectEntity(/* @__PURE__ */ Object.create(null), OBJECT_PROTOTYPE);
|
|
11377
11382
|
this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity);
|
|
11378
11383
|
}
|
|
11379
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
11380
|
-
super.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
11381
|
-
if (interaction.type === INTERACTION_CALLED &&
|
|
11384
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
11385
|
+
super.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
11386
|
+
if (interaction.type === INTERACTION_CALLED && path4.length === 0 && interaction.args[0]) {
|
|
11382
11387
|
this.scope.thisVariable.addEntityToBeDeoptimized(interaction.args[0]);
|
|
11383
11388
|
}
|
|
11384
11389
|
}
|
|
@@ -11390,8 +11395,8 @@ var init_node_entry = __esm({
|
|
|
11390
11395
|
}
|
|
11391
11396
|
return !!this.id?.hasEffects(context);
|
|
11392
11397
|
}
|
|
11393
|
-
hasEffectsOnInteractionAtPath(
|
|
11394
|
-
if (super.hasEffectsOnInteractionAtPath(
|
|
11398
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
11399
|
+
if (super.hasEffectsOnInteractionAtPath(path4, interaction, context))
|
|
11395
11400
|
return true;
|
|
11396
11401
|
if (this.annotationNoSideEffects) {
|
|
11397
11402
|
return false;
|
|
@@ -11502,8 +11507,8 @@ var init_node_entry = __esm({
|
|
|
11502
11507
|
BinaryExpression = class extends NodeBase {
|
|
11503
11508
|
deoptimizeCache() {
|
|
11504
11509
|
}
|
|
11505
|
-
getLiteralValueAtPath(
|
|
11506
|
-
if (
|
|
11510
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
11511
|
+
if (path4.length > 0)
|
|
11507
11512
|
return UnknownValue;
|
|
11508
11513
|
const leftValue = this.left.getLiteralValueAtPath(EMPTY_PATH, recursionTracker, origin);
|
|
11509
11514
|
if (typeof leftValue === "symbol")
|
|
@@ -11522,8 +11527,8 @@ var init_node_entry = __esm({
|
|
|
11522
11527
|
}
|
|
11523
11528
|
return super.hasEffects(context);
|
|
11524
11529
|
}
|
|
11525
|
-
hasEffectsOnInteractionAtPath(
|
|
11526
|
-
return type !== INTERACTION_ACCESSED ||
|
|
11530
|
+
hasEffectsOnInteractionAtPath(path4, { type }) {
|
|
11531
|
+
return type !== INTERACTION_ACCESSED || path4.length > 1;
|
|
11527
11532
|
}
|
|
11528
11533
|
render(code, options, { renderedSurroundingElement } = BLANK) {
|
|
11529
11534
|
this.left.render(code, options, { renderedSurroundingElement });
|
|
@@ -11558,23 +11563,23 @@ var init_node_entry = __esm({
|
|
|
11558
11563
|
Literal = class extends NodeBase {
|
|
11559
11564
|
deoptimizeArgumentsOnInteractionAtPath() {
|
|
11560
11565
|
}
|
|
11561
|
-
getLiteralValueAtPath(
|
|
11562
|
-
if (
|
|
11566
|
+
getLiteralValueAtPath(path4) {
|
|
11567
|
+
if (path4.length > 0 || // unknown literals can also be null but do not start with an "n"
|
|
11563
11568
|
this.value === null && this.context.code.charCodeAt(this.start) !== 110 || typeof this.value === "bigint" || // to support shims for regular expressions
|
|
11564
11569
|
this.context.code.charCodeAt(this.start) === 47) {
|
|
11565
11570
|
return UnknownValue;
|
|
11566
11571
|
}
|
|
11567
11572
|
return this.value;
|
|
11568
11573
|
}
|
|
11569
|
-
getReturnExpressionWhenCalledAtPath(
|
|
11570
|
-
if (
|
|
11574
|
+
getReturnExpressionWhenCalledAtPath(path4) {
|
|
11575
|
+
if (path4.length !== 1)
|
|
11571
11576
|
return UNKNOWN_RETURN_EXPRESSION;
|
|
11572
|
-
return getMemberReturnExpressionWhenCalled(this.members,
|
|
11577
|
+
return getMemberReturnExpressionWhenCalled(this.members, path4[0]);
|
|
11573
11578
|
}
|
|
11574
|
-
hasEffectsOnInteractionAtPath(
|
|
11579
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
11575
11580
|
switch (interaction.type) {
|
|
11576
11581
|
case INTERACTION_ACCESSED: {
|
|
11577
|
-
return
|
|
11582
|
+
return path4.length > (this.value === null ? 0 : 1);
|
|
11578
11583
|
}
|
|
11579
11584
|
case INTERACTION_ASSIGNED: {
|
|
11580
11585
|
return true;
|
|
@@ -11583,7 +11588,7 @@ var init_node_entry = __esm({
|
|
|
11583
11588
|
if (this.included && this.value instanceof RegExp && (this.value.global || this.value.sticky)) {
|
|
11584
11589
|
return true;
|
|
11585
11590
|
}
|
|
11586
|
-
return
|
|
11591
|
+
return path4.length !== 1 || hasMemberEffectWhenCalled(this.members, path4[0], interaction, context);
|
|
11587
11592
|
}
|
|
11588
11593
|
}
|
|
11589
11594
|
}
|
|
@@ -11613,28 +11618,28 @@ var init_node_entry = __esm({
|
|
|
11613
11618
|
}
|
|
11614
11619
|
bind() {
|
|
11615
11620
|
this.bound = true;
|
|
11616
|
-
const
|
|
11617
|
-
const baseVariable =
|
|
11621
|
+
const path4 = getPathIfNotComputed(this);
|
|
11622
|
+
const baseVariable = path4 && this.scope.findVariable(path4[0].key);
|
|
11618
11623
|
if (baseVariable?.isNamespace) {
|
|
11619
|
-
const resolvedVariable = resolveNamespaceVariables(baseVariable,
|
|
11624
|
+
const resolvedVariable = resolveNamespaceVariables(baseVariable, path4.slice(1), this.context);
|
|
11620
11625
|
if (!resolvedVariable) {
|
|
11621
11626
|
super.bind();
|
|
11622
11627
|
} else if (resolvedVariable === "undefined") {
|
|
11623
11628
|
this.isUndefined = true;
|
|
11624
11629
|
} else {
|
|
11625
11630
|
this.variable = resolvedVariable;
|
|
11626
|
-
this.scope.addNamespaceMemberAccess(getStringFromPath(
|
|
11631
|
+
this.scope.addNamespaceMemberAccess(getStringFromPath(path4), resolvedVariable);
|
|
11627
11632
|
}
|
|
11628
11633
|
} else {
|
|
11629
11634
|
super.bind();
|
|
11630
11635
|
}
|
|
11631
11636
|
}
|
|
11632
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
11637
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
11633
11638
|
if (this.variable) {
|
|
11634
|
-
this.variable.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
11639
|
+
this.variable.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
11635
11640
|
} else if (!this.isUndefined) {
|
|
11636
|
-
if (
|
|
11637
|
-
this.object.deoptimizeArgumentsOnInteractionAtPath(interaction, [this.getPropertyKey(), ...
|
|
11641
|
+
if (path4.length < MAX_PATH_DEPTH) {
|
|
11642
|
+
this.object.deoptimizeArgumentsOnInteractionAtPath(interaction, [this.getPropertyKey(), ...path4], recursionTracker);
|
|
11638
11643
|
} else {
|
|
11639
11644
|
deoptimizeInteraction(interaction);
|
|
11640
11645
|
}
|
|
@@ -11649,42 +11654,42 @@ var init_node_entry = __esm({
|
|
|
11649
11654
|
expression.deoptimizeCache();
|
|
11650
11655
|
}
|
|
11651
11656
|
}
|
|
11652
|
-
deoptimizePath(
|
|
11653
|
-
if (
|
|
11657
|
+
deoptimizePath(path4) {
|
|
11658
|
+
if (path4.length === 0)
|
|
11654
11659
|
this.disallowNamespaceReassignment();
|
|
11655
11660
|
if (this.variable) {
|
|
11656
|
-
this.variable.deoptimizePath(
|
|
11657
|
-
} else if (!this.isUndefined &&
|
|
11661
|
+
this.variable.deoptimizePath(path4);
|
|
11662
|
+
} else if (!this.isUndefined && path4.length < MAX_PATH_DEPTH) {
|
|
11658
11663
|
const propertyKey = this.getPropertyKey();
|
|
11659
11664
|
this.object.deoptimizePath([
|
|
11660
11665
|
propertyKey === UnknownKey ? UnknownNonAccessorKey : propertyKey,
|
|
11661
|
-
...
|
|
11666
|
+
...path4
|
|
11662
11667
|
]);
|
|
11663
11668
|
}
|
|
11664
11669
|
}
|
|
11665
|
-
getLiteralValueAtPath(
|
|
11670
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
11666
11671
|
if (this.variable) {
|
|
11667
|
-
return this.variable.getLiteralValueAtPath(
|
|
11672
|
+
return this.variable.getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
11668
11673
|
}
|
|
11669
11674
|
if (this.isUndefined) {
|
|
11670
11675
|
return void 0;
|
|
11671
11676
|
}
|
|
11672
|
-
if (this.propertyKey !== UnknownKey &&
|
|
11677
|
+
if (this.propertyKey !== UnknownKey && path4.length < MAX_PATH_DEPTH) {
|
|
11673
11678
|
this.expressionsToBeDeoptimized.push(origin);
|
|
11674
|
-
return this.object.getLiteralValueAtPath([this.getPropertyKey(), ...
|
|
11679
|
+
return this.object.getLiteralValueAtPath([this.getPropertyKey(), ...path4], recursionTracker, origin);
|
|
11675
11680
|
}
|
|
11676
11681
|
return UnknownValue;
|
|
11677
11682
|
}
|
|
11678
|
-
getReturnExpressionWhenCalledAtPath(
|
|
11683
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
11679
11684
|
if (this.variable) {
|
|
11680
|
-
return this.variable.getReturnExpressionWhenCalledAtPath(
|
|
11685
|
+
return this.variable.getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin);
|
|
11681
11686
|
}
|
|
11682
11687
|
if (this.isUndefined) {
|
|
11683
11688
|
return [UNDEFINED_EXPRESSION, false];
|
|
11684
11689
|
}
|
|
11685
|
-
if (this.propertyKey !== UnknownKey &&
|
|
11690
|
+
if (this.propertyKey !== UnknownKey && path4.length < MAX_PATH_DEPTH) {
|
|
11686
11691
|
this.expressionsToBeDeoptimized.push(origin);
|
|
11687
|
-
return this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(), ...
|
|
11692
|
+
return this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(), ...path4], interaction, recursionTracker, origin);
|
|
11688
11693
|
}
|
|
11689
11694
|
return UNKNOWN_RETURN_EXPRESSION;
|
|
11690
11695
|
}
|
|
@@ -11700,15 +11705,15 @@ var init_node_entry = __esm({
|
|
|
11700
11705
|
this.applyAssignmentDeoptimization();
|
|
11701
11706
|
return this.property.hasEffects(context) || this.object.hasEffects(context) || checkAccess && this.hasAccessEffect(context) || this.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.assignmentInteraction, context);
|
|
11702
11707
|
}
|
|
11703
|
-
hasEffectsOnInteractionAtPath(
|
|
11708
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
11704
11709
|
if (this.variable) {
|
|
11705
|
-
return this.variable.hasEffectsOnInteractionAtPath(
|
|
11710
|
+
return this.variable.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
11706
11711
|
}
|
|
11707
11712
|
if (this.isUndefined) {
|
|
11708
11713
|
return true;
|
|
11709
11714
|
}
|
|
11710
|
-
if (
|
|
11711
|
-
return this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey(), ...
|
|
11715
|
+
if (path4.length < MAX_PATH_DEPTH) {
|
|
11716
|
+
return this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey(), ...path4], interaction, context);
|
|
11712
11717
|
}
|
|
11713
11718
|
return true;
|
|
11714
11719
|
}
|
|
@@ -11828,7 +11833,7 @@ var init_node_entry = __esm({
|
|
|
11828
11833
|
this.deoptimizableDependentExpressions = [];
|
|
11829
11834
|
this.expressionsToBeDeoptimized = /* @__PURE__ */ new Set();
|
|
11830
11835
|
}
|
|
11831
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
11836
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
11832
11837
|
const { args } = interaction;
|
|
11833
11838
|
const [returnExpression, isPure] = this.getReturnExpression(recursionTracker);
|
|
11834
11839
|
if (isPure)
|
|
@@ -11841,11 +11846,11 @@ var init_node_entry = __esm({
|
|
|
11841
11846
|
expression.deoptimizePath(UNKNOWN_PATH);
|
|
11842
11847
|
}
|
|
11843
11848
|
} else {
|
|
11844
|
-
recursionTracker.withTrackedEntityAtPath(
|
|
11849
|
+
recursionTracker.withTrackedEntityAtPath(path4, returnExpression, () => {
|
|
11845
11850
|
for (const expression of deoptimizedExpressions) {
|
|
11846
11851
|
this.expressionsToBeDeoptimized.add(expression);
|
|
11847
11852
|
}
|
|
11848
|
-
returnExpression.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
11853
|
+
returnExpression.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
11849
11854
|
}, null);
|
|
11850
11855
|
}
|
|
11851
11856
|
}
|
|
@@ -11863,48 +11868,48 @@ var init_node_entry = __esm({
|
|
|
11863
11868
|
}
|
|
11864
11869
|
}
|
|
11865
11870
|
}
|
|
11866
|
-
deoptimizePath(
|
|
11867
|
-
if (
|
|
11871
|
+
deoptimizePath(path4) {
|
|
11872
|
+
if (path4.length === 0 || this.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(path4, this)) {
|
|
11868
11873
|
return;
|
|
11869
11874
|
}
|
|
11870
11875
|
const [returnExpression] = this.getReturnExpression();
|
|
11871
11876
|
if (returnExpression !== UNKNOWN_EXPRESSION) {
|
|
11872
|
-
returnExpression.deoptimizePath(
|
|
11877
|
+
returnExpression.deoptimizePath(path4);
|
|
11873
11878
|
}
|
|
11874
11879
|
}
|
|
11875
|
-
getLiteralValueAtPath(
|
|
11880
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
11876
11881
|
const [returnExpression] = this.getReturnExpression(recursionTracker);
|
|
11877
11882
|
if (returnExpression === UNKNOWN_EXPRESSION) {
|
|
11878
11883
|
return UnknownValue;
|
|
11879
11884
|
}
|
|
11880
|
-
return recursionTracker.withTrackedEntityAtPath(
|
|
11885
|
+
return recursionTracker.withTrackedEntityAtPath(path4, returnExpression, () => {
|
|
11881
11886
|
this.deoptimizableDependentExpressions.push(origin);
|
|
11882
|
-
return returnExpression.getLiteralValueAtPath(
|
|
11887
|
+
return returnExpression.getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
11883
11888
|
}, UnknownValue);
|
|
11884
11889
|
}
|
|
11885
|
-
getReturnExpressionWhenCalledAtPath(
|
|
11890
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
11886
11891
|
const returnExpression = this.getReturnExpression(recursionTracker);
|
|
11887
11892
|
if (returnExpression[0] === UNKNOWN_EXPRESSION) {
|
|
11888
11893
|
return returnExpression;
|
|
11889
11894
|
}
|
|
11890
|
-
return recursionTracker.withTrackedEntityAtPath(
|
|
11895
|
+
return recursionTracker.withTrackedEntityAtPath(path4, returnExpression, () => {
|
|
11891
11896
|
this.deoptimizableDependentExpressions.push(origin);
|
|
11892
|
-
const [expression, isPure] = returnExpression[0].getReturnExpressionWhenCalledAtPath(
|
|
11897
|
+
const [expression, isPure] = returnExpression[0].getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin);
|
|
11893
11898
|
return [expression, isPure || returnExpression[1]];
|
|
11894
11899
|
}, UNKNOWN_RETURN_EXPRESSION);
|
|
11895
11900
|
}
|
|
11896
|
-
hasEffectsOnInteractionAtPath(
|
|
11901
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
11897
11902
|
const { type } = interaction;
|
|
11898
11903
|
if (type === INTERACTION_CALLED) {
|
|
11899
11904
|
const { args, withNew } = interaction;
|
|
11900
|
-
if ((withNew ? context.instantiated : context.called).trackEntityAtPathAndGetIfTracked(
|
|
11905
|
+
if ((withNew ? context.instantiated : context.called).trackEntityAtPathAndGetIfTracked(path4, args, this)) {
|
|
11901
11906
|
return false;
|
|
11902
11907
|
}
|
|
11903
|
-
} else if ((type === INTERACTION_ASSIGNED ? context.assigned : context.accessed).trackEntityAtPathAndGetIfTracked(
|
|
11908
|
+
} else if ((type === INTERACTION_ASSIGNED ? context.assigned : context.accessed).trackEntityAtPathAndGetIfTracked(path4, this)) {
|
|
11904
11909
|
return false;
|
|
11905
11910
|
}
|
|
11906
11911
|
const [returnExpression, isPure] = this.getReturnExpression();
|
|
11907
|
-
return (type === INTERACTION_ASSIGNED || !isPure) && returnExpression.hasEffectsOnInteractionAtPath(
|
|
11912
|
+
return (type === INTERACTION_ASSIGNED || !isPure) && returnExpression.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
11908
11913
|
}
|
|
11909
11914
|
};
|
|
11910
11915
|
CallExpression = class extends CallExpressionBase {
|
|
@@ -12008,10 +12013,10 @@ var init_node_entry = __esm({
|
|
|
12008
12013
|
// deoptimizations are not relevant as we are not caching values
|
|
12009
12014
|
deoptimizeCache() {
|
|
12010
12015
|
}
|
|
12011
|
-
getLiteralValueAtPath(
|
|
12016
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
12012
12017
|
if (this.expression.isSkippedAsOptional(origin))
|
|
12013
12018
|
return void 0;
|
|
12014
|
-
return this.expression.getLiteralValueAtPath(
|
|
12019
|
+
return this.expression.getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
12015
12020
|
}
|
|
12016
12021
|
hasEffects(context) {
|
|
12017
12022
|
if (this.expression.isSkippedAsOptional(this))
|
|
@@ -12056,41 +12061,41 @@ var init_node_entry = __esm({
|
|
|
12056
12061
|
super(...arguments);
|
|
12057
12062
|
this.accessedValue = null;
|
|
12058
12063
|
}
|
|
12059
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
12060
|
-
if (interaction.type === INTERACTION_ACCESSED && this.kind === "get" &&
|
|
12064
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
12065
|
+
if (interaction.type === INTERACTION_ACCESSED && this.kind === "get" && path4.length === 0) {
|
|
12061
12066
|
return this.value.deoptimizeArgumentsOnInteractionAtPath({
|
|
12062
12067
|
args: interaction.args,
|
|
12063
12068
|
type: INTERACTION_CALLED,
|
|
12064
12069
|
withNew: false
|
|
12065
12070
|
}, EMPTY_PATH, recursionTracker);
|
|
12066
12071
|
}
|
|
12067
|
-
if (interaction.type === INTERACTION_ASSIGNED && this.kind === "set" &&
|
|
12072
|
+
if (interaction.type === INTERACTION_ASSIGNED && this.kind === "set" && path4.length === 0) {
|
|
12068
12073
|
return this.value.deoptimizeArgumentsOnInteractionAtPath({
|
|
12069
12074
|
args: interaction.args,
|
|
12070
12075
|
type: INTERACTION_CALLED,
|
|
12071
12076
|
withNew: false
|
|
12072
12077
|
}, EMPTY_PATH, recursionTracker);
|
|
12073
12078
|
}
|
|
12074
|
-
this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
12079
|
+
this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
12075
12080
|
}
|
|
12076
12081
|
// As getter properties directly receive their values from fixed function
|
|
12077
12082
|
// expressions, there is no known situation where a getter is deoptimized.
|
|
12078
12083
|
deoptimizeCache() {
|
|
12079
12084
|
}
|
|
12080
|
-
deoptimizePath(
|
|
12081
|
-
this.getAccessedValue()[0].deoptimizePath(
|
|
12085
|
+
deoptimizePath(path4) {
|
|
12086
|
+
this.getAccessedValue()[0].deoptimizePath(path4);
|
|
12082
12087
|
}
|
|
12083
|
-
getLiteralValueAtPath(
|
|
12084
|
-
return this.getAccessedValue()[0].getLiteralValueAtPath(
|
|
12088
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
12089
|
+
return this.getAccessedValue()[0].getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
12085
12090
|
}
|
|
12086
|
-
getReturnExpressionWhenCalledAtPath(
|
|
12087
|
-
return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(
|
|
12091
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
12092
|
+
return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin);
|
|
12088
12093
|
}
|
|
12089
12094
|
hasEffects(context) {
|
|
12090
12095
|
return this.key.hasEffects(context);
|
|
12091
12096
|
}
|
|
12092
|
-
hasEffectsOnInteractionAtPath(
|
|
12093
|
-
if (this.kind === "get" && interaction.type === INTERACTION_ACCESSED &&
|
|
12097
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
12098
|
+
if (this.kind === "get" && interaction.type === INTERACTION_ACCESSED && path4.length === 0) {
|
|
12094
12099
|
return this.value.hasEffectsOnInteractionAtPath(EMPTY_PATH, {
|
|
12095
12100
|
args: interaction.args,
|
|
12096
12101
|
type: INTERACTION_CALLED,
|
|
@@ -12104,7 +12109,7 @@ var init_node_entry = __esm({
|
|
|
12104
12109
|
withNew: false
|
|
12105
12110
|
}, context);
|
|
12106
12111
|
}
|
|
12107
|
-
return this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(
|
|
12112
|
+
return this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
12108
12113
|
}
|
|
12109
12114
|
applyDeoptimizations() {
|
|
12110
12115
|
}
|
|
@@ -12130,20 +12135,20 @@ var init_node_entry = __esm({
|
|
|
12130
12135
|
this.object = object;
|
|
12131
12136
|
this.key = key;
|
|
12132
12137
|
}
|
|
12133
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
12134
|
-
this.object.deoptimizeArgumentsOnInteractionAtPath(interaction, [this.key, ...
|
|
12138
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
12139
|
+
this.object.deoptimizeArgumentsOnInteractionAtPath(interaction, [this.key, ...path4], recursionTracker);
|
|
12135
12140
|
}
|
|
12136
|
-
deoptimizePath(
|
|
12137
|
-
this.object.deoptimizePath([this.key, ...
|
|
12141
|
+
deoptimizePath(path4) {
|
|
12142
|
+
this.object.deoptimizePath([this.key, ...path4]);
|
|
12138
12143
|
}
|
|
12139
|
-
getLiteralValueAtPath(
|
|
12140
|
-
return this.object.getLiteralValueAtPath([this.key, ...
|
|
12144
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
12145
|
+
return this.object.getLiteralValueAtPath([this.key, ...path4], recursionTracker, origin);
|
|
12141
12146
|
}
|
|
12142
|
-
getReturnExpressionWhenCalledAtPath(
|
|
12143
|
-
return this.object.getReturnExpressionWhenCalledAtPath([this.key, ...
|
|
12147
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
12148
|
+
return this.object.getReturnExpressionWhenCalledAtPath([this.key, ...path4], interaction, recursionTracker, origin);
|
|
12144
12149
|
}
|
|
12145
|
-
hasEffectsOnInteractionAtPath(
|
|
12146
|
-
return this.object.hasEffectsOnInteractionAtPath([this.key, ...
|
|
12150
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
12151
|
+
return this.object.hasEffectsOnInteractionAtPath([this.key, ...path4], interaction, context);
|
|
12147
12152
|
}
|
|
12148
12153
|
};
|
|
12149
12154
|
ClassNode = class extends NodeBase {
|
|
@@ -12154,20 +12159,20 @@ var init_node_entry = __esm({
|
|
|
12154
12159
|
createScope(parentScope) {
|
|
12155
12160
|
this.scope = new ChildScope(parentScope);
|
|
12156
12161
|
}
|
|
12157
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
12158
|
-
this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
12162
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
12163
|
+
this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
12159
12164
|
}
|
|
12160
12165
|
deoptimizeCache() {
|
|
12161
12166
|
this.getObjectEntity().deoptimizeAllProperties();
|
|
12162
12167
|
}
|
|
12163
|
-
deoptimizePath(
|
|
12164
|
-
this.getObjectEntity().deoptimizePath(
|
|
12168
|
+
deoptimizePath(path4) {
|
|
12169
|
+
this.getObjectEntity().deoptimizePath(path4);
|
|
12165
12170
|
}
|
|
12166
|
-
getLiteralValueAtPath(
|
|
12167
|
-
return this.getObjectEntity().getLiteralValueAtPath(
|
|
12171
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
12172
|
+
return this.getObjectEntity().getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
12168
12173
|
}
|
|
12169
|
-
getReturnExpressionWhenCalledAtPath(
|
|
12170
|
-
return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(
|
|
12174
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
12175
|
+
return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin);
|
|
12171
12176
|
}
|
|
12172
12177
|
hasEffects(context) {
|
|
12173
12178
|
if (!this.deoptimized)
|
|
@@ -12176,8 +12181,8 @@ var init_node_entry = __esm({
|
|
|
12176
12181
|
this.id?.markDeclarationReached();
|
|
12177
12182
|
return initEffect || super.hasEffects(context);
|
|
12178
12183
|
}
|
|
12179
|
-
hasEffectsOnInteractionAtPath(
|
|
12180
|
-
return interaction.type === INTERACTION_CALLED &&
|
|
12184
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
12185
|
+
return interaction.type === INTERACTION_CALLED && path4.length === 0 ? !interaction.withNew || (this.classConstructor === null ? this.superClass?.hasEffectsOnInteractionAtPath(path4, interaction, context) : this.classConstructor.hasEffectsOnInteractionAtPath(path4, interaction, context)) || false : this.getObjectEntity().hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
12181
12186
|
}
|
|
12182
12187
|
include(context, includeChildrenRecursively) {
|
|
12183
12188
|
if (!this.deoptimized)
|
|
@@ -12305,20 +12310,20 @@ var init_node_entry = __esm({
|
|
|
12305
12310
|
this.expressions = expressions;
|
|
12306
12311
|
this.included = false;
|
|
12307
12312
|
}
|
|
12308
|
-
deoptimizePath(
|
|
12313
|
+
deoptimizePath(path4) {
|
|
12309
12314
|
for (const expression of this.expressions) {
|
|
12310
|
-
expression.deoptimizePath(
|
|
12315
|
+
expression.deoptimizePath(path4);
|
|
12311
12316
|
}
|
|
12312
12317
|
}
|
|
12313
|
-
getReturnExpressionWhenCalledAtPath(
|
|
12318
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
12314
12319
|
return [
|
|
12315
|
-
new MultiExpression(this.expressions.map((expression) => expression.getReturnExpressionWhenCalledAtPath(
|
|
12320
|
+
new MultiExpression(this.expressions.map((expression) => expression.getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin)[0])),
|
|
12316
12321
|
false
|
|
12317
12322
|
];
|
|
12318
12323
|
}
|
|
12319
|
-
hasEffectsOnInteractionAtPath(
|
|
12324
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
12320
12325
|
for (const expression of this.expressions) {
|
|
12321
|
-
if (expression.hasEffectsOnInteractionAtPath(
|
|
12326
|
+
if (expression.hasEffectsOnInteractionAtPath(path4, interaction, context))
|
|
12322
12327
|
return true;
|
|
12323
12328
|
}
|
|
12324
12329
|
return false;
|
|
@@ -12331,9 +12336,9 @@ var init_node_entry = __esm({
|
|
|
12331
12336
|
this.isBranchResolutionAnalysed = false;
|
|
12332
12337
|
this.usedBranch = null;
|
|
12333
12338
|
}
|
|
12334
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
12335
|
-
this.consequent.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
12336
|
-
this.alternate.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
12339
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
12340
|
+
this.consequent.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
12341
|
+
this.alternate.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
12337
12342
|
}
|
|
12338
12343
|
deoptimizeCache() {
|
|
12339
12344
|
if (this.usedBranch !== null) {
|
|
@@ -12347,34 +12352,34 @@ var init_node_entry = __esm({
|
|
|
12347
12352
|
}
|
|
12348
12353
|
}
|
|
12349
12354
|
}
|
|
12350
|
-
deoptimizePath(
|
|
12355
|
+
deoptimizePath(path4) {
|
|
12351
12356
|
const usedBranch = this.getUsedBranch();
|
|
12352
12357
|
if (usedBranch) {
|
|
12353
|
-
usedBranch.deoptimizePath(
|
|
12358
|
+
usedBranch.deoptimizePath(path4);
|
|
12354
12359
|
} else {
|
|
12355
|
-
this.consequent.deoptimizePath(
|
|
12356
|
-
this.alternate.deoptimizePath(
|
|
12360
|
+
this.consequent.deoptimizePath(path4);
|
|
12361
|
+
this.alternate.deoptimizePath(path4);
|
|
12357
12362
|
}
|
|
12358
12363
|
}
|
|
12359
|
-
getLiteralValueAtPath(
|
|
12364
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
12360
12365
|
const usedBranch = this.getUsedBranch();
|
|
12361
12366
|
if (!usedBranch)
|
|
12362
12367
|
return UnknownValue;
|
|
12363
12368
|
this.expressionsToBeDeoptimized.push(origin);
|
|
12364
|
-
return usedBranch.getLiteralValueAtPath(
|
|
12369
|
+
return usedBranch.getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
12365
12370
|
}
|
|
12366
|
-
getReturnExpressionWhenCalledAtPath(
|
|
12371
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
12367
12372
|
const usedBranch = this.getUsedBranch();
|
|
12368
12373
|
if (!usedBranch)
|
|
12369
12374
|
return [
|
|
12370
12375
|
new MultiExpression([
|
|
12371
|
-
this.consequent.getReturnExpressionWhenCalledAtPath(
|
|
12372
|
-
this.alternate.getReturnExpressionWhenCalledAtPath(
|
|
12376
|
+
this.consequent.getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin)[0],
|
|
12377
|
+
this.alternate.getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin)[0]
|
|
12373
12378
|
]),
|
|
12374
12379
|
false
|
|
12375
12380
|
];
|
|
12376
12381
|
this.expressionsToBeDeoptimized.push(origin);
|
|
12377
|
-
return usedBranch.getReturnExpressionWhenCalledAtPath(
|
|
12382
|
+
return usedBranch.getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin);
|
|
12378
12383
|
}
|
|
12379
12384
|
hasEffects(context) {
|
|
12380
12385
|
if (this.test.hasEffects(context))
|
|
@@ -12385,12 +12390,12 @@ var init_node_entry = __esm({
|
|
|
12385
12390
|
}
|
|
12386
12391
|
return usedBranch.hasEffects(context);
|
|
12387
12392
|
}
|
|
12388
|
-
hasEffectsOnInteractionAtPath(
|
|
12393
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
12389
12394
|
const usedBranch = this.getUsedBranch();
|
|
12390
12395
|
if (!usedBranch) {
|
|
12391
|
-
return this.consequent.hasEffectsOnInteractionAtPath(
|
|
12396
|
+
return this.consequent.hasEffectsOnInteractionAtPath(path4, interaction, context) || this.alternate.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
12392
12397
|
}
|
|
12393
|
-
return usedBranch.hasEffectsOnInteractionAtPath(
|
|
12398
|
+
return usedBranch.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
12394
12399
|
}
|
|
12395
12400
|
include(context, includeChildrenRecursively) {
|
|
12396
12401
|
this.included = true;
|
|
@@ -13060,8 +13065,8 @@ var init_node_entry = __esm({
|
|
|
13060
13065
|
declareDeclarator(kind) {
|
|
13061
13066
|
this.id.declare(kind, this.init || UNDEFINED_EXPRESSION);
|
|
13062
13067
|
}
|
|
13063
|
-
deoptimizePath(
|
|
13064
|
-
this.id.deoptimizePath(
|
|
13068
|
+
deoptimizePath(path4) {
|
|
13069
|
+
this.id.deoptimizePath(path4);
|
|
13065
13070
|
}
|
|
13066
13071
|
hasEffects(context) {
|
|
13067
13072
|
if (!this.deoptimized)
|
|
@@ -13418,9 +13423,9 @@ var init_node_entry = __esm({
|
|
|
13418
13423
|
this.isBranchResolutionAnalysed = false;
|
|
13419
13424
|
this.usedBranch = null;
|
|
13420
13425
|
}
|
|
13421
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
13422
|
-
this.left.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
13423
|
-
this.right.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
13426
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
13427
|
+
this.left.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
13428
|
+
this.right.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
13424
13429
|
}
|
|
13425
13430
|
deoptimizeCache() {
|
|
13426
13431
|
if (this.usedBranch) {
|
|
@@ -13435,34 +13440,34 @@ var init_node_entry = __esm({
|
|
|
13435
13440
|
context.requestTreeshakingPass();
|
|
13436
13441
|
}
|
|
13437
13442
|
}
|
|
13438
|
-
deoptimizePath(
|
|
13443
|
+
deoptimizePath(path4) {
|
|
13439
13444
|
const usedBranch = this.getUsedBranch();
|
|
13440
13445
|
if (usedBranch) {
|
|
13441
|
-
usedBranch.deoptimizePath(
|
|
13446
|
+
usedBranch.deoptimizePath(path4);
|
|
13442
13447
|
} else {
|
|
13443
|
-
this.left.deoptimizePath(
|
|
13444
|
-
this.right.deoptimizePath(
|
|
13448
|
+
this.left.deoptimizePath(path4);
|
|
13449
|
+
this.right.deoptimizePath(path4);
|
|
13445
13450
|
}
|
|
13446
13451
|
}
|
|
13447
|
-
getLiteralValueAtPath(
|
|
13452
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
13448
13453
|
const usedBranch = this.getUsedBranch();
|
|
13449
13454
|
if (!usedBranch)
|
|
13450
13455
|
return UnknownValue;
|
|
13451
13456
|
this.expressionsToBeDeoptimized.push(origin);
|
|
13452
|
-
return usedBranch.getLiteralValueAtPath(
|
|
13457
|
+
return usedBranch.getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
13453
13458
|
}
|
|
13454
|
-
getReturnExpressionWhenCalledAtPath(
|
|
13459
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
13455
13460
|
const usedBranch = this.getUsedBranch();
|
|
13456
13461
|
if (!usedBranch)
|
|
13457
13462
|
return [
|
|
13458
13463
|
new MultiExpression([
|
|
13459
|
-
this.left.getReturnExpressionWhenCalledAtPath(
|
|
13460
|
-
this.right.getReturnExpressionWhenCalledAtPath(
|
|
13464
|
+
this.left.getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin)[0],
|
|
13465
|
+
this.right.getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin)[0]
|
|
13461
13466
|
]),
|
|
13462
13467
|
false
|
|
13463
13468
|
];
|
|
13464
13469
|
this.expressionsToBeDeoptimized.push(origin);
|
|
13465
|
-
return usedBranch.getReturnExpressionWhenCalledAtPath(
|
|
13470
|
+
return usedBranch.getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin);
|
|
13466
13471
|
}
|
|
13467
13472
|
hasEffects(context) {
|
|
13468
13473
|
if (this.left.hasEffects(context)) {
|
|
@@ -13473,12 +13478,12 @@ var init_node_entry = __esm({
|
|
|
13473
13478
|
}
|
|
13474
13479
|
return false;
|
|
13475
13480
|
}
|
|
13476
|
-
hasEffectsOnInteractionAtPath(
|
|
13481
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
13477
13482
|
const usedBranch = this.getUsedBranch();
|
|
13478
13483
|
if (!usedBranch) {
|
|
13479
|
-
return this.left.hasEffectsOnInteractionAtPath(
|
|
13484
|
+
return this.left.hasEffectsOnInteractionAtPath(path4, interaction, context) || this.right.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
13480
13485
|
}
|
|
13481
|
-
return usedBranch.hasEffectsOnInteractionAtPath(
|
|
13486
|
+
return usedBranch.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
13482
13487
|
}
|
|
13483
13488
|
include(context, includeChildrenRecursively) {
|
|
13484
13489
|
this.included = true;
|
|
@@ -13549,8 +13554,8 @@ var init_node_entry = __esm({
|
|
|
13549
13554
|
hasEffects() {
|
|
13550
13555
|
return false;
|
|
13551
13556
|
}
|
|
13552
|
-
hasEffectsOnInteractionAtPath(
|
|
13553
|
-
return
|
|
13557
|
+
hasEffectsOnInteractionAtPath(path4, { type }) {
|
|
13558
|
+
return path4.length > 1 || type !== INTERACTION_ACCESSED;
|
|
13554
13559
|
}
|
|
13555
13560
|
include() {
|
|
13556
13561
|
if (!this.included) {
|
|
@@ -13622,14 +13627,14 @@ var init_node_entry = __esm({
|
|
|
13622
13627
|
system: ["module", "URL"],
|
|
13623
13628
|
umd: ["document", "require", "URL"]
|
|
13624
13629
|
};
|
|
13625
|
-
getResolveUrl = (
|
|
13630
|
+
getResolveUrl = (path4, URL2 = "URL") => `new ${URL2}(${path4}).href`;
|
|
13626
13631
|
getRelativeUrlFromDocument = (relativePath, umd2 = false) => getResolveUrl(`'${escapeId(relativePath)}', ${umd2 ? `typeof document === 'undefined' ? location.href : ` : ""}document.currentScript && document.currentScript.src || document.baseURI`);
|
|
13627
13632
|
getGenericImportMetaMechanism = (getUrl) => (property, { chunkId }) => {
|
|
13628
13633
|
const urlMechanism = getUrl(chunkId);
|
|
13629
13634
|
return property === null ? `({ url: ${urlMechanism} })` : property === "url" ? urlMechanism : "undefined";
|
|
13630
13635
|
};
|
|
13631
|
-
getFileUrlFromFullPath = (
|
|
13632
|
-
getFileUrlFromRelativePath = (
|
|
13636
|
+
getFileUrlFromFullPath = (path4) => `require('u' + 'rl').pathToFileURL(${path4}).href`;
|
|
13637
|
+
getFileUrlFromRelativePath = (path4) => getFileUrlFromFullPath(`__dirname + '/${path4}'`);
|
|
13633
13638
|
getUrlFromDocument = (chunkId, umd2 = false) => `${umd2 ? `typeof document === 'undefined' ? location.href : ` : ""}(${DOCUMENT_CURRENT_SCRIPT} && ${DOCUMENT_CURRENT_SCRIPT}.src || new URL('${escapeId(chunkId)}', document.baseURI).href)`;
|
|
13634
13639
|
relativeUrlMechanisms = {
|
|
13635
13640
|
amd: (relativePath) => {
|
|
@@ -13666,8 +13671,8 @@ var init_node_entry = __esm({
|
|
|
13666
13671
|
this.applyDeoptimizations();
|
|
13667
13672
|
}
|
|
13668
13673
|
}
|
|
13669
|
-
hasEffectsOnInteractionAtPath(
|
|
13670
|
-
return
|
|
13674
|
+
hasEffectsOnInteractionAtPath(path4, { type }) {
|
|
13675
|
+
return path4.length > 0 || type !== INTERACTION_ACCESSED;
|
|
13671
13676
|
}
|
|
13672
13677
|
include(context, includeChildrenRecursively) {
|
|
13673
13678
|
if (!this.deoptimized)
|
|
@@ -13702,23 +13707,23 @@ var init_node_entry = __esm({
|
|
|
13702
13707
|
super(...arguments);
|
|
13703
13708
|
this.objectEntity = null;
|
|
13704
13709
|
}
|
|
13705
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
13706
|
-
this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
13710
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
13711
|
+
this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
13707
13712
|
}
|
|
13708
13713
|
deoptimizeCache() {
|
|
13709
13714
|
this.getObjectEntity().deoptimizeAllProperties();
|
|
13710
13715
|
}
|
|
13711
|
-
deoptimizePath(
|
|
13712
|
-
this.getObjectEntity().deoptimizePath(
|
|
13716
|
+
deoptimizePath(path4) {
|
|
13717
|
+
this.getObjectEntity().deoptimizePath(path4);
|
|
13713
13718
|
}
|
|
13714
|
-
getLiteralValueAtPath(
|
|
13715
|
-
return this.getObjectEntity().getLiteralValueAtPath(
|
|
13719
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
13720
|
+
return this.getObjectEntity().getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
13716
13721
|
}
|
|
13717
|
-
getReturnExpressionWhenCalledAtPath(
|
|
13718
|
-
return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(
|
|
13722
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
13723
|
+
return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin);
|
|
13719
13724
|
}
|
|
13720
|
-
hasEffectsOnInteractionAtPath(
|
|
13721
|
-
return this.getObjectEntity().hasEffectsOnInteractionAtPath(
|
|
13725
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
13726
|
+
return this.getObjectEntity().hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
13722
13727
|
}
|
|
13723
13728
|
render(code, options, { renderedSurroundingElement } = BLANK) {
|
|
13724
13729
|
super.render(code, options);
|
|
@@ -13851,23 +13856,23 @@ var init_node_entry = __esm({
|
|
|
13851
13856
|
}
|
|
13852
13857
|
};
|
|
13853
13858
|
PropertyDefinition = class extends NodeBase {
|
|
13854
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
13855
|
-
this.value?.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
13859
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
13860
|
+
this.value?.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
13856
13861
|
}
|
|
13857
|
-
deoptimizePath(
|
|
13858
|
-
this.value?.deoptimizePath(
|
|
13862
|
+
deoptimizePath(path4) {
|
|
13863
|
+
this.value?.deoptimizePath(path4);
|
|
13859
13864
|
}
|
|
13860
|
-
getLiteralValueAtPath(
|
|
13861
|
-
return this.value ? this.value.getLiteralValueAtPath(
|
|
13865
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
13866
|
+
return this.value ? this.value.getLiteralValueAtPath(path4, recursionTracker, origin) : UnknownValue;
|
|
13862
13867
|
}
|
|
13863
|
-
getReturnExpressionWhenCalledAtPath(
|
|
13864
|
-
return this.value ? this.value.getReturnExpressionWhenCalledAtPath(
|
|
13868
|
+
getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) {
|
|
13869
|
+
return this.value ? this.value.getReturnExpressionWhenCalledAtPath(path4, interaction, recursionTracker, origin) : UNKNOWN_RETURN_EXPRESSION;
|
|
13865
13870
|
}
|
|
13866
13871
|
hasEffects(context) {
|
|
13867
13872
|
return this.key.hasEffects(context) || this.static && !!this.value?.hasEffects(context);
|
|
13868
13873
|
}
|
|
13869
|
-
hasEffectsOnInteractionAtPath(
|
|
13870
|
-
return !this.value || this.value.hasEffectsOnInteractionAtPath(
|
|
13874
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
13875
|
+
return !this.value || this.value.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
13871
13876
|
}
|
|
13872
13877
|
applyDeoptimizations() {
|
|
13873
13878
|
}
|
|
@@ -13897,14 +13902,14 @@ var init_node_entry = __esm({
|
|
|
13897
13902
|
}
|
|
13898
13903
|
};
|
|
13899
13904
|
SequenceExpression = class extends NodeBase {
|
|
13900
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
13901
|
-
this.expressions[this.expressions.length - 1].deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
13905
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
13906
|
+
this.expressions[this.expressions.length - 1].deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
13902
13907
|
}
|
|
13903
|
-
deoptimizePath(
|
|
13904
|
-
this.expressions[this.expressions.length - 1].deoptimizePath(
|
|
13908
|
+
deoptimizePath(path4) {
|
|
13909
|
+
this.expressions[this.expressions.length - 1].deoptimizePath(path4);
|
|
13905
13910
|
}
|
|
13906
|
-
getLiteralValueAtPath(
|
|
13907
|
-
return this.expressions[this.expressions.length - 1].getLiteralValueAtPath(
|
|
13911
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
13912
|
+
return this.expressions[this.expressions.length - 1].getLiteralValueAtPath(path4, recursionTracker, origin);
|
|
13908
13913
|
}
|
|
13909
13914
|
hasEffects(context) {
|
|
13910
13915
|
for (const expression of this.expressions) {
|
|
@@ -13913,8 +13918,8 @@ var init_node_entry = __esm({
|
|
|
13913
13918
|
}
|
|
13914
13919
|
return false;
|
|
13915
13920
|
}
|
|
13916
|
-
hasEffectsOnInteractionAtPath(
|
|
13917
|
-
return this.expressions[this.expressions.length - 1].hasEffectsOnInteractionAtPath(
|
|
13921
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
13922
|
+
return this.expressions[this.expressions.length - 1].hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
13918
13923
|
}
|
|
13919
13924
|
include(context, includeChildrenRecursively) {
|
|
13920
13925
|
this.included = true;
|
|
@@ -13985,11 +13990,11 @@ var init_node_entry = __esm({
|
|
|
13985
13990
|
bind() {
|
|
13986
13991
|
this.variable = this.scope.findVariable("this");
|
|
13987
13992
|
}
|
|
13988
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
13989
|
-
this.variable.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
13993
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
13994
|
+
this.variable.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
13990
13995
|
}
|
|
13991
|
-
deoptimizePath(
|
|
13992
|
-
this.variable.deoptimizePath(
|
|
13996
|
+
deoptimizePath(path4) {
|
|
13997
|
+
this.variable.deoptimizePath(path4);
|
|
13993
13998
|
}
|
|
13994
13999
|
include() {
|
|
13995
14000
|
if (!this.included) {
|
|
@@ -14195,24 +14200,24 @@ var init_node_entry = __esm({
|
|
|
14195
14200
|
TemplateLiteral = class extends NodeBase {
|
|
14196
14201
|
deoptimizeArgumentsOnInteractionAtPath() {
|
|
14197
14202
|
}
|
|
14198
|
-
getLiteralValueAtPath(
|
|
14199
|
-
if (
|
|
14203
|
+
getLiteralValueAtPath(path4) {
|
|
14204
|
+
if (path4.length > 0 || this.quasis.length !== 1) {
|
|
14200
14205
|
return UnknownValue;
|
|
14201
14206
|
}
|
|
14202
14207
|
return this.quasis[0].value.cooked;
|
|
14203
14208
|
}
|
|
14204
|
-
getReturnExpressionWhenCalledAtPath(
|
|
14205
|
-
if (
|
|
14209
|
+
getReturnExpressionWhenCalledAtPath(path4) {
|
|
14210
|
+
if (path4.length !== 1) {
|
|
14206
14211
|
return UNKNOWN_RETURN_EXPRESSION;
|
|
14207
14212
|
}
|
|
14208
|
-
return getMemberReturnExpressionWhenCalled(literalStringMembers,
|
|
14213
|
+
return getMemberReturnExpressionWhenCalled(literalStringMembers, path4[0]);
|
|
14209
14214
|
}
|
|
14210
|
-
hasEffectsOnInteractionAtPath(
|
|
14215
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
14211
14216
|
if (interaction.type === INTERACTION_ACCESSED) {
|
|
14212
|
-
return
|
|
14217
|
+
return path4.length > 1;
|
|
14213
14218
|
}
|
|
14214
|
-
if (interaction.type === INTERACTION_CALLED &&
|
|
14215
|
-
return hasMemberEffectWhenCalled(literalStringMembers,
|
|
14219
|
+
if (interaction.type === INTERACTION_CALLED && path4.length === 1) {
|
|
14220
|
+
return hasMemberEffectWhenCalled(literalStringMembers, path4[0], interaction, context);
|
|
14216
14221
|
}
|
|
14217
14222
|
return true;
|
|
14218
14223
|
}
|
|
@@ -14321,17 +14326,17 @@ var init_node_entry = __esm({
|
|
|
14321
14326
|
bind() {
|
|
14322
14327
|
this.variable = this.scope.findVariable("this");
|
|
14323
14328
|
}
|
|
14324
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
14325
|
-
this.variable.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
14329
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
14330
|
+
this.variable.deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker);
|
|
14326
14331
|
}
|
|
14327
|
-
deoptimizePath(
|
|
14328
|
-
this.variable.deoptimizePath(
|
|
14332
|
+
deoptimizePath(path4) {
|
|
14333
|
+
this.variable.deoptimizePath(path4);
|
|
14329
14334
|
}
|
|
14330
|
-
hasEffectsOnInteractionAtPath(
|
|
14331
|
-
if (
|
|
14335
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
14336
|
+
if (path4.length === 0) {
|
|
14332
14337
|
return interaction.type !== INTERACTION_ACCESSED;
|
|
14333
14338
|
}
|
|
14334
|
-
return this.variable.hasEffectsOnInteractionAtPath(
|
|
14339
|
+
return this.variable.hasEffectsOnInteractionAtPath(path4, interaction, context);
|
|
14335
14340
|
}
|
|
14336
14341
|
include() {
|
|
14337
14342
|
if (!this.included) {
|
|
@@ -14412,8 +14417,8 @@ var init_node_entry = __esm({
|
|
|
14412
14417
|
"~": (value) => ~value
|
|
14413
14418
|
};
|
|
14414
14419
|
UnaryExpression = class extends NodeBase {
|
|
14415
|
-
getLiteralValueAtPath(
|
|
14416
|
-
if (
|
|
14420
|
+
getLiteralValueAtPath(path4, recursionTracker, origin) {
|
|
14421
|
+
if (path4.length > 0)
|
|
14417
14422
|
return UnknownValue;
|
|
14418
14423
|
const argumentValue = this.argument.getLiteralValueAtPath(EMPTY_PATH, recursionTracker, origin);
|
|
14419
14424
|
if (typeof argumentValue === "symbol")
|
|
@@ -14427,8 +14432,8 @@ var init_node_entry = __esm({
|
|
|
14427
14432
|
return false;
|
|
14428
14433
|
return this.argument.hasEffects(context) || this.operator === "delete" && this.argument.hasEffectsOnInteractionAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_ASSIGNMENT, context);
|
|
14429
14434
|
}
|
|
14430
|
-
hasEffectsOnInteractionAtPath(
|
|
14431
|
-
return type !== INTERACTION_ACCESSED ||
|
|
14435
|
+
hasEffectsOnInteractionAtPath(path4, { type }) {
|
|
14436
|
+
return type !== INTERACTION_ACCESSED || path4.length > (this.operator === "void" ? 0 : 1);
|
|
14432
14437
|
}
|
|
14433
14438
|
applyDeoptimizations() {
|
|
14434
14439
|
this.deoptimized = true;
|
|
@@ -14452,8 +14457,8 @@ var init_node_entry = __esm({
|
|
|
14452
14457
|
this.applyDeoptimizations();
|
|
14453
14458
|
return this.argument.hasEffectsAsAssignmentTarget(context, true);
|
|
14454
14459
|
}
|
|
14455
|
-
hasEffectsOnInteractionAtPath(
|
|
14456
|
-
return
|
|
14460
|
+
hasEffectsOnInteractionAtPath(path4, { type }) {
|
|
14461
|
+
return path4.length > 1 || type !== INTERACTION_ACCESSED;
|
|
14457
14462
|
}
|
|
14458
14463
|
include(context, includeChildrenRecursively) {
|
|
14459
14464
|
if (!this.deoptimized)
|
|
@@ -14740,26 +14745,26 @@ var init_node_entry = __esm({
|
|
|
14740
14745
|
this.references.push(identifier);
|
|
14741
14746
|
this.name = identifier.name;
|
|
14742
14747
|
}
|
|
14743
|
-
deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
14744
|
-
if (
|
|
14745
|
-
const key =
|
|
14748
|
+
deoptimizeArgumentsOnInteractionAtPath(interaction, path4, recursionTracker) {
|
|
14749
|
+
if (path4.length > 1 || path4.length === 1 && interaction.type === INTERACTION_CALLED) {
|
|
14750
|
+
const key = path4[0];
|
|
14746
14751
|
if (typeof key === "string") {
|
|
14747
|
-
this.getMemberVariables()[key]?.deoptimizeArgumentsOnInteractionAtPath(interaction,
|
|
14752
|
+
this.getMemberVariables()[key]?.deoptimizeArgumentsOnInteractionAtPath(interaction, path4.slice(1), recursionTracker);
|
|
14748
14753
|
} else {
|
|
14749
14754
|
deoptimizeInteraction(interaction);
|
|
14750
14755
|
}
|
|
14751
14756
|
}
|
|
14752
14757
|
}
|
|
14753
|
-
deoptimizePath(
|
|
14754
|
-
if (
|
|
14755
|
-
const key =
|
|
14758
|
+
deoptimizePath(path4) {
|
|
14759
|
+
if (path4.length > 1) {
|
|
14760
|
+
const key = path4[0];
|
|
14756
14761
|
if (typeof key === "string") {
|
|
14757
|
-
this.getMemberVariables()[key]?.deoptimizePath(
|
|
14762
|
+
this.getMemberVariables()[key]?.deoptimizePath(path4.slice(1));
|
|
14758
14763
|
}
|
|
14759
14764
|
}
|
|
14760
14765
|
}
|
|
14761
|
-
getLiteralValueAtPath(
|
|
14762
|
-
if (
|
|
14766
|
+
getLiteralValueAtPath(path4) {
|
|
14767
|
+
if (path4[0] === SymbolToStringTag) {
|
|
14763
14768
|
return "Module";
|
|
14764
14769
|
}
|
|
14765
14770
|
return UnknownValue;
|
|
@@ -14780,20 +14785,20 @@ var init_node_entry = __esm({
|
|
|
14780
14785
|
}
|
|
14781
14786
|
return this.memberVariables = memberVariables;
|
|
14782
14787
|
}
|
|
14783
|
-
hasEffectsOnInteractionAtPath(
|
|
14788
|
+
hasEffectsOnInteractionAtPath(path4, interaction, context) {
|
|
14784
14789
|
const { type } = interaction;
|
|
14785
|
-
if (
|
|
14790
|
+
if (path4.length === 0) {
|
|
14786
14791
|
return true;
|
|
14787
14792
|
}
|
|
14788
|
-
if (
|
|
14793
|
+
if (path4.length === 1 && type !== INTERACTION_CALLED) {
|
|
14789
14794
|
return type === INTERACTION_ASSIGNED;
|
|
14790
14795
|
}
|
|
14791
|
-
const key =
|
|
14796
|
+
const key = path4[0];
|
|
14792
14797
|
if (typeof key !== "string") {
|
|
14793
14798
|
return true;
|
|
14794
14799
|
}
|
|
14795
14800
|
const memberVariable = this.getMemberVariables()[key];
|
|
14796
|
-
return !memberVariable || memberVariable.hasEffectsOnInteractionAtPath(
|
|
14801
|
+
return !memberVariable || memberVariable.hasEffectsOnInteractionAtPath(path4.slice(1), interaction, context);
|
|
14797
14802
|
}
|
|
14798
14803
|
include() {
|
|
14799
14804
|
this.included = true;
|
|
@@ -24329,7 +24334,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
24329
24334
|
var dist_default = cac;
|
|
24330
24335
|
|
|
24331
24336
|
// package.json
|
|
24332
|
-
var version = "3.
|
|
24337
|
+
var version = "3.3.1";
|
|
24333
24338
|
|
|
24334
24339
|
// src/clearCache.ts
|
|
24335
24340
|
import c from "picocolors";
|
|
@@ -24521,6 +24526,9 @@ async function writeJsonOutput(mapFile, generator, pins, env2, flags, silent = f
|
|
|
24521
24526
|
);
|
|
24522
24527
|
try {
|
|
24523
24528
|
const existing = JSON.parse(await fs2.readFile(mapFile, "utf8"));
|
|
24529
|
+
delete existing.imports;
|
|
24530
|
+
delete existing.scopes;
|
|
24531
|
+
delete existing.integrity;
|
|
24524
24532
|
map = Object.assign({}, existing, map);
|
|
24525
24533
|
} catch {
|
|
24526
24534
|
}
|
|
@@ -24549,6 +24557,7 @@ async function getGenerator(flags, setEnv = true) {
|
|
|
24549
24557
|
defaultProvider: getProvider(flags),
|
|
24550
24558
|
resolutions: getResolutions(flags),
|
|
24551
24559
|
cache: getCacheMode(flags),
|
|
24560
|
+
integrity: flags.integrity,
|
|
24552
24561
|
commonJS: true
|
|
24553
24562
|
// TODO: only for --local flag
|
|
24554
24563
|
});
|
|
@@ -24900,7 +24909,7 @@ async function resolveModule(p, inlinePins, generator) {
|
|
|
24900
24909
|
}
|
|
24901
24910
|
async function handleLocalFile(resolvedModule, inlinePins, generator) {
|
|
24902
24911
|
const source = await fs3.readFile(resolvedModule.target, { encoding: "utf8" });
|
|
24903
|
-
const
|
|
24912
|
+
const babel = await import("@babel/core");
|
|
24904
24913
|
try {
|
|
24905
24914
|
babel.parse(source);
|
|
24906
24915
|
return resolvedModule;
|
|
@@ -24984,16 +24993,15 @@ async function update(packages, flags) {
|
|
|
24984
24993
|
}
|
|
24985
24994
|
|
|
24986
24995
|
// src/build/index.ts
|
|
24987
|
-
import
|
|
24996
|
+
import path3 from "node:path";
|
|
24988
24997
|
import process2 from "node:process";
|
|
24998
|
+
import { pathToFileURL as pathToFileURL3 } from "node:url";
|
|
24989
24999
|
|
|
24990
25000
|
// node_modules/rollup/dist/es/rollup.js
|
|
24991
25001
|
init_node_entry();
|
|
24992
25002
|
|
|
24993
25003
|
// src/build/rollup-importmap-plugin.ts
|
|
24994
25004
|
import fs4 from "node:fs/promises";
|
|
24995
|
-
import path3 from "node:path";
|
|
24996
|
-
import { pathToFileURL as pathToFileURL3 } from "node:url";
|
|
24997
25005
|
import { fetch } from "@jspm/generator";
|
|
24998
25006
|
var isValidUrl2 = (url) => {
|
|
24999
25007
|
try {
|
|
@@ -25025,23 +25033,22 @@ var RollupImportmapPlugin = async (flags) => {
|
|
|
25025
25033
|
}
|
|
25026
25034
|
},
|
|
25027
25035
|
load: async (id) => {
|
|
25036
|
+
let url;
|
|
25028
25037
|
try {
|
|
25029
|
-
|
|
25030
|
-
|
|
25031
|
-
|
|
25032
|
-
|
|
25033
|
-
|
|
25034
|
-
|
|
25038
|
+
url = new URL(id);
|
|
25039
|
+
} catch (e) {
|
|
25040
|
+
throw new JspmError(`Unsupported URL ${id}
|
|
25041
|
+
${e.message}`);
|
|
25042
|
+
}
|
|
25043
|
+
switch (url.protocol) {
|
|
25044
|
+
case "file:":
|
|
25045
|
+
return await fs4.readFile(new URL(id), "utf-8");
|
|
25046
|
+
case "https:": {
|
|
25035
25047
|
const response = await fetch(id);
|
|
25036
25048
|
return await response.text();
|
|
25037
25049
|
}
|
|
25038
|
-
|
|
25039
|
-
|
|
25040
|
-
`
|
|
25041
|
-
Unsupported protocol ${id}
|
|
25042
|
-
${err.message}
|
|
25043
|
-
`
|
|
25044
|
-
);
|
|
25050
|
+
default:
|
|
25051
|
+
throw new JspmError(`Unsupported protocol ${url.protocol}`);
|
|
25045
25052
|
}
|
|
25046
25053
|
}
|
|
25047
25054
|
};
|
|
@@ -25058,7 +25065,7 @@ async function build(entry, options) {
|
|
|
25058
25065
|
if (!options.output) {
|
|
25059
25066
|
throw new JspmError(`Build output is required when entry is provided`);
|
|
25060
25067
|
}
|
|
25061
|
-
const entryPath =
|
|
25068
|
+
const entryPath = path3.join(process2.cwd(), entry);
|
|
25062
25069
|
if (await exists(entryPath) === false) {
|
|
25063
25070
|
throw new JspmError(`Entry file does not exist: ${entryPath}`);
|
|
25064
25071
|
}
|
|
@@ -25067,17 +25074,17 @@ async function build(entry, options) {
|
|
|
25067
25074
|
plugins: [RollupImportmapPlugin(options)]
|
|
25068
25075
|
};
|
|
25069
25076
|
outputOptions = {
|
|
25070
|
-
dir:
|
|
25077
|
+
dir: path3.join(process2.cwd(), options.output)
|
|
25071
25078
|
};
|
|
25072
25079
|
}
|
|
25073
25080
|
if (options.config) {
|
|
25074
|
-
const buildConfigPath =
|
|
25081
|
+
const buildConfigPath = path3.join(process2.cwd(), options.config);
|
|
25075
25082
|
if (await exists(buildConfigPath) === false) {
|
|
25076
25083
|
throw new JspmError(
|
|
25077
25084
|
`Build config file does not exist: ${buildConfigPath}`
|
|
25078
25085
|
);
|
|
25079
25086
|
}
|
|
25080
|
-
const rollupConfig = await import(buildConfigPath).then((mod) => mod.default).catch((err) => {
|
|
25087
|
+
const rollupConfig = await import(pathToFileURL3(buildConfigPath).href).then((mod) => mod.default).catch((err) => {
|
|
25081
25088
|
throw new JspmError(`Failed to load build config: ${err}`);
|
|
25082
25089
|
});
|
|
25083
25090
|
if ("output" in rollupConfig) {
|
|
@@ -25141,7 +25148,7 @@ var preloadOpt = [
|
|
|
25141
25148
|
];
|
|
25142
25149
|
var integrityOpt = [
|
|
25143
25150
|
"--integrity",
|
|
25144
|
-
"Add module
|
|
25151
|
+
"Add module integrity attributes to the import map",
|
|
25145
25152
|
{ default: false }
|
|
25146
25153
|
];
|
|
25147
25154
|
var cacheOpt = [
|
|
@@ -25276,8 +25283,8 @@ export {
|
|
|
25276
25283
|
rollup/dist/es/shared/node-entry.js:
|
|
25277
25284
|
(*
|
|
25278
25285
|
@license
|
|
25279
|
-
Rollup.js v3.29.
|
|
25280
|
-
|
|
25286
|
+
Rollup.js v3.29.4
|
|
25287
|
+
Thu, 28 Sep 2023 04:54:30 GMT - commit 4e92d60fa90cead39481e3703d26e5d812f43bd1
|
|
25281
25288
|
|
|
25282
25289
|
https://github.com/rollup/rollup
|
|
25283
25290
|
|
|
@@ -25287,8 +25294,8 @@ rollup/dist/es/shared/node-entry.js:
|
|
|
25287
25294
|
rollup/dist/es/rollup.js:
|
|
25288
25295
|
(*
|
|
25289
25296
|
@license
|
|
25290
|
-
Rollup.js v3.29.
|
|
25291
|
-
|
|
25297
|
+
Rollup.js v3.29.4
|
|
25298
|
+
Thu, 28 Sep 2023 04:54:30 GMT - commit 4e92d60fa90cead39481e3703d26e5d812f43bd1
|
|
25292
25299
|
|
|
25293
25300
|
https://github.com/rollup/rollup
|
|
25294
25301
|
|