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

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

Issue 2987323003: [VM DBC compiler and simulator] Support reified generic functions. (Closed)
Patch Set: 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
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/globals.h" // Needed here to get TARGET_ARCH_DBC. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC.
6 #if defined(TARGET_ARCH_DBC) 6 #if defined(TARGET_ARCH_DBC)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 closure_reg = -local->index() - 1; 398 closure_reg = -local->index() - 1;
399 } 399 }
400 __ LoadField(context_reg, closure_reg, 400 __ LoadField(context_reg, closure_reg,
401 Closure::context_offset() / kWordSize); 401 Closure::context_offset() / kWordSize);
402 } else if (has_optional_params && !is_optimizing()) { 402 } else if (has_optional_params && !is_optimizing()) {
403 __ LoadConstant(context_index, Object::empty_context()); 403 __ LoadConstant(context_index, Object::empty_context());
404 } 404 }
405 405
406 // Check for a passed type argument vector if the function is generic. 406 // Check for a passed type argument vector if the function is generic.
407 if (FLAG_reify_generic_functions && function.IsGeneric()) { 407 if (FLAG_reify_generic_functions && function.IsGeneric()) {
408 __ Comment("Check passed-in type args"); 408 __ CheckFunctionTypeArgs(function.NumTypeParameters(),
409 UNIMPLEMENTED(); // TODO(regis): Not yet supported. 409 -parsed_function().first_stack_local_index() - 1);
410 } 410 }
411
412 // TODO(regis): Verify that no vector is passed if not generic, unless already
413 // checked during resolution.
411 } 414 }
412 415
413 void FlowGraphCompiler::CompileGraph() { 416 void FlowGraphCompiler::CompileGraph() {
414 InitCompiler(); 417 InitCompiler();
415 418
416 if (TryIntrinsify()) { 419 if (TryIntrinsify()) {
417 // Skip regular code generation. 420 // Skip regular code generation.
418 return; 421 return;
419 } 422 }
420 423
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 548
546 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 549 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
547 UNIMPLEMENTED(); 550 UNIMPLEMENTED();
548 } 551 }
549 552
550 #undef __ 553 #undef __
551 554
552 } // namespace dart 555 } // namespace dart
553 556
554 #endif // defined TARGET_ARCH_DBC 557 #endif // defined TARGET_ARCH_DBC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698