Index: runtime/vm/parser.cc |
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc |
index f5d8a8947d11f276ba17cf32ddbf5721f7988248..bba923f953b752711f0061c3f22e3877d1cc09c6 100644 |
--- a/runtime/vm/parser.cc |
+++ b/runtime/vm/parser.cc |
@@ -3274,7 +3274,7 @@ SequenceNode* Parser::ParseFunc(const Function& func, bool check_semicolon) { |
// Populate function scope with the formal parameters. |
AddFormalParamsToScope(¶ms, current_block_->scope); |
- if (I->flags().type_checks() && |
+ if (I->type_checks() && |
(current_block_->scope->function_level() > 0)) { |
// We are parsing, but not compiling, a local function. |
// The instantiator may be required at run time for generic type checks. |
@@ -7462,7 +7462,7 @@ AstNode* Parser::ParseVariableDeclarationList() { |
bool is_final = (CurrentToken() == Token::kFINAL); |
bool is_const = (CurrentToken() == Token::kCONST); |
const AbstractType& type = AbstractType::ZoneHandle(Z, |
- ParseConstFinalVarOrType(I->flags().type_checks() ? |
+ ParseConstFinalVarOrType(I->type_checks() ? |
ClassFinalizer::kCanonicalize : ClassFinalizer::kIgnore)); |
if (!IsIdentifier()) { |
ReportError("identifier expected"); |
@@ -8530,7 +8530,7 @@ AstNode* Parser::ParseAwaitForStatement(String* label_name) { |
// position, which is inside the loop body. |
new_loop_var = true; |
loop_var_type = ParseConstFinalVarOrType( |
- I->flags().type_checks() ? ClassFinalizer::kCanonicalize : |
+ I->type_checks() ? ClassFinalizer::kCanonicalize : |
ClassFinalizer::kIgnore); |
} |
TokenPosition loop_var_pos = TokenPos(); |
@@ -8824,7 +8824,7 @@ AstNode* Parser::ParseForInStatement(TokenPosition forin_pos, |
// position, which is inside the loop body. |
new_loop_var = true; |
loop_var_type = ParseConstFinalVarOrType( |
- I->flags().type_checks() ? ClassFinalizer::kCanonicalize : |
+ I->type_checks() ? ClassFinalizer::kCanonicalize : |
ClassFinalizer::kIgnore); |
loop_var_name = ExpectIdentifier("variable name expected"); |
} |
@@ -9043,7 +9043,7 @@ AstNode* Parser::ParseAssertStatement() { |
ConsumeToken(); // Consume assert keyword. |
ExpectToken(Token::kLPAREN); |
const TokenPosition condition_pos = TokenPos(); |
- if (!I->flags().asserts()) { |
+ if (!I->asserts()) { |
SkipExpr(); |
ExpectToken(Token::kRPAREN); |
return NULL; |
@@ -12650,7 +12650,7 @@ AstNode* Parser::ParseListLiteral(TokenPosition type_pos, |
"include a type variable"); |
} |
} else { |
- if (I->flags().error_on_bad_type()) { |
+ if (I->error_on_bad_type()) { |
ReportError(type_pos, |
"a list literal takes one type argument specifying " |
"the element type"); |
@@ -12673,7 +12673,7 @@ AstNode* Parser::ParseListLiteral(TokenPosition type_pos, |
while (CurrentToken() != Token::kRBRACK) { |
const TokenPosition element_pos = TokenPos(); |
AstNode* element = ParseExpr(is_const, kConsumeCascades); |
- if (I->flags().type_checks() && |
+ if (I->type_checks() && |
!is_const && |
!element_type.IsDynamicType()) { |
element = new(Z) AssignableNode(element_pos, |
@@ -12704,7 +12704,7 @@ AstNode* Parser::ParseListLiteral(TokenPosition type_pos, |
// Arguments have been evaluated to a literal value already. |
ASSERT(elem->IsLiteralNode()); |
ASSERT(!is_top_level_); // We cannot check unresolved types. |
- if (I->flags().type_checks() && |
+ if (I->type_checks() && |
!element_type.IsDynamicType() && |
(!elem->AsLiteralNode()->literal().IsNull() && |
!elem->AsLiteralNode()->literal().IsInstanceOf( |
@@ -12856,7 +12856,7 @@ AstNode* Parser::ParseMapLiteral(TokenPosition type_pos, |
"include a type variable"); |
} |
} else { |
- if (I->flags().error_on_bad_type()) { |
+ if (I->error_on_bad_type()) { |
ReportError(type_pos, |
"a map literal takes two type arguments specifying " |
"the key type and the value type"); |
@@ -12875,7 +12875,7 @@ AstNode* Parser::ParseMapLiteral(TokenPosition type_pos, |
const bool saved_mode = SetAllowFunctionLiterals(true); |
const TokenPosition key_pos = TokenPos(); |
AstNode* key = ParseExpr(is_const, kConsumeCascades); |
- if (I->flags().type_checks() && |
+ if (I->type_checks() && |
!is_const && |
!key_type.IsDynamicType()) { |
key = new(Z) AssignableNode( |
@@ -12898,7 +12898,7 @@ AstNode* Parser::ParseMapLiteral(TokenPosition type_pos, |
const TokenPosition value_pos = TokenPos(); |
AstNode* value = ParseExpr(is_const, kConsumeCascades); |
SetAllowFunctionLiterals(saved_mode); |
- if (I->flags().type_checks() && |
+ if (I->type_checks() && |
!is_const && |
!value_type.IsDynamicType()) { |
value = new(Z) AssignableNode( |
@@ -12930,7 +12930,7 @@ AstNode* Parser::ParseMapLiteral(TokenPosition type_pos, |
// Arguments have been evaluated to a literal value already. |
ASSERT(arg->IsLiteralNode()); |
ASSERT(!is_top_level_); // We cannot check unresolved types. |
- if (I->flags().type_checks()) { |
+ if (I->type_checks()) { |
if ((i % 2) == 0) { |
// Check key type. |
arg_type = key_type.raw(); |
@@ -13432,7 +13432,7 @@ AstNode* Parser::ParseNewOperator(Token::Kind op_kind) { |
} |
return ThrowTypeError(redirect_type.token_pos(), redirect_type); |
} |
- if (I->flags().type_checks() && |
+ if (I->type_checks() && |
!redirect_type.IsSubtypeOf(type, NULL, NULL, Heap::kOld)) { |
// Additional type checking of the result is necessary. |
type_bound = type.raw(); |