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

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

Issue 516303006: Minor changes to avoid handle creation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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') | runtime/vm/snapshot.cc » ('j') | 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/ast_transformer.h" 9 #include "vm/ast_transformer.h"
10 #include "vm/bootstrap.h" 10 #include "vm/bootstrap.h"
(...skipping 9389 matching lines...) Expand 10 before | Expand all | Expand 10 after
9400 current_member_->has_static && !current_member_->has_factory; 9400 current_member_->has_static && !current_member_->has_factory;
9401 } 9401 }
9402 ASSERT(!current_function().IsNull()); 9402 ASSERT(!current_function().IsNull());
9403 return 9403 return
9404 current_function().is_static() && !current_function().IsInFactoryScope(); 9404 current_function().is_static() && !current_function().IsInFactoryScope();
9405 } 9405 }
9406 9406
9407 9407
9408 const AbstractType* Parser::ReceiverType(const Class& cls) { 9408 const AbstractType* Parser::ReceiverType(const Class& cls) {
9409 ASSERT(!cls.IsNull()); 9409 ASSERT(!cls.IsNull());
9410 TypeArguments& type_arguments = TypeArguments::Handle(); 9410 Isolate* isolate = Isolate::Current();
srdjan 2014/09/03 15:41:50 Parser has a field isolate_
siva 2014/09/03 18:27:57 Parser::ReceiverType was a static method and isola
9411 if (cls.NumTypeParameters() > 0) { 9411 const TypeArguments& type_arguments = TypeArguments::Handle(
9412 type_arguments = cls.type_parameters(); 9412 isolate,
9413 } 9413 (cls.NumTypeParameters() > 0) ?
9414 cls.type_parameters() : TypeArguments::null());
9414 AbstractType& type = AbstractType::ZoneHandle( 9415 AbstractType& type = AbstractType::ZoneHandle(
9415 Type::New(cls, type_arguments, cls.token_pos())); 9416 isolate, Type::New(cls, type_arguments, cls.token_pos()));
srdjan 2014/09/03 15:41:50 s/isolate/I
siva 2014/09/03 18:27:57 Done.
9416 if (cls.is_type_finalized()) { 9417 if (cls.is_type_finalized()) {
9417 type ^= ClassFinalizer::FinalizeType( 9418 type ^= ClassFinalizer::FinalizeType(
9418 cls, type, ClassFinalizer::kCanonicalizeWellFormed); 9419 cls, type, ClassFinalizer::kCanonicalizeWellFormed);
9419 // Note that the receiver type may now be a malbounded type. 9420 // Note that the receiver type may now be a malbounded type.
9420 } 9421 }
9421 return &type; 9422 return &type;
9422 } 9423 }
9423 9424
9424 9425
9425 bool Parser::IsInstantiatorRequired() const { 9426 bool Parser::IsInstantiatorRequired() const {
(...skipping 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after
11495 void Parser::SkipQualIdent() { 11496 void Parser::SkipQualIdent() {
11496 ASSERT(IsIdentifier()); 11497 ASSERT(IsIdentifier());
11497 ConsumeToken(); 11498 ConsumeToken();
11498 if (CurrentToken() == Token::kPERIOD) { 11499 if (CurrentToken() == Token::kPERIOD) {
11499 ConsumeToken(); // Consume the kPERIOD token. 11500 ConsumeToken(); // Consume the kPERIOD token.
11500 ExpectIdentifier("identifier expected after '.'"); 11501 ExpectIdentifier("identifier expected after '.'");
11501 } 11502 }
11502 } 11503 }
11503 11504
11504 } // namespace dart 11505 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698