@harmoniclabs/pebble 0.1.3-dev1 → 0.1.3-dev3
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/dist/IR/tree_utils/intToUtf8Bytes.d.ts +8 -0
- package/dist/IR/tree_utils/intToUtf8Bytes.js +49 -0
- package/dist/ast/nodes/statements/PebbleStmt.d.ts +2 -1
- package/dist/ast/nodes/statements/PebbleStmt.js +2 -0
- package/dist/ast/nodes/statements/TraceStmt.d.ts +11 -0
- package/dist/ast/nodes/statements/TraceStmt.js +10 -0
- package/dist/compiler/AstCompiler/AstCompiler.d.ts +11 -0
- package/dist/compiler/AstCompiler/AstCompiler.js +185 -0
- package/dist/compiler/AstCompiler/internal/_deriveContractBody/_deriveContractBody.js +8 -0
- package/dist/compiler/AstCompiler/internal/statements/_compileStatement.js +4 -0
- package/dist/compiler/AstCompiler/internal/statements/_compileTraceStmt.d.ts +4 -0
- package/dist/compiler/AstCompiler/internal/statements/_compileTraceStmt.js +15 -0
- package/dist/compiler/Compiler.d.ts +5 -0
- package/dist/compiler/Compiler.js +25 -1
- package/dist/compiler/TirCompiler/expressify/determineReassignedVariablesAndReturn.js +5 -3
- package/dist/compiler/TirCompiler/expressify/expressify.js +8 -0
- package/dist/compiler/TirCompiler/expressify/expressifyIfBranch.js +2 -0
- package/dist/compiler/TirCompiler/expressify/expressifyVars.js +10 -1
- package/dist/compiler/tir/expressions/TirExpr.d.ts +2 -1
- package/dist/compiler/tir/expressions/TirExpr.js +2 -0
- package/dist/compiler/tir/expressions/TirTraceExpr.d.ts +22 -0
- package/dist/compiler/tir/expressions/TirTraceExpr.js +53 -0
- package/dist/compiler/tir/expressions/TirTypeConversionExpr.js +6 -0
- package/dist/compiler/tir/statements/TirStmt.d.ts +2 -1
- package/dist/compiler/tir/statements/TirStmt.js +2 -0
- package/dist/compiler/tir/statements/TirTraceStmt.d.ts +15 -0
- package/dist/compiler/tir/statements/TirTraceStmt.js +20 -0
- package/dist/parser/Parser.d.ts +2 -0
- package/dist/parser/Parser.js +15 -0
- package/dist/tokenizer/Token.d.ts +82 -81
- package/dist/tokenizer/Token.js +82 -81
- package/dist/tokenizer/utils/tokenFromKeyword.js +2 -0
- package/dist/utils/array/keepSortedArrInplace.js +15 -0
- package/package.json +1 -1
|
@@ -23,6 +23,21 @@ export function keepSortedStrArrInplace(target, source) {
|
|
|
23
23
|
}
|
|
24
24
|
continue; // element is in source, check next without removing this
|
|
25
25
|
}
|
|
26
|
+
// elem > fstSrc: source has elements not in target, advance source
|
|
27
|
+
if (elem > fstSrc) {
|
|
28
|
+
while (source.length > 0 && fstSrc < elem) {
|
|
29
|
+
fstSrc = source.shift();
|
|
30
|
+
}
|
|
31
|
+
if (fstSrc === elem) {
|
|
32
|
+
fstSrc = source.shift();
|
|
33
|
+
if (!fstSrc) {
|
|
34
|
+
target.length = i + 1;
|
|
35
|
+
return target;
|
|
36
|
+
}
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
// fstSrc > elem or source exhausted: elem not in source, fall through to remove
|
|
40
|
+
}
|
|
26
41
|
// not equal, remove the element
|
|
27
42
|
target.splice(i, 1);
|
|
28
43
|
i--; // adjust index since we removed an element
|
package/package.json
CHANGED