Home
last modified time | relevance | path

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

12345678910>>...48

/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()
124String::CreateFromMUtf8(data1.data(), utf16Length1, GetLanguageContext(), Runtime::GetCurrent()->G… in TEST_F()
125 ASSERT_FALSE(String::StringsAreEqualMUtf8(firstString, data2.data(), utf16Length2)); in TEST_F()
135String::CreateFromMUtf8(data1.data(), utf16Length1, GetLanguageContext(), Runtime::GetCurrent()->G… in TEST_F()
136 ASSERT_FALSE(String::StringsAreEqualMUtf8(firstString, data2.data(), utf16Length2)); 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/ets_frontend/ets2panda/test/runtime/ets/
Dstring_from_nullish.sts20 let z3: Object = new String("0");
22 let x = new String(z)
23 let x1 = new String(z1)
24 let x2 = new String(z2)
25 let x3 = new String(z3)
26 let x4 = new String(z4)
27 let x5 = new String(null)
28 let x6 = new String(undefined)
29 …let actual: String[] = [new String(z), new String(z1), new String(z2), new String(z3), new String(…
30 let expected: String[] = ["1", "undefined", "null", "0", "1", "null", "undefined"]
DmostSpecificMethod.sts20 public Foo() : String {
24 public Bar() : String {
29 public Baz(x: A, y: B) : String {
33 public final Baz(x: A, y: A) : String {
39 public override Foo() : String {
43 public override Bar() : String {
47 public override Baz(x: A, y: B) : String {
53 public override Foo() : String {
57 public Baz(x: B, y: B) : String {
67 function Foo(x: A, y: B) : String { return "GLOBAL::Foo(A, B)"; }
[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,
51 …PANDA_PUBLIC_API static String *CreateFromMUtf8(const uint8_t *mutf8Data, const LanguageContext &c…
54 …static String *CreateFromMUtf8(const uint8_t *mutf8Data, uint32_t mutf8Length, uint32_t utf16Lengt…
57 PANDA_PUBLIC_API static String *CreateFromUtf8(const uint8_t *utf8Data, uint32_t utf8Length,
61 PANDA_PUBLIC_API static String *CreateFromUtf16(const uint16_t *utf16Data, uint32_t utf16Length,
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/escompat/
DRegExpReplaceFunctionTest.sts16 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/plugins/ets/tests/interop_js/tests/perf/
Dtest.sts24 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.sts27 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.sts20 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/runtime_core/static_core/plugins/ets/stdlib/escompat/
DRegExp.sts21 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 …]
/arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std/core/
DString.sts21 type StringOrRegExp = String | RegExp
26 export final class String extends Object implements Comparable<String>, JSONable<String>, Iterable<
30 * Constructs an empty String
35 * Constructs String from chars array initializer
42 * Constructs String from another String
46 public constructor(otherStr: String) {}
49 * Constructs String from NullishType
56 * Creates a new instance of a String
58 * @returns A new String instance
61 return new String();
[all …]
DExceptions.sts26 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 …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/std/core/
DStringConstructorTest.sts17 public toString(): String {
22 function isNotEqual(a: String, b: String) {
26 console.log("Incorrect String constructor!")
32 fails += isNotEqual(new String(new TestObject()), "abc")
33 fails += isNotEqual(new String(null), "null")
34 fails += isNotEqual(new String(undefined), "undefined")
35 fails += isNotEqual(new String(), "")
36 fails += isNotEqual(new String("aaba"), "aaba")
37 fails += isNotEqual(new String("aaba"), new String("aaba"))
39 fails += isNotEqual(new String(e), e.toString())
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/test_intrins/
Dtest_intrins.sts28 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/ets_test_suite/intrinsics/
Dstring_trim.sts43 const Wss: String =
48 const Empty: String = '';
49 const Ws: String = ' ';
50 const X: String = 'x';
51 const XWs: String = X + Ws;
52 const WsX: String = Ws + X;
53 const WsXWs: String = Ws + X + Ws;
54 const Xy: String = 'Xy';
55 const WsXy: String = Ws + 'Xy';
56 const XyWs: String = 'Xy' + Ws;
[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()
92 String *String::CreateFromMUtf8(const uint8_t *mutf8Data, uint32_t utf16Length, const LanguageConte… in CreateFromMUtf8()
102 String *String::CreateFromMUtf8(const uint8_t *mutf8Data, uint32_t utf16Length, bool canBeCompresse… in CreateFromMUtf8()
112 String *String::CreateFromMUtf8(const uint8_t *mutf8Data, const LanguageContext &ctx, PandaVM *vm, … in CreateFromMUtf8()
122 String *String::CreateFromMUtf8(const uint8_t *mutf8Data, uint32_t mutf8Length, uint32_t utf16Lengt… in CreateFromMUtf8()
131 String *String::CreateFromUtf8(const uint8_t *utf8Data, uint32_t utf8Length, const LanguageContext … in CreateFromUtf8()
134 coretypes::String *s = nullptr; in CreateFromUtf8()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/class_operations/
Dclass_operations.sts26 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>
20 .function void std.core.ETSGLOBAL.loadLibrary(std.core.String a0) <external>
21String a0, std.core.String a1, std.core.String a2, std.core.String a3, std.core.String a4, std.cor…
54 .function void EtsNapiTests.main(std.core.String[] a0) {
Dtypes-string-10.pa17 .record std.core.String <external>
20 .function void std.core.ETSGLOBAL.loadLibrary(std.core.String a0) <external>
21String a0, std.core.String a1, std.core.String a2, std.core.String a3, std.core.String a4, std.cor…
52 .function void EtsNapiTests.main(std.core.String[] a0) {
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/es_object/to_string/
Dtest_to_string_method.sts29 function vstringify(val: JSValue): String {
30 return StringifyValue(val) as String;
38 toString() : String {
54 function jsvalObjectToStr(): String {
57 let z: String = x.toString();
66 function implicitToString(): String {
73 function testFunctional1() : String {
77 function testFunctional2() : String {
81 function testNanCall() : String {
85 function testThrowing() : String {
[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/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/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, utf16Length, 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::CreateFromMUtf8(data, length, length, true, ctx, Runtime::GetCurrent()->GetPand… in CreateFromAscii()
93 coretypes::String::CreateEmptyString(ctx, Runtime::GetCurrent()->GetPandaVM())); in CreateFromUtf16()
99 coretypes::String *s = in CreateFromUtf16()
[all …]

12345678910>>...48