Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Side by Side Diff: runtime/vm/parser.cc

Issue 300763002: Don't require eliminating certain type checks in unoptimized compilation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/parser.h" 5 #include "vm/parser.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 catch_trace_var = new LocalVariable(token_pos, 1129 catch_trace_var = new LocalVariable(token_pos,
1130 Symbols::StackTraceVar(), 1130 Symbols::StackTraceVar(),
1131 Type::ZoneHandle(Type::DynamicType())); 1131 Type::ZoneHandle(Type::DynamicType()));
1132 current_block_->scope->AddVariable(catch_trace_var); 1132 current_block_->scope->AddVariable(catch_trace_var);
1133 } 1133 }
1134 1134
1135 OpenBlock(); // Start try block. 1135 OpenBlock(); // Start try block.
1136 AstNode* expr = ParseExpr(kAllowConst, kConsumeCascades); 1136 AstNode* expr = ParseExpr(kAllowConst, kConsumeCascades);
1137 const Field& field = Field::ZoneHandle(func.saved_static_field()); 1137 const Field& field = Field::ZoneHandle(func.saved_static_field());
1138 ASSERT(!field.is_const()); 1138 ASSERT(!field.is_const());
1139 if (FLAG_enable_type_checks) {
1140 expr = new AssignableNode(
1141 field.token_pos(),
1142 expr,
1143 AbstractType::ZoneHandle(isolate(), field.type()),
1144 String::ZoneHandle(isolate(), field.name()));
1145 }
1139 StoreStaticFieldNode* store = new StoreStaticFieldNode(field.token_pos(), 1146 StoreStaticFieldNode* store = new StoreStaticFieldNode(field.token_pos(),
1140 field, 1147 field,
1141 expr); 1148 expr);
1142 current_block_->statements->Add(store); 1149 current_block_->statements->Add(store);
1143 SequenceNode* try_block = CloseBlock(); // End try block. 1150 SequenceNode* try_block = CloseBlock(); // End try block.
1144 1151
1145 OpenBlock(); // Start catch handler list. 1152 OpenBlock(); // Start catch handler list.
1146 OpenBlock(); // Start catch clause. 1153 OpenBlock(); // Start catch clause.
1147 AstNode* compare_transition_sentinel = new ComparisonNode( 1154 AstNode* compare_transition_sentinel = new ComparisonNode(
1148 token_pos, 1155 token_pos,
(...skipping 9861 matching lines...) Expand 10 before | Expand all | Expand 10 after
11010 void Parser::SkipQualIdent() { 11017 void Parser::SkipQualIdent() {
11011 ASSERT(IsIdentifier()); 11018 ASSERT(IsIdentifier());
11012 ConsumeToken(); 11019 ConsumeToken();
11013 if (CurrentToken() == Token::kPERIOD) { 11020 if (CurrentToken() == Token::kPERIOD) {
11014 ConsumeToken(); // Consume the kPERIOD token. 11021 ConsumeToken(); // Consume the kPERIOD token.
11015 ExpectIdentifier("identifier expected after '.'"); 11022 ExpectIdentifier("identifier expected after '.'");
11016 } 11023 }
11017 } 11024 }
11018 11025
11019 } // namespace dart 11026 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698