Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |