@@ -4238,7 +4238,7 @@ void Parser::ParseMethodOrConstructor(ClassDesc* members, MemberDesc* method) {
4238
4238
// the one in the patched class.
4239
4239
method->metadata_pos = TokenPosition::kNoSource;
4240
4240
}
4241
- if (FLAG_enable_mirrors && ( method->metadata_pos.IsReal() )) {
4241
+ if (method->metadata_pos.IsReal()) {
4242
4242
library_.AddFunctionMetadata(func, method->metadata_pos);
4243
4243
}
4244
4244
if (method->has_native) {
@@ -4345,7 +4345,7 @@ void Parser::ParseFieldDefinition(ClassDesc* members, MemberDesc* field) {
4345
4345
// All fields in the patch class are added to the patched class.
4346
4346
field->metadata_pos = TokenPosition::kNoSource;
4347
4347
}
4348
- if (FLAG_enable_mirrors && (field->metadata_pos.IsReal())) {
4348
+ if ((field->metadata_pos.IsReal())) {
4349
4349
library_.AddFieldMetadata(class_field, field->metadata_pos);
4350
4350
}
4351
4351
@@ -4730,7 +4730,7 @@ void Parser::ParseEnumDeclaration(const GrowableObjectArray& pending_classes,
4730
4730
library_.AddClass(cls);
4731
4731
cls.set_is_synthesized_class();
4732
4732
cls.set_is_enum_class();
4733
- if (FLAG_enable_mirrors && ( metadata_pos.IsReal() )) {
4733
+ if (metadata_pos.IsReal()) {
4734
4734
library_.AddClassMetadata(cls, tl_owner, metadata_pos);
4735
4735
}
4736
4736
cls.set_super_type(Type::Handle(Z, Type::ObjectType()));
@@ -4847,7 +4847,7 @@ void Parser::ParseClassDeclaration(const GrowableObjectArray& pending_classes,
4847
4847
if (is_abstract) {
4848
4848
cls.set_is_abstract();
4849
4849
}
4850
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) {
4850
+ if (metadata_pos.IsReal()) {
4851
4851
library_.AddClassMetadata(cls, tl_owner, metadata_pos);
4852
4852
}
4853
4853
@@ -5335,7 +5335,7 @@ void Parser::ParseMixinAppAlias(const GrowableObjectArray& pending_classes,
5335
5335
}
5336
5336
ExpectSemicolon();
5337
5337
pending_classes.Add(mixin_application, Heap::kOld);
5338
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) {
5338
+ if (metadata_pos.IsReal()) {
5339
5339
library_.AddClassMetadata(mixin_application, tl_owner, metadata_pos);
5340
5340
}
5341
5341
}
@@ -5483,7 +5483,7 @@ void Parser::ParseTypedef(const GrowableObjectArray& pending_classes,
5483
5483
// checked in the class finalizer for illegal self references.
5484
5484
ASSERT(!function_type_alias.is_finalized());
5485
5485
pending_classes.Add(function_type_alias, Heap::kOld);
5486
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) {
5486
+ if (metadata_pos.IsReal()) {
5487
5487
library_.AddClassMetadata(function_type_alias, tl_owner, metadata_pos);
5488
5488
}
5489
5489
}
@@ -5652,7 +5652,7 @@ void Parser::ParseTypeParameters(bool parameterizing_class) {
5652
5652
index, type_parameter_name, type_parameter_bound, declaration_pos);
5653
5653
type_parameters_array.Add(
5654
5654
&AbstractType::ZoneHandle(Z, type_parameter.raw()));
5655
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) {
5655
+ if (metadata_pos.IsReal()) {
5656
5656
library_.AddTypeParameterMetadata(type_parameter, metadata_pos);
5657
5657
}
5658
5658
index++;
@@ -5814,7 +5814,7 @@ void Parser::ParseTopLevelVariable(TopLevel* top_level,
5814
5814
field.SetStaticValue(Object::null_instance(), true);
5815
5815
top_level->AddField(field);
5816
5816
library_.AddObject(field, var_name);
5817
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) {
5817
+ if (metadata_pos.IsReal()) {
5818
5818
library_.AddFieldMetadata(field, metadata_pos);
5819
5819
}
5820
5820
if (CurrentToken() == Token::kASSIGN) {
@@ -6012,7 +6012,7 @@ void Parser::ParseTopLevelFunction(TopLevel* top_level,
6012
6012
toplevel_cls.RemoveFunction(replaced_func);
6013
6013
library_.ReplaceObject(func, func_name);
6014
6014
}
6015
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) {
6015
+ if (metadata_pos.IsReal()) {
6016
6016
library_.AddFunctionMetadata(func, metadata_pos);
6017
6017
}
6018
6018
}
@@ -6172,7 +6172,7 @@ void Parser::ParseTopLevelAccessor(TopLevel* top_level,
6172
6172
toplevel_cls.RemoveFunction(replaced_func);
6173
6173
library_.ReplaceObject(func, accessor_name);
6174
6174
}
6175
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) {
6175
+ if (metadata_pos.IsReal()) {
6176
6176
library_.AddFunctionMetadata(func, metadata_pos);
6177
6177
}
6178
6178
}
@@ -6381,7 +6381,7 @@ void Parser::ParseLibraryImportExport(const Object& tl_owner,
6381
6381
6382
6382
Namespace& ns =
6383
6383
Namespace::Handle(Z, Namespace::New(library, show_names, hide_names));
6384
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) {
6384
+ if (metadata_pos.IsReal()) {
6385
6385
ns.AddMetadata(tl_owner, metadata_pos);
6386
6386
}
6387
6387
@@ -6468,7 +6468,7 @@ void Parser::ParseLibraryDefinition(const Object& tl_owner) {
6468
6468
ReportError("patch cannot override library name");
6469
6469
}
6470
6470
ParseLibraryName();
6471
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) {
6471
+ if (metadata_pos.IsReal()) {
6472
6472
library_.AddLibraryMetadata(tl_owner, metadata_pos);
6473
6473
}
6474
6474
rewind_pos = TokenPos();
@@ -8050,7 +8050,7 @@ AstNode* Parser::ParseFunctionStatement(bool is_literal) {
8050
8050
// The result type may refer to the function's type parameters,
8051
8051
// but was not parsed in the scope of the function. Adjust.
8052
8052
result_type.SetScopeFunction(function);
8053
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) {
8053
+ if (metadata_pos.IsReal()) {
8054
8054
library_.AddFunctionMetadata(function, metadata_pos);
8055
8055
}
8056
8056
}
0 commit comments