OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 <set> | 5 #include <set> |
6 | 6 |
7 #include "vm/kernel_to_il.h" | 7 #include "vm/kernel_to_il.h" |
8 | 8 |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/intermediate_language.h" | 10 #include "vm/intermediate_language.h" |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 #ifdef DEBUG | 805 #ifdef DEBUG |
806 Function& function = | 806 Function& function = |
807 Function::Handle(Z, parsed_function_->function().raw()); | 807 Function::Handle(Z, parsed_function_->function().raw()); |
808 while (function.IsClosureFunction()) { | 808 while (function.IsClosureFunction()) { |
809 function = function.parent_function(); | 809 function = function.parent_function(); |
810 } | 810 } |
811 ASSERT(function.IsFactory()); | 811 ASSERT(function.IsFactory()); |
812 #endif | 812 #endif |
813 instructions += LoadLocal(scopes_->type_arguments_variable); | 813 instructions += LoadLocal(scopes_->type_arguments_variable); |
814 } else if (scopes_->this_variable != NULL && | 814 } else if (scopes_->this_variable != NULL && |
815 active_class_.class_type_parameters > 0) { | 815 active_class_.ClassTypeParameterCount(Z) > 0) { |
816 ASSERT(!parsed_function_->function().IsFactory()); | 816 ASSERT(!parsed_function_->function().IsFactory()); |
817 intptr_t type_arguments_field_offset = | 817 intptr_t type_arguments_field_offset = |
818 active_class_.klass->type_arguments_field_offset(); | 818 active_class_.klass->type_arguments_field_offset(); |
819 ASSERT(type_arguments_field_offset != dart::Class::kNoTypeArguments); | 819 ASSERT(type_arguments_field_offset != dart::Class::kNoTypeArguments); |
820 | 820 |
821 instructions += LoadLocal(scopes_->this_variable); | 821 instructions += LoadLocal(scopes_->this_variable); |
822 instructions += LoadField(type_arguments_field_offset); | 822 instructions += LoadField(type_arguments_field_offset); |
823 } else { | 823 } else { |
824 instructions += NullConstant(); | 824 instructions += NullConstant(); |
825 } | 825 } |
(...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2485 StreamingFlowGraphBuilder streaming_flow_graph_builder( | 2485 StreamingFlowGraphBuilder streaming_flow_graph_builder( |
2486 &helper, zone_, script.kernel_data(), script.kernel_data_size()); | 2486 &helper, zone_, script.kernel_data(), script.kernel_data_size()); |
2487 return streaming_flow_graph_builder.GetLineStartsFor( | 2487 return streaming_flow_graph_builder.GetLineStartsFor( |
2488 script.kernel_script_index()); | 2488 script.kernel_script_index()); |
2489 } | 2489 } |
2490 | 2490 |
2491 } // namespace kernel | 2491 } // namespace kernel |
2492 } // namespace dart | 2492 } // namespace dart |
2493 | 2493 |
2494 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 2494 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
OLD | NEW |