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

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

Issue 1712563006: Cleanup access to guarded_fields (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « runtime/vm/parser.h ('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 #include "vm/flags.h" 6 #include "vm/flags.h"
7 7
8 #ifndef DART_PRECOMPILED_RUNTIME 8 #ifndef DART_PRECOMPILED_RUNTIME
9 9
10 #include "lib/invocation_mirror.h" 10 #include "lib/invocation_mirror.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 TypeArguments::Handle(TypeArguments::New(objs.length())); 153 TypeArguments::Handle(TypeArguments::New(objs.length()));
154 for (int i = 0; i < objs.length(); i++) { 154 for (int i = 0; i < objs.length(); i++) {
155 a.SetTypeAt(i, *objs.At(i)); 155 a.SetTypeAt(i, *objs.At(i));
156 } 156 }
157 // Cannot canonicalize TypeArgument yet as its types may not have been 157 // Cannot canonicalize TypeArgument yet as its types may not have been
158 // finalized yet. 158 // finalized yet.
159 return a.raw(); 159 return a.raw();
160 } 160 }
161 161
162 162
163 void ParsedFunction::AddToGuardedFields(const Field* field) const {
164 if ((field->guarded_cid() == kDynamicCid) ||
165 (field->guarded_cid() == kIllegalCid)) {
166 return;
167 }
168 for (intptr_t j = 0; j < guarded_fields_->length(); j++) {
169 if ((*guarded_fields_)[j]->raw() == field->raw()) {
170 return;
171 }
172 }
173 guarded_fields_->Add(field);
174 }
175
176
163 LocalVariable* ParsedFunction::EnsureExpressionTemp() { 177 LocalVariable* ParsedFunction::EnsureExpressionTemp() {
164 if (!has_expression_temp_var()) { 178 if (!has_expression_temp_var()) {
165 LocalVariable* temp = 179 LocalVariable* temp =
166 new (Z) LocalVariable(function_.token_pos(), 180 new (Z) LocalVariable(function_.token_pos(),
167 Symbols::ExprTemp(), 181 Symbols::ExprTemp(),
168 Object::dynamic_type()); 182 Object::dynamic_type());
169 ASSERT(temp != NULL); 183 ASSERT(temp != NULL);
170 set_expression_temp_var(temp); 184 set_expression_temp_var(temp);
171 } 185 }
172 ASSERT(has_expression_temp_var()); 186 ASSERT(has_expression_temp_var());
(...skipping 14161 matching lines...) Expand 10 before | Expand all | Expand 10 after
14334 14348
14335 14349
14336 namespace dart { 14350 namespace dart {
14337 14351
14338 DEFINE_FLAG(bool, enable_mirrors, true, 14352 DEFINE_FLAG(bool, enable_mirrors, true,
14339 "Disable to make importing dart:mirrors an error."); 14353 "Disable to make importing dart:mirrors an error.");
14340 DEFINE_FLAG(bool, load_deferred_eagerly, false, 14354 DEFINE_FLAG(bool, load_deferred_eagerly, false,
14341 "Load deferred libraries eagerly."); 14355 "Load deferred libraries eagerly.");
14342 DEFINE_FLAG(bool, link_natives_lazily, false, "Link native calls lazily"); 14356 DEFINE_FLAG(bool, link_natives_lazily, false, "Link native calls lazily");
14343 14357
14358
14359 void ParsedFunction::AddToGuardedFields(const Field* field) const {
14360 UNREACHABLE();
14361 }
14362
14363
14344 LocalVariable* ParsedFunction::EnsureExpressionTemp() { 14364 LocalVariable* ParsedFunction::EnsureExpressionTemp() {
14345 UNREACHABLE(); 14365 UNREACHABLE();
14346 return NULL; 14366 return NULL;
14347 } 14367 }
14348 14368
14349 14369
14350 void ParsedFunction::SetNodeSequence(SequenceNode* node_sequence) { 14370 void ParsedFunction::SetNodeSequence(SequenceNode* node_sequence) {
14351 UNREACHABLE(); 14371 UNREACHABLE();
14352 } 14372 }
14353 14373
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
14408 const ArgumentListNode& function_args, 14428 const ArgumentListNode& function_args,
14409 const LocalVariable* temp_for_last_arg, 14429 const LocalVariable* temp_for_last_arg,
14410 bool is_super_invocation) { 14430 bool is_super_invocation) {
14411 UNREACHABLE(); 14431 UNREACHABLE();
14412 return NULL; 14432 return NULL;
14413 } 14433 }
14414 14434
14415 } // namespace dart 14435 } // namespace dart
14416 14436
14417 #endif // DART_PRECOMPILED_RUNTIME 14437 #endif // DART_PRECOMPILED_RUNTIME
OLDNEW
« no previous file with comments | « runtime/vm/parser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698