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

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

Issue 2473593003: VM: [Kernel] Remove special-casing in FGB which is now handled by the frontend (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | runtime/vm/kernel_to_il.cc » ('j') | runtime/vm/kernel_to_il.cc » ('J')
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 "vm/kernel_reader.h" 5 #include "vm/kernel_reader.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 *klass, Function::Handle(Z), i, 246 *klass, Function::Handle(Z), i,
247 H.DartSymbol(kernel_klass->type_parameters()[i]->name()), null_bound, 247 H.DartSymbol(kernel_klass->type_parameters()[i]->name()), null_bound,
248 TokenPosition::kNoSource); 248 TokenPosition::kNoSource);
249 type_parameters.SetTypeAt(i, parameter); 249 type_parameters.SetTypeAt(i, parameter);
250 } 250 }
251 klass->set_type_parameters(type_parameters); 251 klass->set_type_parameters(type_parameters);
252 252
253 // Step b) Fill in the bounds of all [TypeParameter]s. 253 // Step b) Fill in the bounds of all [TypeParameter]s.
254 for (intptr_t i = 0; i < num_type_parameters; i++) { 254 for (intptr_t i = 0; i < num_type_parameters; i++) {
255 TypeParameter* kernel_parameter = kernel_klass->type_parameters()[i]; 255 TypeParameter* kernel_parameter = kernel_klass->type_parameters()[i];
256 // There is no dynamic bound, only Object. 256 // TODO(github.com/dart-lang/kernel/issues/42): This should be handled
257 // TODO(27590): Should we fix this in the kernel IR generator? 257 // by the frontend.
258 if (kernel_parameter->bound()->IsDynamicType()) { 258 if (kernel_parameter->bound()->IsDynamicType()) {
259 parameter ^= type_parameters.TypeAt(i); 259 parameter ^= type_parameters.TypeAt(i);
260 parameter.set_bound(Type::Handle(Z, I->object_store()->object_type())); 260 parameter.set_bound(Type::Handle(Z, I->object_store()->object_type()));
261 } else { 261 } else {
262 AbstractType& bound = 262 AbstractType& bound =
263 T.TranslateTypeWithoutFinalization(kernel_parameter->bound()); 263 T.TranslateTypeWithoutFinalization(kernel_parameter->bound());
264 if (bound.IsMalformedOrMalbounded()) { 264 if (bound.IsMalformedOrMalbounded()) {
265 bound = I->object_store()->object_type(); 265 bound = I->object_store()->object_type();
266 } 266 }
267 267
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 if (kind == Procedure::kIncompleteProcedure) { 689 if (kind == Procedure::kIncompleteProcedure) {
690 return RawFunction::kSignatureFunction; 690 return RawFunction::kSignatureFunction;
691 } else { 691 } else {
692 ASSERT(0 <= kind && kind <= Procedure::kFactory); 692 ASSERT(0 <= kind && kind <= Procedure::kFactory);
693 return static_cast<RawFunction::Kind>(lookuptable[kind]); 693 return static_cast<RawFunction::Kind>(lookuptable[kind]);
694 } 694 }
695 } 695 }
696 696
697 } // namespace kernel 697 } // namespace kernel
698 } // namespace dart 698 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/kernel_to_il.cc » ('j') | runtime/vm/kernel_to_il.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698