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

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

Issue 10790086: Minor cleanups: use GrowableArray::is_empty instead of ::length() == 0 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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/flow_graph_compiler.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 "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 this->num_fixed_parameters++; 437 this->num_fixed_parameters++;
438 ParamDesc param; 438 ParamDesc param;
439 param.name_pos = name_pos; 439 param.name_pos = name_pos;
440 param.name = &String::ZoneHandle(String::NewSymbol(name)); 440 param.name = &String::ZoneHandle(String::NewSymbol(name));
441 param.is_final = true; 441 param.is_final = true;
442 param.type = type; 442 param.type = type;
443 this->parameters->Add(param); 443 this->parameters->Add(param);
444 } 444 }
445 445
446 void AddReceiver(intptr_t name_pos) { 446 void AddReceiver(intptr_t name_pos) {
447 ASSERT(this->parameters->length() == 0); 447 ASSERT(this->parameters->is_empty());
448 // The receiver does not need to be type checked. 448 // The receiver does not need to be type checked.
449 AddFinalParameter(name_pos, 449 AddFinalParameter(name_pos,
450 kThisName, 450 kThisName,
451 &Type::ZoneHandle(Type::DynamicType())); 451 &Type::ZoneHandle(Type::DynamicType()));
452 } 452 }
453 453
454 void SetImplicitlyFinal() { 454 void SetImplicitlyFinal() {
455 implicitly_final = true; 455 implicitly_final = true;
456 } 456 }
457 457
(...skipping 8201 matching lines...) Expand 10 before | Expand all | Expand 10 after
8659 void Parser::SkipQualIdent() { 8659 void Parser::SkipQualIdent() {
8660 ASSERT(IsIdentifier()); 8660 ASSERT(IsIdentifier());
8661 ConsumeToken(); 8661 ConsumeToken();
8662 if (CurrentToken() == Token::kPERIOD) { 8662 if (CurrentToken() == Token::kPERIOD) {
8663 ConsumeToken(); // Consume the kPERIOD token. 8663 ConsumeToken(); // Consume the kPERIOD token.
8664 ExpectIdentifier("identifier expected after '.'"); 8664 ExpectIdentifier("identifier expected after '.'");
8665 } 8665 }
8666 } 8666 }
8667 8667
8668 } // namespace dart 8668 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698