@abaplint/runtime 2.7.160 → 2.7.162
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/build/src/compare/eq.js +14 -1
- package/build/src/types/table.js +19 -3
- package/package.json +2 -2
package/build/src/compare/eq.js
CHANGED
|
@@ -71,9 +71,15 @@ function eq(left, right) {
|
|
|
71
71
|
else if (left instanceof types_1.Character) {
|
|
72
72
|
return (parseInt(left.get(), 10) || 0) === right.get();
|
|
73
73
|
}
|
|
74
|
+
else if (left instanceof types_1.Float) {
|
|
75
|
+
return right.get() === left.getRaw();
|
|
76
|
+
}
|
|
74
77
|
else if (left instanceof types_1.Numc) {
|
|
75
78
|
return right.get() === parseInt(left.get(), 10);
|
|
76
79
|
}
|
|
80
|
+
else if (left instanceof types_1.Packed) {
|
|
81
|
+
return right.get() === left.get();
|
|
82
|
+
}
|
|
77
83
|
}
|
|
78
84
|
else if (right instanceof types_1.DataReference && left instanceof types_1.DataReference) {
|
|
79
85
|
return right.getPointer() === left.getPointer();
|
|
@@ -113,6 +119,9 @@ function eq(left, right) {
|
|
|
113
119
|
if (left instanceof types_1.Packed) {
|
|
114
120
|
return right.get() === left.get();
|
|
115
121
|
}
|
|
122
|
+
else if (left instanceof types_1.Integer) {
|
|
123
|
+
return right.get() === left.get();
|
|
124
|
+
}
|
|
116
125
|
}
|
|
117
126
|
else if (right instanceof types_1.Integer8) {
|
|
118
127
|
if (left instanceof types_1.Integer
|
|
@@ -120,12 +129,16 @@ function eq(left, right) {
|
|
|
120
129
|
|| left instanceof types_1.Packed) {
|
|
121
130
|
return right.get() === left.get();
|
|
122
131
|
}
|
|
132
|
+
else if (left instanceof types_1.Float) {
|
|
133
|
+
return right.get() === left.getRaw();
|
|
134
|
+
}
|
|
123
135
|
}
|
|
124
136
|
else if (right instanceof types_1.Float) {
|
|
125
137
|
if (left instanceof types_1.Float) {
|
|
126
138
|
return right.getRaw() === left.getRaw();
|
|
127
139
|
}
|
|
128
|
-
else if (left instanceof types_1.Integer
|
|
140
|
+
else if (left instanceof types_1.Integer
|
|
141
|
+
|| left instanceof types_1.Integer8) {
|
|
129
142
|
return right.getRaw() === left.get();
|
|
130
143
|
}
|
|
131
144
|
}
|
package/build/src/types/table.js
CHANGED
|
@@ -9,6 +9,8 @@ const field_symbol_1 = require("./field_symbol");
|
|
|
9
9
|
const data_reference_1 = require("./data_reference");
|
|
10
10
|
const insert_internal_1 = require("../statements/insert_internal");
|
|
11
11
|
const sort_1 = require("../statements/sort");
|
|
12
|
+
const character_1 = require("./character");
|
|
13
|
+
const hex_1 = require("./hex");
|
|
12
14
|
// const FEATURE_SHARED_TABLES = true;
|
|
13
15
|
var TableAccessType;
|
|
14
16
|
(function (TableAccessType) {
|
|
@@ -144,9 +146,23 @@ class HashedTable {
|
|
|
144
146
|
val = rowType.get();
|
|
145
147
|
}
|
|
146
148
|
else if (ttyp instanceof structure_1.Structure) {
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
val
|
|
149
|
+
const field = ttyp.get()[k.toLowerCase()];
|
|
150
|
+
// if types match, there is no need to clone
|
|
151
|
+
if (field instanceof string_1.String && val instanceof string_1.String) {
|
|
152
|
+
val = val.get();
|
|
153
|
+
}
|
|
154
|
+
else if (field instanceof character_1.Character && val instanceof character_1.Character && field.getLength() === val.getLength()) {
|
|
155
|
+
val = val.get();
|
|
156
|
+
}
|
|
157
|
+
else if (field instanceof hex_1.Hex && val instanceof hex_1.Hex && field.getLength() === val.getLength()) {
|
|
158
|
+
val = val.get();
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
// convert
|
|
162
|
+
const rowType = (0, clone_1.clone)(field);
|
|
163
|
+
rowType.set(val.get());
|
|
164
|
+
val = rowType.get();
|
|
165
|
+
}
|
|
150
166
|
}
|
|
151
167
|
else {
|
|
152
168
|
throw new Error("HashedTable, buildHashFromSimple, unexpected type");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/runtime",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.162",
|
|
4
4
|
"description": "Transpiler - Runtime",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"author": "abaplint",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@types/chai": "^4.3.
|
|
32
|
+
"@types/chai": "^4.3.12",
|
|
33
33
|
"@types/mocha": "^10.0.6",
|
|
34
34
|
"chai": "^4.4.1",
|
|
35
35
|
"mocha": "^10.3.0",
|