@abaplint/core 2.101.14 → 2.101.15
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/abaplint.d.ts +11 -1
- package/build/adhoc/syntax_performance.d.ts +1 -0
- package/build/adhoc/syntax_performance.js +15 -0
- package/build/adhoc/typed_array.d.ts +20 -0
- package/build/adhoc/typed_array.js +47 -0
- package/build/src/abap/5_syntax/_builtin.js +173 -173
- package/build/src/abap/5_syntax/_type_utils.js +1 -1
- package/build/src/abap/5_syntax/expressions/constant.js +4 -3
- package/build/src/abap/5_syntax/expressions/inline_loop_definition.js +1 -1
- package/build/src/abap/5_syntax/expressions/method_call_param.js +1 -1
- package/build/src/abap/5_syntax/expressions/source.js +2 -2
- package/build/src/abap/5_syntax/expressions/string_template.js +2 -2
- package/build/src/abap/5_syntax/statements/concatenate.js +26 -4
- package/build/src/abap/5_syntax/statements/controls.js +6 -6
- package/build/src/abap/5_syntax/statements/describe.js +3 -3
- package/build/src/abap/5_syntax/statements/find.js +10 -10
- package/build/src/abap/5_syntax/statements/get_bit.js +1 -1
- package/build/src/abap/5_syntax/statements/get_run_time.js +1 -1
- package/build/src/abap/5_syntax/statements/message.js +1 -1
- package/build/src/abap/5_syntax/statements/read_table.js +2 -2
- package/build/src/abap/5_syntax/statements/split.js +1 -1
- package/build/src/abap/5_syntax/structures/type_enum.js +2 -2
- package/build/src/abap/types/basic/integer_type.js +19 -0
- package/build/src/abap/types/basic/string_type.js +19 -0
- package/build/src/ddic.js +5 -4
- package/build/src/registry.js +1 -1
- package/build/src/rules/downport.js +4 -0
- package/package.json +3 -1
package/build/abaplint.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ declare abstract class AbstractObject implements IObject {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export declare abstract class AbstractType {
|
|
97
|
-
|
|
97
|
+
protected readonly data: AbstractTypeData | undefined;
|
|
98
98
|
constructor(input?: AbstractTypeData);
|
|
99
99
|
getAbstractTypeData(): AbstractTypeData | undefined;
|
|
100
100
|
/** fully qualified symbolic name of the type */
|
|
@@ -3350,6 +3350,11 @@ declare class Integer8Type extends AbstractType {
|
|
|
3350
3350
|
}
|
|
3351
3351
|
|
|
3352
3352
|
declare class IntegerType extends AbstractType {
|
|
3353
|
+
private static readonly singleton;
|
|
3354
|
+
static get(input?: AbstractTypeData): IntegerType;
|
|
3355
|
+
private constructor();
|
|
3356
|
+
/** fully qualified symbolic name of the type */
|
|
3357
|
+
getQualifiedName(): string | undefined;
|
|
3353
3358
|
toText(): string;
|
|
3354
3359
|
isGeneric(): boolean;
|
|
3355
3360
|
toABAP(): string;
|
|
@@ -5865,6 +5870,11 @@ declare class StringToken extends Token {
|
|
|
5865
5870
|
}
|
|
5866
5871
|
|
|
5867
5872
|
declare class StringType extends AbstractType {
|
|
5873
|
+
private static readonly singleton;
|
|
5874
|
+
static get(input?: AbstractTypeData): StringType;
|
|
5875
|
+
private constructor();
|
|
5876
|
+
/** fully qualified symbolic name of the type */
|
|
5877
|
+
getQualifiedName(): string | undefined;
|
|
5868
5878
|
toText(): string;
|
|
5869
5879
|
isGeneric(): boolean;
|
|
5870
5880
|
toABAP(): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const src_1 = require("../src");
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
console.log("========================");
|
|
6
|
+
const file1 = new src_1.MemoryFile("abapgit.prog.abap", fs.readFileSync("./lexer_performance.abap", "utf-8"));
|
|
7
|
+
// TODO, it needs the deps to give a correct result TODO
|
|
8
|
+
const reg = new src_1.Registry().addFile(file1).parse();
|
|
9
|
+
console.log("run syntax logc,");
|
|
10
|
+
const before = Date.now();
|
|
11
|
+
const res = new src_1.SyntaxLogic(reg, reg.getFirstObject()).run();
|
|
12
|
+
console.dir(res.issues);
|
|
13
|
+
const runtime = Date.now() - before;
|
|
14
|
+
console.log("Total: " + runtime + "ms");
|
|
15
|
+
//# sourceMappingURL=syntax_performance.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare class Token {
|
|
2
|
+
private readonly col;
|
|
3
|
+
private readonly row;
|
|
4
|
+
private readonly type;
|
|
5
|
+
private readonly str;
|
|
6
|
+
constructor(col: number, row: number, type: number, str: string);
|
|
7
|
+
get(): {
|
|
8
|
+
a: number;
|
|
9
|
+
b: number;
|
|
10
|
+
c: number;
|
|
11
|
+
d: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare class TokensMemory {
|
|
15
|
+
private readonly strings;
|
|
16
|
+
private readonly memory;
|
|
17
|
+
private length;
|
|
18
|
+
add(col: number, row: number, type: number, str: string): void;
|
|
19
|
+
}
|
|
20
|
+
declare const count = 5000000;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
class Token {
|
|
3
|
+
constructor(col, row, type, str) {
|
|
4
|
+
this.col = col;
|
|
5
|
+
this.row = row;
|
|
6
|
+
this.type = type;
|
|
7
|
+
this.str = str;
|
|
8
|
+
}
|
|
9
|
+
get() {
|
|
10
|
+
return { a: this.col, b: this.row, c: this.type, d: this.str };
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
class TokensMemory {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.strings = [];
|
|
16
|
+
this.memory = new Int32Array();
|
|
17
|
+
this.length = 0;
|
|
18
|
+
}
|
|
19
|
+
add(col, row, type, str) {
|
|
20
|
+
this.memory[0 + this.length] = col;
|
|
21
|
+
this.memory[1 + this.length] = row;
|
|
22
|
+
this.memory[2 + this.length] = type;
|
|
23
|
+
this.memory[3 + this.length] = this.strings.length;
|
|
24
|
+
this.strings.push(str);
|
|
25
|
+
this.length++;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const count = 5000000;
|
|
29
|
+
{
|
|
30
|
+
const start = Date.now();
|
|
31
|
+
const mem = new TokensMemory();
|
|
32
|
+
for (let i = 0; i < count; i++) {
|
|
33
|
+
mem.add(i, i, i, "dfs" + i);
|
|
34
|
+
}
|
|
35
|
+
const runtime = Date.now() - start;
|
|
36
|
+
console.log("Typed Array: " + runtime + "ms");
|
|
37
|
+
}
|
|
38
|
+
{
|
|
39
|
+
const start = Date.now();
|
|
40
|
+
const tokens = [];
|
|
41
|
+
for (let i = 0; i < count; i++) {
|
|
42
|
+
tokens.push(new Token(i, i, i, "dfs" + i));
|
|
43
|
+
}
|
|
44
|
+
const runtime = Date.now() - start;
|
|
45
|
+
console.log("Objects: " + runtime + "ms");
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=typed_array.js.map
|