Home
last modified time | relevance | path

Searched full:annotation (Results 1 – 25 of 204) sorted by relevance

123456789

/arkcompiler/runtime_core/static_core/plugins/ets/doc/spec/
D18_annotations.rst18 An *annotation* is a special language element that changes the semantics of
21 The example below illustrates the declaring and using of an annotation:
26 // Annotation declaration:
31 // Annotation use:
35 The annotation *ClassAuthor* in the example above adds meta information to
38 An annotation must be placed immediately before the declaration it is applied to.
39 An annotation can include arguments as in the example above.
41 For an annotation to be used, the name of the annotation must be prefixed with
51 A :index:`compile-time error` occurs if the annotation name is not accessible
52 at the place of usage. An annotation declaration can be exported and used in
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/doc/annotations/
Dannotations.rst16 An *annotation* is a special language element that changes the semantics of
19 The example below illustrates the declaring and using of an annotation:
24 // Annotation declaration:
29 // Annotation use:
33 The annotation *ClassAuthor* in the example above adds meta information to
36 An annotation must be placed immediately before the declaration it is applied to.
37 The annotation usage can include arguments as in the example above.
39 For an annotation to be used, its name must be prefixed with the symbol ``@``
49 A compile-time error occurs if the annotation
50 name is not accessible at the place of usage. An annotation declaration can be
[all …]
Danno2.txt24 Such annotation will be used by the compiler.
27 As an example of such annotation, the annotation ``@Deprecated``
37 The annotation ``@Deprecated`` indicates that the annotated declaration is
46 The annotation ``@Deprecated`` has no argument.
70 denotes the plugin name of the annotation.
75 annotation:
93 - Does plugin define syntax of annotation usage syntax?
/arkcompiler/ets_frontend/ets2panda/linter/test/
Dsendable_explicit_field_type.ts.json386 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)"
393 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)"
400 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)"
407 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)"
414 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)"
421 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)"
428 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)"
442 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)"
449 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)"
456 … "rule": "Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)"
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/assembler/extension/
Dmetadata.yaml49 - name: annotation
62 - name: annotation.type
71 - name: annotation.class
80 - name: annotation.id
89 - name: annotation.element.type
108 - value: annotation
116 - name: annotation.element.array.component.type
134 - value: annotation
141 - name: annotation.element.name
150 - name: annotation.element.value
Dets_meta.h27 return attribute == "ets.annotation.class"; in IsAnnotationRecordAttribute()
32 return attribute == "ets.annotation.id"; in IsAnnotationIdAttribute()
37 return attribute == "ets.annotation.element.type"; in IsAnnotationElementTypeAttribute()
42 return attribute == "ets.annotation.element.array.component.type"; in IsAnnotationElementArrayComponentTypeAttribute()
47 return attribute == "ets.annotation.element.name"; in IsAnnotationElementNameAttribute()
52 return attribute == "ets.annotation.element.value"; in IsAnnotationElementValueAttribute()
80 auto type = GetAttributeValue("ets.annotation.type"); in IsRuntimeAnnotation()
90 auto type = GetAttributeValue("ets.annotation.type"); in IsTypeAnnotation()
/arkcompiler/runtime_core/docs/
Dassembly_format.md81 * All keys are unique within a single annotation list.
160 | `java.annotation` | Used to specify that the record represents Java annotation. |
161 | `java.annotation.type` | Used to specify type of annotation. Possible values: `class`, `runtime`.…
162 …va.annotation.class` | Used to specify annotation class. Allowed multiple definitions. Value is th…
163annotation.id` | Used to specify annotation id. Annotations with id are used as values of other an…
164annotation.element.name` | Used to specify name of the annotation element. `java.annotation.class`…
165annotation.element.type` | Used to specify type of the annotation element. `java.annotation.elemen…
166annotation.element.array.component.type` | Used to specify component type of the array annotation
167 ….annotation.element.value` | Used to specify value of the annotation element. Allowed multiple def…
183 .record A1 <java.annotation, java.annotation.type=runtime> {}
[all …]
Dfile_format.md179 | `ACC_ANNOTATION` | `0x2000` | Declared as an annotation type. |
294annotation of the field. The tag may be repeated in case the field has several annotations. The of…
295annotation of the field. The tag may be repeated in case the field has several annotations. The of…
296annotation of the field. The tag may be repeated in case the field has several annotations. The of…
297annotation of the field. The tag may be repeated in case the field has several annotations. The of…
363annotation of the method. The tag may be repeated in case the method has several annotations. The …
366ANNOTATION` | `0x06` | `>=0` | `uint8_t[4]` | Data represents the offset to…
368annotation of the method. The tag may be repeated in case the method has several annotations. The …
369annotation of the method. The tag may be repeated in case the method has several annotations. The …
405annotation of the class. The tag may be repeated in case the class has several annotations. The of…
[all …]
/arkcompiler/runtime_core/assembler/tests/
Decmascript_meta_test.cpp44 std::optional<pandasm::Metadata::Error> result2 = rmd.SetAttribute("ecmascript.annotation");
50 …std::optional<pandasm::Metadata::Error> result4 = rmd.SetAttributeValue("ecmascript.annotation", "…
52 EXPECT_EQ(result4->GetMessage(), "Attribute 'ecmascript.annotation' must not have a value");
59 std::optional<pandasm::Metadata::Error> result6 = rmd.SetAttribute("ecmascript.annotation");
61 EXPECT_EQ(result6->GetMessage(), "Attribute 'ecmascript.annotation' already defined");
78 rmd.SetAttribute("ecmascript.annotation");
81 EXPECT_TRUE(rmd.GetAttribute("ecmascript.annotation"));
87 rmd.RemoveAttribute("ecmascript.annotation");
88 EXPECT_FALSE(rmd.GetAttribute("ecmascript.annotation"));
97 rmd.SetAttribute("ecmascript.annotation");
[all …]
/arkcompiler/runtime_core/plugins/ecmascript/tests/
Decmascript_meta_test.cpp33 std::optional<pandasm::Metadata::Error> result2 = rmd.SetAttribute("ecmascript.annotation");
39 …std::optional<pandasm::Metadata::Error> result4 = rmd.SetAttributeValue("ecmascript.annotation", "…
41 ASSERT_EQ(result4->GetMessage(), "Attribute 'ecmascript.annotation' must not have a value");
48 std::optional<pandasm::Metadata::Error> result6 = rmd.SetAttribute("ecmascript.annotation");
50 ASSERT_EQ(result6->GetMessage(), "Attribute 'ecmascript.annotation' already defined");
58 rmd.SetAttribute("ecmascript.annotation");
61 ASSERT_TRUE(rmd.GetAttribute("ecmascript.annotation"));
67 rmd.RemoveAttribute("ecmascript.annotation");
68 ASSERT_FALSE(rmd.GetAttribute("ecmascript.annotation"));
/arkcompiler/runtime_core/assembler/
Dmeta.cpp56 {"class", VType::RECORD}, {"enum", VType::ENUM}, {"annotation", VType::ANNOTATION}, in GetType()
198 case Value::Type::ANNOTATION: {
201 … return Unexpected(Metadata::Error("Unknown annotation id", Metadata::Error::Type::INVALID_VALUE));
205 return ScalarValue::Create<Value::Type::ANNOTATION>(*annotation_value);
241 "'. Annotation element isn't completely defined", in Store()
257 "'. Annotation element isn't completely defined", in MeetExpRecordAttribute()
271 "'. Annotation record attribute must be defined first", in MeetExpIdAttribute()
277 "'. Annotation id attribute already defined", in MeetExpIdAttribute()
291 "'. Annotation record attribute must be defined first", in MeetExpElementNameAttribute()
297 "'. Previous annotation element isn't defined completely", in MeetExpElementNameAttribute()
[all …]
/arkcompiler/runtime_core/static_core/assembler/
Dmeta.cpp56 {"record", VType::RECORD}, {"enum", VType::ENUM}, {"annotation", VType::ANNOTATION}, in GetType()
199 case Value::Type::ANNOTATION: {
202 … return Unexpected(Metadata::Error("Unknown annotation id", Metadata::Error::Type::INVALID_VALUE));
206 return ScalarValue::Create<Value::Type::ANNOTATION>(*annotationValue);
241 "'. Annotation element isn't completely defined", in Store()
257 "'. Annotation element isn't completely defined", in MeetExpRecordAttribute()
271 "'. Annotation record attribute must be defined first", in MeetExpIdAttribute()
277 "'. Annotation id attribute already defined", in MeetExpIdAttribute()
291 "'. Annotation record attribute must be defined first", in MeetExpElementNameAttribute()
297 "'. Previous annotation element isn't defined completely", in MeetExpElementNameAttribute()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/disassembler/
Ddisasm_ets_plugin.cpp99 record->metadata->SetAttribute("ets.annotation"); in SetETSAttributes()
233 // 2 last characters are '[' & ']' if annotation is an array in EnumerateAnnotations()
243 if (isArray && elemCompType == "annotation") { in EnumerateAnnotations()
247 annList.push_back({"ets.annotation.type", type}); in EnumerateAnnotations()
250 annList.push_back({"ets.annotation.class", className}); in EnumerateAnnotations()
252 annList.push_back({"ets.annotation.id", "id_" + std::to_string(annotationId.GetOffset())}); in EnumerateAnnotations()
253 …annList.push_back({"ets.annotation.element.name", StringDataToString(file_->GetStringData(elemName… in EnumerateAnnotations()
257 annList.push_back({"ets.annotation.element.type", elemType}); in EnumerateAnnotations()
258 annList.push_back({"ets.annotation.element.array.component.type", elemCompType}); in EnumerateAnnotations()
262 …annList.push_back({"ets.annotation.element.value", ArrayValueToString(values, elemCompType, idx)}); in EnumerateAnnotations()
[all …]
/arkcompiler/runtime_core/abc2program/
Dabc_method_processor.cpp138 for (auto annotation : function_.metadata->GetAnnotations()) { in FillSlotsNum() local
139 if (annotation.GetName() == SLOT_NUMBER_RECORD_NAME && !annotation.GetElements().empty()) { in FillSlotsNum()
140 … uint32_t slots_num = annotation.GetElements()[0].GetValue()->GetAsScalar()->GetValue<uint32_t>(); in FillSlotsNum()
148 for (auto annotation : function_.metadata->GetAnnotations()) { in FillConcurrentModuleRequests() local
149 if (annotation.GetName() != CONCURRENT_MODULE_REQUEST_RECORD_NAME) { in FillConcurrentModuleRequests()
152 for (auto &elem : annotation.GetElements()) { in FillConcurrentModuleRequests()
/arkcompiler/runtime_core/disassembler/tests/
Ddisassembler_annotations_test.cpp24 static const std::string MODULE_REQUEST_FILE_NAME = GRAPH_TEST_ABC_DIR "module-requests-annotation-…
25 static const std::string SLOT_NUMBER_FILE_NAME = GRAPH_TEST_ABC_DIR "slot-number-annotation.abc";
48 * @tc.desc: get module request annotation of abc file.
54 static const std::string METHOD_NAME = "module-requests-annotation-import.#*#funcD";
66 * @tc.desc: get solt number annotation of abc file.
/arkcompiler/ets_frontend/ets2panda/ir/
Dexpression.cpp24 if (auto *const annotation = other.TypeAnnotation(); annotation != nullptr) { in AnnotatedExpression() local
25 SetTsTypeAnnotation(annotation->Clone(allocator, this)->AsTypeNode()); in AnnotatedExpression()
/arkcompiler/runtime_core/static_core/docs/
Dfile_format.md180 | `ACC_ANNOTATION` | `0x2000` | Declared as an annotation type. |
295annotation of the field. The tag may be repeated in case the field has several annotations. The of…
296annotation of the field. The tag may be repeated in case the field has several annotations. The of…
297annotation of the field. The tag may be repeated in case the field has several annotations. The of…
298annotation of the field. The tag may be repeated in case the field has several annotations. The of…
364annotation of the method. The tag may be repeated in case the method has several annotations. The …
367ANNOTATION` | `0x06` | `>=0` | `uint8_t[4]` | Data represents the offset to…
369annotation of the method. The tag may be repeated in case the method has several annotations. The …
370annotation of the method. The tag may be repeated in case the method has several annotations. The …
407annotation of the class. The tag may be repeated in case the class has several annotations. The of…
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/docs/rules/
Drecipe79.md1 # Type annotation in catch clause is not supported
7 In TypeScript, catch clause variable type annotation must be ``any`` or ``unknown``
/arkcompiler/runtime_core/assembler/extensions/
Decmascript_meta.cpp22 if (attribute == "ecmascript.annotation") { in Validate()
24 return Error("Attribute 'ecmascript.annotation' already defined", in Validate()
49 if (attribute == "ecmascript.annotation") { in Validate()
50 return Error("Attribute 'ecmascript.annotation' must not have a value", in Validate()
92 if (attribute == "ecmascript.annotation") { in SetFlags()
105 if (attribute == "ecmascript.annotation") { in RemoveFlags()
/arkcompiler/ets_frontend/ets2panda/test/runtime/ets/annotation_tests/
DAnnotationNoNeedToSetProperties01.sts16 // Annotation declaretion:
21 // Annotation use:
DMuti-AnnotationsDefineAndUseForClass.sts16 // Annotation declaretion:
25 // Annotation use:
DAnnotationsDefineAndUseForClass.sts16 // Annotation declaretion:
21 // Annotation use:
DAnnotationForFunction02.sts16 // Annotation declaretion:
21 // Annotation use:
DAnnotationForFunction01.sts16 // Annotation declaretion:
21 // Annotation use:
DAnnotationsFieldType01.sts16 // Annotation declaretion:
23 // Annotation use:

123456789