| 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/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/become.h" | 10 #include "vm/become.h" |
| (...skipping 5607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5618 switch (kind) { | 5618 switch (kind) { |
| 5619 case RawFunction::kRegularFunction: | 5619 case RawFunction::kRegularFunction: |
| 5620 return "RegularFunction"; | 5620 return "RegularFunction"; |
| 5621 break; | 5621 break; |
| 5622 case RawFunction::kClosureFunction: | 5622 case RawFunction::kClosureFunction: |
| 5623 return "ClosureFunction"; | 5623 return "ClosureFunction"; |
| 5624 break; | 5624 break; |
| 5625 case RawFunction::kImplicitClosureFunction: | 5625 case RawFunction::kImplicitClosureFunction: |
| 5626 return "ImplicitClosureFunction"; | 5626 return "ImplicitClosureFunction"; |
| 5627 break; | 5627 break; |
| 5628 case RawFunction::kConvertedClosureFunction: |
| 5629 return "ConvertedClosureFunction"; |
| 5630 break; |
| 5628 case RawFunction::kSignatureFunction: | 5631 case RawFunction::kSignatureFunction: |
| 5629 return "SignatureFunction"; | 5632 return "SignatureFunction"; |
| 5630 break; | 5633 break; |
| 5631 case RawFunction::kGetterFunction: | 5634 case RawFunction::kGetterFunction: |
| 5632 return "GetterFunction"; | 5635 return "GetterFunction"; |
| 5633 break; | 5636 break; |
| 5634 case RawFunction::kSetterFunction: | 5637 case RawFunction::kSetterFunction: |
| 5635 return "SetterFunction"; | 5638 return "SetterFunction"; |
| 5636 break; | 5639 break; |
| 5637 case RawFunction::kConstructor: | 5640 case RawFunction::kConstructor: |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6345 const Object& owner = Object::Handle(zone, RawOwner()); | 6348 const Object& owner = Object::Handle(zone, RawOwner()); |
| 6346 // Note that parent pointers in newly instantiated signatures still points to | 6349 // Note that parent pointers in newly instantiated signatures still points to |
| 6347 // the original uninstantiated parent signatures. That is not a problem. | 6350 // the original uninstantiated parent signatures. That is not a problem. |
| 6348 const Function& parent = Function::Handle(zone, parent_function()); | 6351 const Function& parent = Function::Handle(zone, parent_function()); |
| 6349 ASSERT(!HasInstantiatedSignature()); | 6352 ASSERT(!HasInstantiatedSignature()); |
| 6350 | 6353 |
| 6351 Function& sig = Function::Handle(zone, Function::null()); | 6354 Function& sig = Function::Handle(zone, Function::null()); |
| 6352 if (IsConvertedClosureFunction()) { | 6355 if (IsConvertedClosureFunction()) { |
| 6353 sig = Function::NewConvertedClosureFunction( | 6356 sig = Function::NewConvertedClosureFunction( |
| 6354 String::Handle(zone, name()), parent, TokenPosition::kNoSource); | 6357 String::Handle(zone, name()), parent, TokenPosition::kNoSource); |
| 6355 // TODO(sjindel): Kernel generic methods undone. Handle type parameters | 6358 // TODO(30455): Kernel generic methods undone. Handle type parameters |
| 6356 // correctly when generic closures are supported. Until then, all type | 6359 // correctly when generic closures are supported. Until then, all type |
| 6357 // parameters to this target are used for captured type variables, so they | 6360 // parameters to this target are used for captured type variables, so they |
| 6358 // aren't relevant to the type of the function. | 6361 // aren't relevant to the type of the function. |
| 6359 sig.set_type_parameters(TypeArguments::Handle(zone, TypeArguments::null())); | 6362 sig.set_type_parameters(TypeArguments::Handle(zone, TypeArguments::null())); |
| 6360 } else { | 6363 } else { |
| 6361 sig = Function::NewSignatureFunction(owner, parent, | 6364 sig = Function::NewSignatureFunction(owner, parent, |
| 6362 TokenPosition::kNoSource, space); | 6365 TokenPosition::kNoSource, space); |
| 6363 sig.set_type_parameters(TypeArguments::Handle(zone, type_parameters())); | 6366 sig.set_type_parameters(TypeArguments::Handle(zone, type_parameters())); |
| 6364 } | 6367 } |
| 6365 | 6368 |
| (...skipping 16118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22484 } | 22487 } |
| 22485 return UserTag::null(); | 22488 return UserTag::null(); |
| 22486 } | 22489 } |
| 22487 | 22490 |
| 22488 const char* UserTag::ToCString() const { | 22491 const char* UserTag::ToCString() const { |
| 22489 const String& tag_label = String::Handle(label()); | 22492 const String& tag_label = String::Handle(label()); |
| 22490 return tag_label.ToCString(); | 22493 return tag_label.ToCString(); |
| 22491 } | 22494 } |
| 22492 | 22495 |
| 22493 } // namespace dart | 22496 } // namespace dart |
| OLD | NEW |