OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_inliner.h" | 5 #include "vm/flow_graph_inliner.h" |
6 | 6 |
7 #include "vm/compiler.h" | 7 #include "vm/compiler.h" |
8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
9 #include "vm/flow_graph.h" | 9 #include "vm/flow_graph.h" |
10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 arguments->Add(NULL); | 785 arguments->Add(NULL); |
786 param_stubs->Add(GetDefaultValue(i, parsed_function)); | 786 param_stubs->Add(GetDefaultValue(i, parsed_function)); |
787 } | 787 } |
788 return; | 788 return; |
789 } | 789 } |
790 | 790 |
791 // Otherwise, build a collection of name/argument pairs. | 791 // Otherwise, build a collection of name/argument pairs. |
792 GrowableArray<NamedArgument> named_args(argument_names_count); | 792 GrowableArray<NamedArgument> named_args(argument_names_count); |
793 for (intptr_t i = 0; i < argument_names.Length(); ++i) { | 793 for (intptr_t i = 0; i < argument_names.Length(); ++i) { |
794 String& arg_name = String::Handle(Isolate::Current()); | 794 String& arg_name = String::Handle(Isolate::Current()); |
795 arg_name ^= argument_names.At(i); | 795 arg_name |= argument_names.At(i); |
796 named_args.Add( | 796 named_args.Add( |
797 NamedArgument(&arg_name, (*arguments)[i + fixed_param_count])); | 797 NamedArgument(&arg_name, (*arguments)[i + fixed_param_count])); |
798 } | 798 } |
799 | 799 |
800 // Truncate the arguments array to just fixed parameters. | 800 // Truncate the arguments array to just fixed parameters. |
801 arguments->TruncateTo(fixed_param_count); | 801 arguments->TruncateTo(fixed_param_count); |
802 | 802 |
803 // For each optional named parameter, add the actual argument or its | 803 // For each optional named parameter, add the actual argument or its |
804 // default if no argument is passed. | 804 // default if no argument is passed. |
805 for (intptr_t i = fixed_param_count; i < param_count; ++i) { | 805 for (intptr_t i = fixed_param_count; i < param_count; ++i) { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 OS::Print("After Inlining of %s\n", flow_graph_-> | 883 OS::Print("After Inlining of %s\n", flow_graph_-> |
884 parsed_function().function().ToFullyQualifiedCString()); | 884 parsed_function().function().ToFullyQualifiedCString()); |
885 FlowGraphPrinter printer(*flow_graph_); | 885 FlowGraphPrinter printer(*flow_graph_); |
886 printer.PrintBlocks(); | 886 printer.PrintBlocks(); |
887 } | 887 } |
888 } | 888 } |
889 } | 889 } |
890 } | 890 } |
891 | 891 |
892 } // namespace dart | 892 } // namespace dart |
OLD | NEW |