Index: runtime/vm/parser.cc |
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc |
index c7ee84e5214a821988dd74836764d49809f7e2cd..4ac7cf369b6cb4d45409872146340c6bc6cc195a 100644 |
--- a/runtime/vm/parser.cc |
+++ b/runtime/vm/parser.cc |
@@ -4238,7 +4238,7 @@ void Parser::ParseMethodOrConstructor(ClassDesc* members, MemberDesc* method) { |
// the one in the patched class. |
method->metadata_pos = TokenPosition::kNoSource; |
} |
- if (FLAG_enable_mirrors && (method->metadata_pos.IsReal())) { |
+ if (method->metadata_pos.IsReal()) { |
library_.AddFunctionMetadata(func, method->metadata_pos); |
} |
if (method->has_native) { |
@@ -4345,7 +4345,7 @@ void Parser::ParseFieldDefinition(ClassDesc* members, MemberDesc* field) { |
// All fields in the patch class are added to the patched class. |
field->metadata_pos = TokenPosition::kNoSource; |
} |
- if (FLAG_enable_mirrors && (field->metadata_pos.IsReal())) { |
+ if ((field->metadata_pos.IsReal())) { |
library_.AddFieldMetadata(class_field, field->metadata_pos); |
} |
@@ -4730,7 +4730,7 @@ void Parser::ParseEnumDeclaration(const GrowableObjectArray& pending_classes, |
library_.AddClass(cls); |
cls.set_is_synthesized_class(); |
cls.set_is_enum_class(); |
- if (FLAG_enable_mirrors && (metadata_pos.IsReal())) { |
+ if (metadata_pos.IsReal()) { |
library_.AddClassMetadata(cls, tl_owner, metadata_pos); |
} |
cls.set_super_type(Type::Handle(Z, Type::ObjectType())); |
@@ -4847,7 +4847,7 @@ void Parser::ParseClassDeclaration(const GrowableObjectArray& pending_classes, |
if (is_abstract) { |
cls.set_is_abstract(); |
} |
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) { |
+ if (metadata_pos.IsReal()) { |
library_.AddClassMetadata(cls, tl_owner, metadata_pos); |
} |
@@ -5335,7 +5335,7 @@ void Parser::ParseMixinAppAlias(const GrowableObjectArray& pending_classes, |
} |
ExpectSemicolon(); |
pending_classes.Add(mixin_application, Heap::kOld); |
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) { |
+ if (metadata_pos.IsReal()) { |
library_.AddClassMetadata(mixin_application, tl_owner, metadata_pos); |
} |
} |
@@ -5483,7 +5483,7 @@ void Parser::ParseTypedef(const GrowableObjectArray& pending_classes, |
// checked in the class finalizer for illegal self references. |
ASSERT(!function_type_alias.is_finalized()); |
pending_classes.Add(function_type_alias, Heap::kOld); |
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) { |
+ if (metadata_pos.IsReal()) { |
library_.AddClassMetadata(function_type_alias, tl_owner, metadata_pos); |
} |
} |
@@ -5652,7 +5652,7 @@ void Parser::ParseTypeParameters(bool parameterizing_class) { |
index, type_parameter_name, type_parameter_bound, declaration_pos); |
type_parameters_array.Add( |
&AbstractType::ZoneHandle(Z, type_parameter.raw())); |
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) { |
+ if (metadata_pos.IsReal()) { |
library_.AddTypeParameterMetadata(type_parameter, metadata_pos); |
} |
index++; |
@@ -5814,7 +5814,7 @@ void Parser::ParseTopLevelVariable(TopLevel* top_level, |
field.SetStaticValue(Object::null_instance(), true); |
top_level->AddField(field); |
library_.AddObject(field, var_name); |
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) { |
+ if (metadata_pos.IsReal()) { |
library_.AddFieldMetadata(field, metadata_pos); |
} |
if (CurrentToken() == Token::kASSIGN) { |
@@ -6012,7 +6012,7 @@ void Parser::ParseTopLevelFunction(TopLevel* top_level, |
toplevel_cls.RemoveFunction(replaced_func); |
library_.ReplaceObject(func, func_name); |
} |
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) { |
+ if (metadata_pos.IsReal()) { |
library_.AddFunctionMetadata(func, metadata_pos); |
} |
} |
@@ -6172,7 +6172,7 @@ void Parser::ParseTopLevelAccessor(TopLevel* top_level, |
toplevel_cls.RemoveFunction(replaced_func); |
library_.ReplaceObject(func, accessor_name); |
} |
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) { |
+ if (metadata_pos.IsReal()) { |
library_.AddFunctionMetadata(func, metadata_pos); |
} |
} |
@@ -6381,7 +6381,7 @@ void Parser::ParseLibraryImportExport(const Object& tl_owner, |
Namespace& ns = |
Namespace::Handle(Z, Namespace::New(library, show_names, hide_names)); |
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) { |
+ if (metadata_pos.IsReal()) { |
ns.AddMetadata(tl_owner, metadata_pos); |
} |
@@ -6468,7 +6468,7 @@ void Parser::ParseLibraryDefinition(const Object& tl_owner) { |
ReportError("patch cannot override library name"); |
} |
ParseLibraryName(); |
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) { |
+ if (metadata_pos.IsReal()) { |
library_.AddLibraryMetadata(tl_owner, metadata_pos); |
} |
rewind_pos = TokenPos(); |
@@ -8050,7 +8050,7 @@ AstNode* Parser::ParseFunctionStatement(bool is_literal) { |
// The result type may refer to the function's type parameters, |
// but was not parsed in the scope of the function. Adjust. |
result_type.SetScopeFunction(function); |
- if (FLAG_enable_mirrors && metadata_pos.IsReal()) { |
+ if (metadata_pos.IsReal()) { |
library_.AddFunctionMetadata(function, metadata_pos); |
} |
} |