| 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/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
| 9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/code_descriptors.h" | 10 #include "vm/code_descriptors.h" |
| (...skipping 2533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2544 if (type_arguments.IsNull() || type_arguments.IsInstantiated()) { | 2544 if (type_arguments.IsNull() || type_arguments.IsInstantiated()) { |
| 2545 return Bind(new ConstantInstr(type_arguments)); | 2545 return Bind(new ConstantInstr(type_arguments)); |
| 2546 } | 2546 } |
| 2547 // The type arguments are uninstantiated. | 2547 // The type arguments are uninstantiated. |
| 2548 const Class& instantiator_class = Class::ZoneHandle( | 2548 const Class& instantiator_class = Class::ZoneHandle( |
| 2549 owner()->parsed_function()->function().Owner()); | 2549 owner()->parsed_function()->function().Owner()); |
| 2550 Value* instantiator_value = | 2550 Value* instantiator_value = |
| 2551 BuildInstantiatorTypeArguments(token_pos, instantiator_class, NULL); | 2551 BuildInstantiatorTypeArguments(token_pos, instantiator_class, NULL); |
| 2552 const bool use_instantiator_type_args = | 2552 const bool use_instantiator_type_args = |
| 2553 type_arguments.IsUninstantiatedIdentity() || | 2553 type_arguments.IsUninstantiatedIdentity() || |
| 2554 type_arguments.CanShareInstantiatorTypeArguments( | 2554 type_arguments.CanShareInstantiatorTypeArguments(instantiator_class); |
| 2555 instantiator_class); | |
| 2556 return use_instantiator_type_args | 2555 return use_instantiator_type_args |
| 2557 ? instantiator_value | 2556 ? instantiator_value |
| 2558 : Bind(new InstantiateTypeArgumentsInstr(token_pos, | 2557 : Bind(new InstantiateTypeArgumentsInstr(token_pos, |
| 2559 type_arguments, | 2558 type_arguments, |
| 2560 instantiator_class, | 2559 instantiator_class, |
| 2561 instantiator_value)); | 2560 instantiator_value)); |
| 2562 } | 2561 } |
| 2563 | 2562 |
| 2564 | 2563 |
| 2565 void EffectGraphVisitor::BuildConstructorTypeArguments( | 2564 void EffectGraphVisitor::BuildConstructorTypeArguments( |
| (...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3847 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; | 3846 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; |
| 3848 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 3847 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| 3849 OS::SNPrint(chars, len, kFormat, function_name, reason); | 3848 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 3850 const Error& error = Error::Handle( | 3849 const Error& error = Error::Handle( |
| 3851 LanguageError::New(String::Handle(String::New(chars)))); | 3850 LanguageError::New(String::Handle(String::New(chars)))); |
| 3852 Isolate::Current()->long_jump_base()->Jump(1, error); | 3851 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 3853 } | 3852 } |
| 3854 | 3853 |
| 3855 | 3854 |
| 3856 } // namespace dart | 3855 } // namespace dart |
| OLD | NEW |