Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: runtime/vm/kernel_to_il.cc

Issue 2973633002: [kernel] Change how TypeParameterType is calculated. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« runtime/vm/kernel_reader.cc ('K') | « runtime/vm/kernel_to_il.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« runtime/vm/kernel_reader.cc ('K') | « runtime/vm/kernel_to_il.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698