File tree Expand file tree Collapse file tree 4 files changed +2
-23
lines changed
Expand file tree Collapse file tree 4 files changed +2
-23
lines changed Original file line number Diff line number Diff line change @@ -1186,7 +1186,6 @@ private BslPrimitiveValue MakeAnnotationParameterValueConstant(AnnotationParamet
11861186 var parameterValue = MakeAnnotationParameterValueConstant ( parameter ) ;
11871187 runtimeValue . Parameters . Add ( new BslAnnotationParameter ( parameter . Name , parameterValue ) ) ;
11881188 }
1189- var constNumber = CreateAnnotationConstDefinition ( runtimeValue ) ;
11901189 return runtimeValue ;
11911190 }
11921191 else
@@ -1203,12 +1202,6 @@ private BslPrimitiveValue MakeAnnotationParameterValueConstant(AnnotationParamet
12031202 }
12041203 }
12051204
1206- private int CreateAnnotationConstDefinition ( BslAnnotationValue runtimeValue )
1207- {
1208- var result = RegisterAnnotationConst ( runtimeValue ) ;
1209- return result ;
1210- }
1211-
12121205 private IEnumerable < BslAnnotationAttribute > GetAnnotations ( AnnotatableNode parent )
12131206 {
12141207 return parent . Annotations . Select ( a =>
@@ -1268,13 +1261,6 @@ private int GetConstNumber(in ConstDefinition cDef)
12681261 return idx ;
12691262 }
12701263
1271- private int RegisterAnnotationConst ( BslAnnotationValue value )
1272- {
1273- var idx = _module . AnnotationValues . Count ;
1274- _module . AnnotationValues . Add ( value ) ;
1275- return idx ;
1276- }
1277-
12781264 private int GetMethodRefNumber ( in SymbolBinding methodBinding )
12791265 {
12801266 var idx = _module . MethodRefs . IndexOf ( methodBinding ) ;
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ This Source Code Form is subject to the terms of the
55at http://mozilla.org/MPL/2.0/.
66----------------------------------------------------------*/
77using System ;
8- using System . Text ;
98
109namespace ScriptEngine . Machine
1110{
@@ -14,7 +13,6 @@ public struct AnnotationDefinition
1413 {
1514 public string Name ;
1615 public AnnotationParameter [ ] Parameters ;
17-
18- public int ParamCount => Parameters ? . Length ?? 0 ;
16+ public readonly int ParamCount => Parameters ? . Length ?? 0 ;
1917 }
2018}
Original file line number Diff line number Diff line change @@ -16,11 +16,8 @@ public struct AnnotationParameter
1616
1717 [ NonSerialized ]
1818 public IValue RuntimeValue ;
19-
20- public const int UNDEFINED_VALUE_INDEX = - 1 ;
2119
22-
23- public override string ToString ( )
20+ public override readonly string ToString ( )
2421 {
2522 var list = new List < string > ( ) ;
2623 if ( ! string . IsNullOrEmpty ( Name ) )
Original file line number Diff line number Diff line change @@ -31,8 +31,6 @@ public StackRuntimeModule(Type ownerType)
3131 internal IList < SymbolBinding > VariableRefs { get ; } = new List < SymbolBinding > ( ) ;
3232
3333 internal IList < SymbolBinding > MethodRefs { get ; } = new List < SymbolBinding > ( ) ;
34-
35- internal IList < BslAnnotationValue > AnnotationValues { get ; } = new List < BslAnnotationValue > ( ) ;
3634
3735 #region IExecutableModule members
3836
You can’t perform that action at this time.
0 commit comments