/arkcompiler/ets_runtime/ecmascript/ |
D | date_parse.cpp | 24 DateProxy proxy(&reader); in ParseDateString() local 28 bool isIso = IsIsoDateTime(&proxy, &dayValue); in ParseDateString() 31 result = ParseIsoDateTime(&proxy, &dayValue, &timeValue, &timeZone); in ParseDateString() 33 result = ParseLegacyDates(&proxy, &dayValue, &timeValue, &timeZone); in ParseDateString() 43 bool DateParse::IsIsoDateTime(DateProxy *proxy, DayValue *dayValue) in IsIsoDateTime() argument 45 if (proxy->GetDate().IsSign()) { in IsIsoDateTime() 46 DateUnit sign = proxy->NextDate(); in IsIsoDateTime() 47 if (!proxy->GetDate().IsSixDecimalDigit()) { in IsIsoDateTime() 50 int signYear = proxy->NextDate().GetValue(); in IsIsoDateTime() 58 } else if (proxy->GetDate().IsFourDecimalDigit()) { in IsIsoDateTime() [all …]
|
D | js_proxy.h | 32 static JSTaggedValue GetPrototype(JSThread *thread, const JSHandle<JSProxy> &proxy); 34 …static bool SetPrototype(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTagged… 36 static bool IsExtensible(JSThread *thread, const JSHandle<JSProxy> &proxy); 38 static bool PreventExtensions(JSThread *thread, const JSHandle<JSProxy> &proxy); 40 …static bool GetOwnProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTagg… 43 …static bool DefineOwnProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JST… 46 …static bool HasProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTaggedV… 48 static inline OperationResult GetProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, in GetProperty() argument 51 return GetProperty(thread, proxy, key, JSHandle<JSTaggedValue>::Cast(proxy)); in GetProperty() 53 static OperationResult GetProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, [all …]
|
D | js_proxy.cpp | 50 JSTaggedValue JSProxy::GetPrototype(JSThread *thread, const JSHandle<JSProxy> &proxy) in GetPrototype() argument 55 JSHandle<JSTaggedValue> handler(thread, proxy->GetHandler()); in GetPrototype() 63 JSHandle<JSTaggedValue> targetHandle(thread, proxy->GetTarget()); in GetPrototype() 110 bool JSProxy::SetPrototype(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTagge… in SetPrototype() argument 117 JSTaggedValue handler = proxy->GetHandler(); in SetPrototype() 125 JSHandle<JSTaggedValue> targetHandle(thread, proxy->GetTarget()); in SetPrototype() 136 JSHandle<JSTaggedValue> handlerTag(thread, proxy->GetHandler()); in SetPrototype() 173 bool JSProxy::IsExtensible(JSThread *thread, const JSHandle<JSProxy> &proxy) in IsExtensible() argument 178 JSTaggedValue handler = proxy->GetHandler(); in IsExtensible() 186 JSHandle<JSTaggedValue> targetHandle(thread, proxy->GetTarget()); in IsExtensible() [all …]
|
/arkcompiler/ets_runtime/test/moduletest/container/ |
D | container_lightweightmap.js | 28 let proxy = new Proxy(map, {}); variable 30 res.set("test isEmpty:", proxy.isEmpty()); 31 proxy.set("a", "aa"); 32 proxy.set("b", "bb"); 35 res.set("test get:", proxy.length == 2 && proxy.get("a") == "aa" && proxy.get("b") == "bb"); 37 …res.set("test hasKey and hasValue:", proxy.hasKey("a") && proxy.hasKey("b") && proxy.hasValue("aa"… 38 proxy.hasValue("bb") && !proxy.hasKey("c") && !proxy.hasValue("cc")); 40 proxy.set("c", "cc"); 42 …res.set("test getIndexOfKey and getIndexOfValue:", proxy.getIndexOfKey("a") === 0 && proxy.getInde… 44 res.set("test getKeyAt:", proxy.getKeyAt(1) == "b"); [all …]
|
D | container_treeset.js | 110 let proxy = new Proxy(set1, {}); variable 111 proxy.add("aa"); 112 proxy.add("bb"); 115 … map.set("test has:", proxy.length == 2 && proxy.has("aa") && proxy.has("bb") && !proxy.has("cc")); 117 proxy.add("cc"); 119 …map.set("test getFirstKey and getLastKey:", proxy.getFirstValue() == "aa" && proxy.getLastValue() … 121 map.set("test getLowerValue and getHigherValue", proxy.getLowerValue("bb") == "aa" && 122 proxy.getLowerValue("aa") == undefined && proxy.getHigherValue("bb") == "cc" && 123 proxy.getHigherValue("cc") == undefined); 126 let iteratorSetValues1 = proxy.values(); [all …]
|
D | container_plainarray.js | 28 let proxy = new Proxy(plainArray, {}); variable 31 proxy.add(0, "0") 32 proxy.add(1, "1") 33 proxy.add(2, "2") 34 proxy.add(3, "3") 35 proxy.add(4, "4") 36 proxy.add(5, "5") 39 if (proxy[i] !== testArray[i]) { 44 map.set("test plainarray length:", proxy.length === 6) 45 map.set("test plainarray has:", proxy.has(2)) [all …]
|
D | container_treemap.js | 98 let proxy = new Proxy(map1, {}); variable 101 res.set("test proxy isEmpty true:", proxy.isEmpty() == true) 103 proxy.set("a", "aa"); 104 proxy.set("b", "bb"); 107 res.set("test proxy isEmpty false:", proxy.isEmpty() == false) 110 res.set("test get:", proxy.length == 2 && proxy.get("a") == "aa" && proxy.get("b") == "bb"); 112 …res.set("test hasKey and hasValue:", proxy.hasKey("a") && proxy.hasKey("b") && proxy.hasValue("aa"… 113 proxy.hasValue("bb") && !proxy.hasKey("c") && !proxy.hasValue("cc")); 115 proxy.set("c", "cc"); 117 …res.set("test getFirstKey and getLastKey:", proxy.getFirstKey() == "a" && proxy.getLastKey() == "c… [all …]
|
D | container_hashset.js | 84 let proxy = new Proxy(set1, {}); variable 85 proxy.add("aa"); 86 proxy.add("bb"); 89 … map.set("test has:", proxy.length == 2 && proxy.has("aa") && proxy.has("bb") && !proxy.has("cc")); 91 proxy.add("cc"); 94 let iteratorSetValues1 = proxy.values(); 98 let iteratorSetEntries1 = proxy.entries(); 107 for (const item of proxy) { 113 for (const item in proxy) { 118 proxy.forEach((i, d) => { [all …]
|
D | container_lightweightset.js | 28 let proxy = new Proxy(set, {}); variable 30 res.set("test isEmpty:", proxy.isEmpty()); 31 proxy.add(1); 32 proxy.add(2); 33 proxy.add(3); 35 res.set("test has 1:", proxy.has(1)); 36 res.set("test has 2:", proxy.has(2)); 37 res.set("test has 3:", proxy.has(3)); 39 res.set("test has 4:", proxy.has(4) == false); 41 let iteratorValues1 = proxy.values(); [all …]
|
D | container_hashmap.js | 115 let proxy = new Proxy(map1, {}); variable 118 res.set("test proxy isEmpty ture:", proxy.isEmpty() == true) 120 proxy.set("a", "aa"); 121 proxy.set("b", "bb"); 124 res.set("test proxy isEmpty false:", proxy.isEmpty() == false) 127 res.set("test get:", proxy.length == 2 && proxy.get("a") == "aa" && proxy.get("b") == "bb"); 129 …res.set("test hasKey and hasValue:", proxy.hasKey("a") && proxy.hasKey("b") && proxy.hasValue("aa"… 130 proxy.hasValue("bb") && !proxy.hasKey("c") && !proxy.hasValue("cc")); 132 proxy.set("c", "cc"); 134 let iteratorKey1 = proxy.keys(); [all …]
|
D | container_arraylist.js | 48 let proxy = new Proxy(arr1, {}); variable 52 proxy.add(i) 57 if (proxy[i] !== testArray[i]) { 63 map.set("test arraylist has:", proxy.has(2)) 64 map.set("test arraylist getCapacity:", proxy.getCapacity() === 15) 65 map.set("test arraylist getLastIndexOf:", proxy.getLastIndexOf(1) === 1) 66 map.set("test arraylist getIndexOf:", proxy.getIndexOf(5) === 5) 68 let array = proxy.convertToArray() 78 let newArrayList = proxy.clone() 87 proxy.insert(999, 3) [all …]
|
D | container_vector.js | 84 let proxy = new Proxy(vector1, {}); variable 88 proxy.add(i) 93 if (proxy[i] !== testArray[i]) { 99 map.set("test vector has:", proxy.has(2)) 100 map.set("test vector getCapacity:", proxy.getCapacity() === 10) 101 map.set("test vector getLastIndexOf:", proxy.getLastIndexOf(1) === 1) 102 map.set("test vector getIndexOf:", proxy.getIndexOf(5) === 5) 103 map.set("test vector getFirstElement:", proxy.getFirstElement() === 0) 104 map.set("test vector getLastElement:", proxy.getLastElement() === 9) 105 map.set("test vector getLastIndexFrom:", proxy.getLastIndexFrom(1, 5) === 1) [all …]
|
D | container_deque.js | 26 let proxy = new Proxy(deque, {}); variable 34 proxy.insertFront(i) 39 if (proxy[i] !== testArray[i]) { 46 proxy.insertEnd(i) 52 if (proxy[i] !== testArray[i]) { 59 proxy.forEach((i, d) => { 69 for (const data of proxy) { 77 let itr = proxy[Symbol.iterator](); 85 for (let k = 0; k < proxy.length; k++) { 92 map.set("test deque has:", proxy.has(7)) [all …]
|
D | container_stack.js | 26 let proxy = new Proxy(stack, {}); variable 32 map.set("test proxy isEmpty ture:", proxy.isEmpty() == true) 35 proxy.push(i) 40 map.set("test proxy isEmpty false:", proxy.isEmpty() == false) 44 if (proxy[i] !== testArray[i]) { 51 proxy.forEach((i, d) => { 61 for (const data of proxy) { 69 let itr = proxy[Symbol.iterator](); 77 for (let k = 0; k < proxy.length; k++) { 84 map.set("test stack peek:", proxy.peek() === 9) [all …]
|
D | container_linked_list.js | 159 let proxy = new Proxy(list2, {}); variable 162 proxy.add(i) 165 map.set("test linkedlist has:", proxy.has(8)) 166 map.set("test linkedlist not has:", proxy.has(2)) 167 map.set("test linkedlist getLastIndexOf:", proxy.getLastIndexOf(1) === 1) 168 map.set("test linkedlist getIndexOf:", proxy.getIndexOf(5) === 5) 170 proxy.removeByIndex(9) 175 if (proxy[i] !== testArray2[i]) { 181 const removeRes1 = proxy.remove(8) 185 if (proxy[i] !== testArray2[i]) { [all …]
|
D | container_list.js | 200 let proxy = new Proxy(list3, {}); variable 201 map.set("test list proxy isEmpty1:", proxy.isEmpty() === true); 204 proxy.add(i) 209 map.set("test list proxy isEmpty2:", proxy.isEmpty() === false); 210 map.set("test list get 1:", proxy.get(1) === 1) 211 map.set("test list get Math.trunc:", proxy.get(s) === 1) 212 map.set("test list has:", proxy.has(8)) 213 map.set("test list not has:", proxy.has(123) === false) 223 proxy.add(10) 225 map.set("test list equal:", proxy.equal(proxy1) === false) [all …]
|
D | container_queue.js | 26 let proxy = new Proxy(queue, {}); variable 31 proxy.add(i) 37 if (proxy[i] !== testArray[i]) { 44 proxy.forEach((i, d) => { 54 for (const data of proxy) { 62 let itr = proxy[Symbol.iterator](); 70 for (let k = 0; k < proxy.length; k++) { 77 map.set("test queue popFirst:", proxy.getFirst() === 0) 78 map.set("test queue pop:", proxy.pop() === 0)
|
/arkcompiler/ets_runtime/ecmascript/builtins/ |
D | builtins_proxy.cpp | 40 …JSHandle<JSProxy> proxy = JSProxy::ProxyCreate(argv->GetThread(), GetCallArg(argv, 0), GetCallArg(… in ProxyConstructor() local 42 return proxy.GetTaggedValue(); in ProxyConstructor() 54 … JSHandle<JSProxy> proxy = JSProxy::ProxyCreate(thread, GetCallArg(argv, 0), GetCallArg(argv, 1)); in Revocable() local 60 …<JSProxyRevocFunction> revoker = thread->GetEcmaVM()->GetFactory()->NewJSProxyRevocFunction(proxy); in Revocable() 70 JSObject::CreateDataProperty(thread, result, proxyKey, JSHandle<JSTaggedValue>(proxy)); in Revocable() 88 JSHandle<JSTaggedValue> proxy = GetConstructor(argv); in InvalidateProxyFunction() local 89 JSProxyRevocFunction::ProxyRevocFunctions(thread, JSHandle<JSProxyRevocFunction>(proxy)); in InvalidateProxyFunction()
|
/arkcompiler/ets_runtime/test/moduletest/objecthasownproperty/ |
D | objecthasownproperty.js | 68 var proxy = new Proxy(person, { variable 77 print(proxy.name); 78 print(proxy.age); 79 print(proxy.hasOwnProperty('name')); 80 print(proxy.hasOwnProperty('age'));
|
/arkcompiler/ets_runtime/test/moduletest/regressproxy/ |
D | regressproxy.js | 22 var proxy = new Proxy({}, {}); 25 trySet(proxy); 26 trySet(proxy);
|
/arkcompiler/ets_runtime/test/moduletest/forin/ |
D | forin.js | 110 const proxy = new Proxy(new Array(100), obj); constant 111 for (const i in proxy) {} 122 const proxy = new Proxy([7], C); constant 123 for (const v in proxy) {
|
/arkcompiler/ets_runtime/test/aottest/instanceof/ |
D | instanceof.ts | 72 const proxy = new Proxy(foo, {}); constant 77 print(f instanceof proxy); // true 88 const proxy = new Proxy( target, {}); constant 89 print(proxy instanceof A);
|
/arkcompiler/ets_runtime/test/moduletest/assignproxy/ |
D | assignproxy.js | 23 var proxy = new Proxy({"cc":"dd", "ee":"ff"}, { variable 30 Object.assign({1:2, "aa":"bb"}, proxy);
|
/arkcompiler/ets_runtime/test/aottest/optimized_call/ |
D | optimized_call.ts | 27 const proxy = new Proxy(sum, object); constant 28 print(proxy(1, 2, 3));
|
/arkcompiler/ets_runtime/test/moduletest/bindfunction/ |
D | bindfunction.js | 82 const proxy = new Proxy(Array.prototype.includes, {}); 83 const bind_proxy = proxy.bind();
|