Home
last modified time | relevance | path

Searched refs:String (Results 1 – 25 of 898) sorted by relevance

12345678910>>...36

/arkcompiler/runtime_core/static_core/runtime/tests/
Dstring_test.cpp88String::CreateFromMUtf8(data.data(), utf16Length, GetLanguageContext(), Runtime::GetCurrent()->Get… in TEST_F()
89 ASSERT_TRUE(String::StringsAreEqualMUtf8(firstString, data.data(), utf16Length)); in TEST_F()
103String::CreateFromMUtf8(data.data(), utf16Length, GetLanguageContext(), Runtime::GetCurrent()->Get… in TEST_F()
104 ASSERT_TRUE(String::StringsAreEqualMUtf8(firstString, data.data(), utf16Length)); in TEST_F()
113String::CreateFromMUtf8(data1.data(), utf16Length, GetLanguageContext(), Runtime::GetCurrent()->Ge… in TEST_F()
114 ASSERT_FALSE(String::StringsAreEqualMUtf8(firstString, data2.data(), utf16Length)); in TEST_F()
123String::CreateFromMUtf8(data1.data(), utf16Length, GetLanguageContext(), Runtime::GetCurrent()->Ge… in TEST_F()
124 ASSERT_FALSE(String::StringsAreEqualMUtf8(firstString, data2.data(), utf16Length)); in TEST_F()
133String::CreateFromMUtf8(data1.data(), utf16Length, GetLanguageContext(), Runtime::GetCurrent()->Ge… in TEST_F()
134 ASSERT_FALSE(String::StringsAreEqualMUtf8(firstString, data2.data(), utf16Length)); in TEST_F()
[all …]
/arkcompiler/runtime_core/static_core/runtime/
Dstring_table.h38 virtual coretypes::String *GetOrInternString(const uint8_t *mutf8Data, uint32_t utf16Length,
40 virtual coretypes::String *GetOrInternString(const uint16_t *utf16Data, uint32_t utf16Length,
42 coretypes::String *GetOrInternString(coretypes::String *string, const LanguageContext &ctx);
44 …coretypes::String *GetOrInternInternalString(const panda_file::File &pf, panda_file::File::EntityI…
47 …coretypes::String *GetInternalStringFast(const panda_file::File &pf, panda_file::File::EntityId id) in GetInternalStringFast()
77 void PreBarrierOnGet(coretypes::String *str);
79 virtual coretypes::String *GetOrInternString(const uint8_t *mutf8Data, uint32_t utf16Length,
81 … virtual coretypes::String *GetOrInternString(const uint16_t *utf16Data, uint32_t utf16Length,
83 …virtual coretypes::String *GetOrInternString(coretypes::String *string, const LanguageContext &ctx…
92 … coretypes::String *GetString(const uint8_t *utf8Data, uint32_t utf16Length, bool canBeCompressed,
[all …]
Dstring_table.cpp24 coretypes::String *StringTable::GetOrInternString(const uint8_t *mutf8Data, uint32_t utf16Length, in GetOrInternString()
27 bool canBeCompressed = coretypes::String::CanBeCompressedMUtf8(mutf8Data); in GetOrInternString()
35 coretypes::String *StringTable::GetOrInternString(const uint16_t *utf16Data, uint32_t utf16Length, in GetOrInternString()
45 coretypes::String *StringTable::GetOrInternString(coretypes::String *string, const LanguageContext … in GetOrInternString()
54 coretypes::String *StringTable::GetOrInternInternalString(const panda_file::File &pf, panda_file::F… in GetOrInternInternalString()
61 coretypes::String *str = table_.GetString(data.data, data.utf16Length, data.isAscii, ctx); in GetOrInternInternalString()
92 coretypes::String *StringTable::Table::GetString(const uint8_t *utf8Data, uint32_t utf16Length, boo… in GetString()
95 …uint32_t hashCode = coretypes::String::ComputeHashcodeMutf8(utf8Data, utf16Length, canBeCompressed… in GetString()
99 …if (coretypes::String::StringsAreEqualMUtf8(foundString, utf8Data, utf16Length, canBeCompressed)) { in GetString()
106 coretypes::String *StringTable::Table::GetString(const uint16_t *utf16Data, uint32_t utf16Length, in GetString()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/escompat/
DRegExpReplaceFunctionTest.ets16 function test1(shor: String): int {
20 … let lambda : (str: String, args: Object[]) => String = (str: String, args: Object[]) : String => {
23 failure += checkTestResult(args[1] as String, shor)
33 function test2(shor: String): int {
37 … let lambda : (str: String, args: Object[]) => String = (str: String, args: Object[]) : String => {
40 failure += checkTestResult(args[1] as String, shor)
51 function test3(shor: String): int {
55 … let lambda : (str: String, args: Object[]) => String = (str: String, args: Object[]) : String => {
58 failure += checkTestResult(args[1] as String, shor)
68 function test4(shor: String): int {
[all …]
/arkcompiler/runtime_core/static_core/runtime/include/coretypes/
Dstring.h31 class String : public ObjectHeader {
33 static String *Cast(ObjectHeader *object) in Cast()
36 return static_cast<String *>(object); in Cast()
39 …PANDA_PUBLIC_API static String *CreateFromMUtf8(const uint8_t *mutf8Data, size_t mutf8Length, uint…
43 PANDA_PUBLIC_API static String *CreateFromMUtf8(const uint8_t *mutf8Data, uint32_t utf16Length,
47 PANDA_PUBLIC_API static String *CreateFromMUtf8(const uint8_t *mutf8Data, uint32_t utf16Length,
50 …PANDA_PUBLIC_API static String *CreateFromMUtf8(const uint8_t *mutf8Data, const LanguageContext &c…
53 PANDA_PUBLIC_API static String *CreateFromUtf8(const uint8_t *utf8Data, uint32_t utf8Length,
56 PANDA_PUBLIC_API static String *CreateFromUtf16(const uint16_t *utf16Data, uint32_t utf16Length,
59 PANDA_PUBLIC_API static String *CreateEmptyString(const LanguageContext &ctx, PandaVM *vm);
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/perf/
Dtest.ets24 native static void$(top: JSValue, qname: String): void;
26 …alue, qname: String, v0: String, v1: String, v2: String, v3: String, v4: String, v5: String, v6: S…
28 …native static void$10d(top: JSValue, qname: String, v0: double, v1: double, v2: double, v3: double…
30 native static str$(top: JSValue, qname: String): String;
31 native static any$(top: JSValue, qname: String): JSValue;
32 native static num$(top: JSValue, qname: String): double;
46 let u0: String = "foo0";
47 let u1: String = "foo1";
48 let u2: String = "foo2";
49 let u3: String = "foo3";
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std/containers/
DListString.ets27 pushFront(e: String): void;
34 popFront(): String;
41 pushBack(e: String): void;
48 popBack(): String;
64 at(index: int): String;
73 set(index: int, e: String): void;
82 has(e: String): boolean;
85 forEach(fn: (e: String): String): ListString;
86 map(fn: (e: String): ): ;
87 fold(combine: (lhs: String, rhs: String): String): String;
[all …]
DArrayAsListString.ets20 private init(capacity: int, val: String): void {
21 this.data = new String[capacity];
35 constructor(capacity: int, val: String) {
43 this.init(0, new String());
52 this.init(capacity, new String());
62 let newData = new String[capacity];
75 public toArray(): String[] {
76 let data = new String[this.curSize];
100 public override pushFront(e: String): void {
103 dst = new String[ArrayAsListString.getNewCapacity(this.data.length)];
[all …]
/arkcompiler/ets_frontend/ets2panda/test/runtime/ets/
DmostSpecificMethod.ets20 public Foo() : String {
24 public Bar() : String {
28 public Baz(x: A, y: B) : String {
32 public final Baz(x: B, y: B) : String {
38 public override Foo() : String {
42 public override Bar() : String {
46 public override Baz(x: A, y: B) : String {
52 public override Foo() : String {
56 public Baz(x: A, y: A) : String {
66 function Foo(x: A, y: B) : String { return "GLOBAL::Foo(A, B)"; }
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat/
DRegExp.ets21 export class RegExpExecArray /*extends Array<String>*/ {
27 readonly input: String
29 readonly result: String[]
43 public get(index: int): String {
54 public get(index: number): String {
62 constructor(index: int, input: String, result: String[], indices: number[][]) {
70 constructor(index: number, input: String, result: String[]) {
78 constructor(index: number, input: String, result: String[], indices: number[][]) {
87 private string: String
89 constructor(regexp: RegExp, string: String) {
[all …]
DErrors.ets30 constructor(message: String) {
37 constructor(message: String, cause: Object) {
54 constructor(s: String) {
59 constructor(s: String, cause: Object) {
74 constructor(s: String) {
79 constructor(s: String, cause: Object) {
94 constructor(s: String) {
99 constructor(s: String, cause: Object) {
114 constructor(s: String) {
119 constructor(s: String, cause: Object) {
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std/core/
DStdExceptions.ets26 constructor(s: String) {
30 constructor(s: String, cause: Object) {
44 constructor(s: String) {
48 constructor(s: String, cause: Object) {
61 constructor(s: String) {
65 constructor(s: String, cause: Object) {
78 constructor(s: String) {
82 constructor(s: String, cause: Object) {
95 constructor(s: String) {
99 constructor(s: String, cause: Object) {
[all …]
DString.ets21 type StringOrRegExp = String | RegExp
26 export class String extends Object implements Comparable<String>, JSONable<String> {
30 * Constructs an empty String
35 * Constructs String from chars array initializer
42 * Constructs String from another String
46 public constructor(otherStr: String) {}
49 * Checks equality of this string and another Object as String
82 * @param index index in char array inside String
91 public charAt(index: number): String {
94 return new String(c)
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/test_intrins/
Dtest_intrins.ets28 native static void$(top: JSValue, qname: String): void;
29 native static void$a(top: JSValue, qname: String, v0: JSValue): void;
30 native static void$an(top: JSValue, qname: String, a0: JSValue, a1: double): void;
31 native static void$n(top: JSValue, qname: String, v0: double): void;
32 native static void$s(top: JSValue, qname: String, v0: String): void;
34 native static bool$a(top: JSValue, qname: String, v0: JSValue): boolean;
36 native static num$a(top: JSValue, qname: String, v0: JSValue): double
37 native static num$an(top: JSValue, qname: String, a0: JSValue, a1: double): double;
38 native static num$ann(top: JSValue, qname: String, a0: JSValue, a1: double, a2: double): double;
39 native static num$nn(top: JSValue, qname: String, a0: double, a1: double): double;
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/stdlib-templates/escompat/
Descompat_Array_single.ets23 failures += check(testCreateFromString(), "Test Create Array object from String");
24 …failures += check(testCreateFromString1(), "Test Create Array object from String with mapping func…
25 …failures += check(testCreateFromString2(), "Test Create Array object from String with mapping func…
33 let src: String = "Hello World";
34 let test: Array<String> = Array.from(src);
42 let ac: char = (test.idx(i) as Object as String).charAt(0);
51 let src: String = "HELLO";
53 …let test: Array<String> = Array.from<String>(src, (item: String, k: int): String => { return item.…
58 let exp: String = "hello";
61 let tmp: String = test.idx(i) as Object as String; // <- verifier fails otherwise
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/types/
Dets_string.h28 class EtsString : private coretypes::String {
39 …coretypes::String *s = coretypes::String::CreateFromMUtf8(data, ctx, Runtime::GetCurrent()->GetPan… in CreateFromMUtf8()
49 coretypes::String::CreateEmptyString(ctx, Runtime::GetCurrent()->GetPandaVM())); in CreateFromMUtf8()
56 coretypes::String *s = in CreateFromMUtf8()
57 … coretypes::String::CreateFromMUtf8(data, length, ctx, Runtime::GetCurrent()->GetPandaVM()); in CreateFromMUtf8()
67 coretypes::String::CreateEmptyString(ctx, Runtime::GetCurrent()->GetPandaVM())); in CreateFromUtf8()
75 … coretypes::String::CreateFromUtf8(data, length, ctx, Runtime::GetCurrent()->GetPandaVM())); in CreateFromUtf8()
84 coretypes::String::CreateEmptyString(ctx, Runtime::GetCurrent()->GetPandaVM())); in CreateFromUtf16()
90 coretypes::String *s = in CreateFromUtf16()
91 … coretypes::String::CreateFromUtf16(utf16, length, ctx, Runtime::GetCurrent()->GetPandaVM()); in CreateFromUtf16()
[all …]
/arkcompiler/runtime_core/static_core/compiler/docs/
Dsimplify_sb_doc.md1 # String Builder optimizations
5 This set of optimizations targets String Builder usage specifics.
9 String Builder is used to construct a string out of smaller pieces. In some cases it is optimal to …
19 **Remove unnecessary String Builder**
23 let input: String = ...
29 let input: String = ...
33 **Replace String Builder with string concatenation**
35 String concatenation expressed as a plus-operator over string operands turned into a String Builder…
39 let a, b: String
45 let a, b: String
[all …]
/arkcompiler/runtime_core/static_core/runtime/coretypes/
Dstring.cpp32 bool String::compressedStringsEnabled_ = true;
35 String *String::CreateFromString(String *str, const LanguageContext &ctx, PandaVM *vm) in CreateFromString()
41 VMHandle<String> strHandle(thread, str); in CreateFromString()
68 String *String::CreateFromMUtf8(const uint8_t *mutf8Data, size_t mutf8Length, uint32_t utf16Length, in CreateFromMUtf8()
91 String *String::CreateFromMUtf8(const uint8_t *mutf8Data, uint32_t utf16Length, const LanguageConte… in CreateFromMUtf8()
99 String *String::CreateFromMUtf8(const uint8_t *mutf8Data, uint32_t utf16Length, bool canBeCompresse… in CreateFromMUtf8()
106 String *String::CreateFromMUtf8(const uint8_t *mutf8Data, const LanguageContext &ctx, PandaVM *vm, … in CreateFromMUtf8()
115 String *String::CreateFromUtf8(const uint8_t *utf8Data, uint32_t utf8Length, const LanguageContext … in CreateFromUtf8()
118 coretypes::String *s = nullptr; in CreateFromUtf8()
122 … s = coretypes::String::CreateFromMUtf8(utf8Data, utf8Length, utf16Length, true, ctx, vm, movable); in CreateFromUtf8()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/class_operations/
Dclass_operations.ets26 native static void$(top: JSValue, qname: String): void;
27 native static num$(top: JSValue, qname: String): double;
28 native static any$(top: JSValue, qname: String): JSValue;
29 native static any$(top: JSValue, qname: String, v0: JSValue): JSValue;
30 native static any$(top: JSValue, qname: String, v0: String): JSValue;
31 native static any$(top: JSValue, qname: String, v0: double, v1: String): JSValue;
32 native static any$(top: JSValue, qname: String, v0: int[], v1: int): JSValue;
34 native static any$a(top: JSValue, qname: String, v0: JSValue): JSValue;
36 native static str$(top: JSValue, qname: String): String;
37 native static str$(top: JSValue, qname: String, v0: String): String;
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/napi/bridges/pa/
Dtypes-string-11.pa17 .record std.core.String <external>
21 .function std.core.void std.core.ETSGLOBAL.loadLibrary(std.core.String a0) <external>
22String a0, std.core.String a1, std.core.String a2, std.core.String a3, std.core.String a4, std.cor…
55 .function void EtsNapiTests.main(std.core.String[] a0) {
Dtypes-string-10.pa17 .record std.core.String <external>
21 .function std.core.void std.core.ETSGLOBAL.loadLibrary(std.core.String a0) <external>
22String a0, std.core.String a1, std.core.String a2, std.core.String a3, std.core.String a4, std.cor…
53 .function void EtsNapiTests.main(std.core.String[] a0) {
/arkcompiler/runtime_core/static_core/pandastdlib/
Dpandastdlib.pa14 .record panda.String <external>
31 panda.String message
36 panda.String message
41 panda.String message
46 panda.String message
51 panda.String message
56 panda.String message
61 panda.String message
66 panda.String message
71 panda.String message
[all …]
/arkcompiler/runtime_core/static_core/tests/cts-assembly/
Dobj-14.pa14 .record panda.String <external>
16 .function void IO.printString(panda.String a0) <external>
20 # String[] v6 = new String[5];
22 # String[] s = allocString();
31 # String[] allocString() {
32 # String[] v1 = new String[1];
49 # String[] v1 = new String[1];
52 .function panda.String[] allocString(){
57 # v1 = new String[v0]
58 newarr v1, v0, panda.String[]
[all …]
/arkcompiler/runtime_core/tests/cts-assembly/
Dobj-14.pa14 .record panda.String <external>
16 .function void IO.printString(panda.String a0) <external>
20 # String[] v6 = new String[5];
22 # String[] s = allocString();
31 # String[] allocString() {
32 # String[] v1 = new String[1];
49 # String[] v1 = new String[1];
52 .function panda.String[] allocString(){
57 # v1 = new String[v0]
58 newarr v1, v0, panda.String[]
[all …]
/arkcompiler/runtime_core/pandastdlib/
Dpandastdlib.pa14 .record panda.String <external>
29 panda.String message
34 panda.String message
39 panda.String message
44 panda.String message
49 panda.String message
54 panda.String message
59 panda.String message
64 panda.String message
69 panda.String message
[all …]

12345678910>>...36