Home
last modified time | relevance | path

Searched full:field (Results 1 – 25 of 1028) sorted by relevance

12345678910>>...42

/arkcompiler/ets_frontend/ets2panda/test/runtime/ets/
Dgetter_setter2.sts19 get field(): int {
23 set field(field: int): void {
24 this._field = field;
32 objectos.field += 10;
33 assert objectos.field == 40;
35 objectos.field -= 200;
36 assert objectos.field == -160;
38 objectos.field += 260;
39 objectos.field *= 10;
40 assert objectos.field == 1000;
[all …]
Dgetter_setter.sts20 get field(): int {
24 set field(a: int): void {
40 let h = obj.field;
42 let z = obj.field + obj.field;
44 let u = obj.field + 10;
46 let i = 10 + obj.field;
49 obj.field = 10;
50 let k = obj.field;
53 obj.field = obj.field;
54 k = obj.field;
[all …]
DMutatorAccessor.sts23 get field(): int {
27 set field(a: int): void {
43 let get_field = obj.field;
46 get_field = obj.field + obj.field;
49 get_field = obj.field + 10;
52 get_field = 10 + obj.field;
55 obj.field = 10;
56 get_field = obj.field;
59 obj.field = obj.field;
60 get_field = obj.field;
[all …]
Dlocal-class-standard-example2.sts17 field: number = 1234 // Not visible for the local class
23 field: string
28 … console.log ("Instance field = " + this.field + " par = " + parameter + " loc = " + local )
29 assert(this.field == "`instance method instance field value`")
34 field: string = "`instance method instance field value`"
36 console.log ("Static field = " + LocalClass.s_field)
37 assert(LocalClass.s_field == "`instance method class/static field value`")
39 static s_field: string = "`instance method class/static field value`"
51 field: string
56 … console.log ("Instance field = " + this.field + " par = " + parameter + " loc = " + local)
[all …]
Dlocal-class-standard-example1.sts20 field: string; // and a property
25 … console.log ("Instance field = " + this.field + " par = " + parameter + " loc = " + local )
26 assert(this.field == "`instance field value`")
30 field: string = "`instance field value`"
32 console.log ("Static field = " + LocalClass.s_field)
33 assert(LocalClass.s_field == "`class/static field value`")
36 static s_field: string = "`class/static field value`"
/arkcompiler/ets_frontend/merge_abc/src/
DassemblyFieldProto.cpp19 void Field::Serialize(const panda::pandasm::Field &field, protoPanda::Field &protoField) in Serialize() argument
22 Type::Serialize(field.type, *protoType); in Serialize()
23 protoField.set_name(field.name); in Serialize()
25 FieldMetadata::Serialize(*field.metadata, *protoFieldmeta); in Serialize()
26 protoField.set_lineofdef(field.line_of_def); in Serialize()
27 protoField.set_wholeline(field.whole_line); in Serialize()
28 protoField.set_boundleft(field.bound_left); in Serialize()
29 protoField.set_boundright(field.bound_right); in Serialize()
30 protoField.set_isdefined(field.is_defined); in Serialize()
33 void Field::Deserialize(const protoPanda::Field &protoField, panda::pandasm::Field &field, in Deserialize() argument
[all …]
/arkcompiler/runtime_core/panda_guard/util/
Djson_util.h29 * Obtain the content of a JSON object with a field type of object
31 * @param field field name in json object
33 …c panda::JsonObject *GetJsonObject(const panda::JsonObject *object, const std::string_view &field);
36 * Obtain the content of a JSON object with a field type of string
38 * @param field field name in json object
39 * @param optionalField Optional field, default to true (optional). When the field is false,
40 * if there is no information about the field in the JSON object, an error will be reported
42 … static std::string GetStringValue(const panda::JsonObject *object, const std::string_view &field,
46 * Obtain the content of a JSON object with a field type of double
48 * @param field field name in json object
[all …]
Djson_util.cpp25 std::optional<T> GetJsonValue(const panda::JsonObject *object, const std::string_view &field) in GetJsonValue() argument
27 auto value = object->GetValue<T>(field.data()); in GetJsonValue()
35 …nda::guard::JsonUtil::GetJsonObject(const panda::JsonObject *object, const std::string_view &field) in GetJsonObject() argument
37 auto value = object->GetValue<panda::JsonObject::JsonObjPointer>(field.data()); in GetJsonObject()
44 …da::guard::JsonUtil::GetStringValue(const panda::JsonObject *object, const std::string_view &field, in GetStringValue() argument
47 auto result = GetJsonValue<panda::JsonObject::StringT>(object, field); in GetStringValue()
52 "fail to obtain required field: " << field << " from json file"); in GetStringValue()
56 …da::guard::JsonUtil::GetDoubleValue(const panda::JsonObject *object, const std::string_view &field, in GetDoubleValue() argument
59 auto result = GetJsonValue<panda::JsonObject::NumT>(object, field); in GetDoubleValue()
64 "fail to obtain required field: " << field << " from json file"); in GetDoubleValue()
[all …]
/arkcompiler/runtime_core/static_core/abc2program/
Dabc_field_processor.cpp32 pandasm::Field field(keyData_.GetFileLanguage()); in FillProgramData() local
33 FillFieldData(field); in FillProgramData()
37 …auto retField = std::find_if(fieldList.begin(), fieldList.end(), [&field](pandasm::Field &fieldFro… in FillProgramData()
38 return field.name == fieldFromList.name; in FillProgramData()
41 fieldList.push_back(std::move(field)); in FillProgramData()
45 record_.fieldList.emplace_back(std::move(field)); in FillProgramData()
48 void AbcFieldProcessor::FillFieldData(pandasm::Field &field) in FillFieldData() argument
50 FillFieldName(field); in FillFieldData()
51 FillFieldType(field); in FillFieldData()
52 FillFieldMetaData(field); in FillFieldData()
[all …]
Dabc_field_processor.h32 void FillFieldData(pandasm::Field &field);
33 void FillFieldName(pandasm::Field &field);
34 void FillFieldType(pandasm::Field &field);
35 void FillFieldMetaData(pandasm::Field &field);
/arkcompiler/runtime_core/libabckit/src/include_v2/cpp/headers/arkts/
Dfield.h19 #include "../core/field.h"
24 * @brief Field
26 class Field final : public core::Field {
29 friend class abckit::core::Field;
30 /// @brief abckit::DefaultHash<Field>
31 friend class abckit::DefaultHash<Field>;
35 * @brief Construct a new Field object
38 Field(const Field &other) = default;
43 * @return Field&
45 Field &operator=(const Field &other) = default;
[all …]
/arkcompiler/runtime_core/libabckit/src/include_v2/cpp/headers/core/
Dfield.h20 #include "../../../c/isa/field.h"
25 * @brief Field
27 class Field : public View<AbckitCoreField *> {
33 /// @brief abckit::DefaultHash<Field>
34 friend class abckit::DefaultHash<Field>;
38 using CoreViewT = Field;
42 * @brief Construct a new Field object
45 Field(const Field &other) = default;
50 * @return Field&
52 Field &operator=(const Field &other) = default;
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/mock/
Dfinal_field_native_test.cpp68 ets_field field = env->GetStaticp_field(testClass, "boolean_value_final", "Z"); in TEST_F() local
69 ASSERT_NE(field, nullptr); in TEST_F()
70 ASSERT_EQ(env->GetStaticBooleanField(testClass, field), ETS_TRUE); in TEST_F()
72 field = env->GetStaticp_field(testClass, "byte_value_final", "B"); in TEST_F()
73 ASSERT_NE(field, nullptr); in TEST_F()
74 ASSERT_EQ(env->GetStaticByteField(testClass, field), 2_I); in TEST_F()
76 field = env->GetStaticp_field(testClass, "short_value_final", "S"); in TEST_F()
77 ASSERT_NE(field, nullptr); in TEST_F()
78 ASSERT_EQ(env->GetStaticShortField(testClass, field), 256_I); in TEST_F()
80 field = env->GetStaticp_field(testClass, "char_value_final", "C"); in TEST_F()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/interop_js/ets_proxy/
Dets_field_wrapper.h24 #include "runtime/include/field.h"
33 class Field; variable
47 Field *GetField() const in GetField()
60 napi_property_descriptor MakeInstanceProperty(EtsClassWrapper *owner, Field *field);
61 napi_property_descriptor MakeStaticProperty(EtsClassWrapper *owner, Field *field);
69 …EtsFieldWrapper(EtsClassWrapper *owner, Field *field) : owner_(owner), field_(field), lazyRefconve… in EtsFieldWrapper() argument
73 if (field->IsStatic()) { in EtsFieldWrapper()
81 Field *field_ {};
82 TypedPointer<const Field, JSRefConvert> lazyRefconvertLink_ {};
/arkcompiler/ets_frontend/ets2panda/linter/test/main/
Dsendable_explicit_field_type.ts.json544 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)",
554 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)",
564 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)",
574 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)",
584 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)",
594 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)",
604 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)",
624 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)",
634 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)",
644 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)",
[all …]
Dobject_literals_3.ts23 field: "world",
33 field: 1,
43 field: "world",
55 field: "world", property
65 field: 1, property
75 field: "world", property
87 field: "world",
97 field: 1,
107 field: "world",
119 field: "world",
[all …]
Ddelete_operator.sts17 field: any;
20 const f0 = (o: T0) => delete o.field;
23 field: unknown;
26 const f1 = (o: T1) => delete o.field;
29 field: never;
32 const f2 = (o: T2) => delete o.field;
35 field?: number;
38 const f3 = (o: T3) => delete o.field;
41 field: number;
44 const f4 = (o: T4) => delete o.field;
/arkcompiler/runtime_core/static_core/runtime/include/coretypes/
Dclass.h53 T GetFieldPrimitive(const Field &field) const in GetFieldPrimitive() argument
55 return klass_.GetFieldPrimitive<T>(field); in GetFieldPrimitive()
59 void SetFieldPrimitive(const Field &field, T value) in SetFieldPrimitive() argument
61 klass_.SetFieldPrimitive(field, value); in SetFieldPrimitive()
65 ObjectHeader *GetFieldObject(const Field &field) const in GetFieldObject() argument
67 return klass_.GetFieldObject<NEED_READ_BARRIER>(field); in GetFieldObject()
71 void SetFieldObject(const Field &field, ObjectHeader *value) in SetFieldObject() argument
73 klass_.SetFieldObject<NEED_WRITE_BARRIER>(field, value); in SetFieldObject()
95 // Klass field has variable size so it must be last
/arkcompiler/runtime_core/tests/cts-generator/cts-template/
Dldobj.v.obj.yaml95 title: Get field from object to register
97 Get field value from an object by field id and put it into register.
245 …iption: Check that verifier reports error when the field doesn't resolve to a non-static object fi…
274 # resolves to a static object field
286 # resolves to a non-existing object field
306 # resolves to a field name in a wrong object
327 …description: Check that verifier reports an error when the field resolves to a field with size or …
397 …description: Check that field value is loaded from field into register. More tests on ldobj.v.obj …
399 description: Get field value from an object by field id and put it into register.
408 # store null into Q type field
[all …]
Dldobj.obj.yaml95 title: Get field from object to accumulator
97 Get field value from an object by field id and put it into accumulator.
251 …iption: Check that verifier reports error when the field doesn't resolve to a non-static object fi…
280 # resolves to a static object field
292 # resolves to a non-existing object field
312 # resolves to a field name in a wrong object
333 …description: Check that verifier reports an error when the field resolves to a field with size or …
400 …description: Check that accumulator value is loaded from field into accumulator. More tests on ldo…
402 description: Get field value from an object by field id and put it into accumulator.
411 # store null into Q type field
[all …]
Dldstatic.obj.yaml94 title: Get static field
96 Get static field value by field_id and put it into accumulator.
104 …scription: Check that verifier reports error when the field doesn't resolve to a static valid field
216 …description: Check that verifier reports an error when the field resolves to a field with size or …
255 …description: Check that verifier reports an error when the field resolves to a field with size or …
288 …description: Check that accumulator value is loaded from field into accumulator in PandaAssembly c…
290 description: Get static field value by field_id and put it into accumulator.
297 # store null into Q type field
301 # store null into Q[] type field
305 # store R object into R type field
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/types/
Dets_field.h20 #include "runtime/include/field.h"
48 Field *GetRuntimeField() in GetRuntimeField()
88 static EtsField *FromRuntimeField(Field *field) in FromRuntimeField() argument
90 return reinterpret_cast<EtsField *>(field); in FromRuntimeField()
93 static const EtsField *FromRuntimeField(const Field *field) in FromRuntimeField() argument
95 return reinterpret_cast<const EtsField *>(field); in FromRuntimeField()
98 Field *GetCoreType() in GetCoreType()
100 return reinterpret_cast<Field *>(this); in GetCoreType()
103 const Field *GetCoreType() const in GetCoreType()
105 return reinterpret_cast<const Field *>(this); in GetCoreType()
/arkcompiler/runtime_core/static_core/plugins/ets/isa/
Disa.yaml69 - title: Get field from object by name
71 Get field value from an object by field name field_id and put it into accumulator.
72 …If field type size is less than 32, then loaded value is sign or zero extended to i32 depending on…
83 field = resolve_field_by_name(field_id)
84 if field != null then
85 if op == ets.ldobj.name and size(field) < 32 then
86 acc = extendto32(vs.get(field))
88 acc = vs.get(field)
120 - title: Store accumulator content into object field by name
122 Store accumulator content into object field by field name field_id.
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/intrinsics/
Dcompiler_intrinsics.cpp30 void LookUpException(ark::Class *klass, Field *rawField) in LookUpException()
34 … auto errorMsg = "Class " + ark::ConvertToString(klass->GetName()) + " does not have field and " + in LookUpException()
46 Field *TryGetField(ark::Method *method, Field *rawField, uint32_t pc, ark::Class *klass) in TryGetField()
53 auto *res = cache->template Get<Field>(address, method); in TryGetField()
59 auto field = klass->LookupFieldByName(rawField->GetName()); in TryGetField() local
60 if (field != nullptr && useIc) { in TryGetField()
61 cache->template Set(address, field, method); in TryGetField()
63 return field; in TryGetField()
67 ark::Method *TryGetCallee(ark::Method *method, Field *rawField, uint32_t pc, ark::Class *klass) in TryGetCallee()
96 static T GetFieldPrimitiveType(Field *field, const VMHandle<ObjectHeader> &handleObj) in GetFieldPrimitiveType() argument
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/doc/spec/
D9_classes.rst45 field
58 Field, method, accessor and constructor declarations can have the following
66 A newly declared field can shadow a field declared in a superclass or
83 field declaration
176 field: number
177 constructor (p: number) { this.field = p }
184 result, a constructor for the abstract class, and field initializers
192 field initializer
194 non-static field
200 field: number
[all …]

12345678910>>...42