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

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

Issue 27020002: VM: Fix performance regression introduced by r28408. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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_builder.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 "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 8109 matching lines...) Expand 10 before | Expand all | Expand 10 after
8120 return initializing_getter; 8120 return initializing_getter;
8121 } 8121 }
8122 // The field is initialized. 8122 // The field is initialized.
8123 ASSERT(field.is_static()); 8123 ASSERT(field.is_static());
8124 const Class& field_owner = Class::ZoneHandle(field.owner()); 8124 const Class& field_owner = Class::ZoneHandle(field.owner());
8125 const String& field_name = String::ZoneHandle(field.name()); 8125 const String& field_name = String::ZoneHandle(field.name());
8126 const String& getter_name = String::Handle(Field::GetterName(field_name)); 8126 const String& getter_name = String::Handle(Field::GetterName(field_name));
8127 const Function& getter = 8127 const Function& getter =
8128 Function::Handle(field_owner.LookupStaticFunction(getter_name)); 8128 Function::Handle(field_owner.LookupStaticFunction(getter_name));
8129 // Never load field directly if there is a getter (deterministic AST). 8129 // Never load field directly if there is a getter (deterministic AST).
8130 if (getter.IsNull()) { 8130 if (getter.IsNull() || field.is_const()) {
8131 return new LoadStaticFieldNode(ident_pos, Field::ZoneHandle(field.raw())); 8131 return new LoadStaticFieldNode(ident_pos, Field::ZoneHandle(field.raw()));
8132 } else { 8132 } else {
8133 ASSERT(getter.kind() == RawFunction::kImplicitStaticFinalGetter); 8133 ASSERT(getter.kind() == RawFunction::kImplicitStaticFinalGetter);
8134 return new StaticGetterNode(ident_pos, 8134 return new StaticGetterNode(ident_pos,
8135 NULL, // Receiver. 8135 NULL, // Receiver.
8136 false, // is_super_getter. 8136 false, // is_super_getter.
8137 field_owner, 8137 field_owner,
8138 field_name); 8138 field_name);
8139 } 8139 }
8140 } 8140 }
(...skipping 2489 matching lines...) Expand 10 before | Expand all | Expand 10 after
10630 void Parser::SkipQualIdent() { 10630 void Parser::SkipQualIdent() {
10631 ASSERT(IsIdentifier()); 10631 ASSERT(IsIdentifier());
10632 ConsumeToken(); 10632 ConsumeToken();
10633 if (CurrentToken() == Token::kPERIOD) { 10633 if (CurrentToken() == Token::kPERIOD) {
10634 ConsumeToken(); // Consume the kPERIOD token. 10634 ConsumeToken(); // Consume the kPERIOD token.
10635 ExpectIdentifier("identifier expected after '.'"); 10635 ExpectIdentifier("identifier expected after '.'");
10636 } 10636 }
10637 } 10637 }
10638 10638
10639 } // namespace dart 10639 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698