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

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

Issue 2973633002: [kernel] Change how TypeParameterType is calculated. (Closed)
Patch Set: Rebased Created 3 years, 4 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_to_il.h ('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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 #ifdef DEBUG 754 #ifdef DEBUG
755 Function& function = 755 Function& function =
756 Function::Handle(Z, parsed_function_->function().raw()); 756 Function::Handle(Z, parsed_function_->function().raw());
757 while (function.IsClosureFunction()) { 757 while (function.IsClosureFunction()) {
758 function = function.parent_function(); 758 function = function.parent_function();
759 } 759 }
760 ASSERT(function.IsFactory()); 760 ASSERT(function.IsFactory());
761 #endif 761 #endif
762 instructions += LoadLocal(scopes_->type_arguments_variable); 762 instructions += LoadLocal(scopes_->type_arguments_variable);
763 } else if (scopes_->this_variable != NULL && 763 } else if (scopes_->this_variable != NULL &&
764 active_class_.class_type_parameters > 0) { 764 active_class_.ClassTypeParameterCount(Z) > 0) {
765 ASSERT(!parsed_function_->function().IsFactory()); 765 ASSERT(!parsed_function_->function().IsFactory());
766 intptr_t type_arguments_field_offset = 766 intptr_t type_arguments_field_offset =
767 active_class_.klass->type_arguments_field_offset(); 767 active_class_.klass->type_arguments_field_offset();
768 ASSERT(type_arguments_field_offset != dart::Class::kNoTypeArguments); 768 ASSERT(type_arguments_field_offset != dart::Class::kNoTypeArguments);
769 769
770 instructions += LoadLocal(scopes_->this_variable); 770 instructions += LoadLocal(scopes_->this_variable);
771 instructions += LoadField(type_arguments_field_offset); 771 instructions += LoadField(type_arguments_field_offset);
772 } else { 772 } else {
773 instructions += NullConstant(); 773 instructions += NullConstant();
774 } 774 }
(...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 StreamingFlowGraphBuilder streaming_flow_graph_builder( 2355 StreamingFlowGraphBuilder streaming_flow_graph_builder(
2356 &helper, zone_, script.kernel_data(), script.kernel_data_size()); 2356 &helper, zone_, script.kernel_data(), script.kernel_data_size());
2357 return streaming_flow_graph_builder.GetLineStartsFor( 2357 return streaming_flow_graph_builder.GetLineStartsFor(
2358 script.kernel_script_index()); 2358 script.kernel_script_index());
2359 } 2359 }
2360 2360
2361 } // namespace kernel 2361 } // namespace kernel
2362 } // namespace dart 2362 } // namespace dart
2363 2363
2364 #endif // !defined(DART_PRECOMPILED_RUNTIME) 2364 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« runtime/vm/kernel_to_il.h ('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