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 "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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 !flow_graph().IsCompiledForOsr()) { | 408 !flow_graph().IsCompiledForOsr()) { |
409 __ Comment("Check passed-in type args"); | 409 __ CheckFunctionTypeArgs(function.NumTypeParameters(), |
410 UNIMPLEMENTED(); // TODO(regis): Not yet supported. | 410 -parsed_function().first_stack_local_index() - 1); |
411 } | 411 } |
| 412 |
| 413 // TODO(regis): Verify that no vector is passed if not generic, unless already |
| 414 // checked during resolution. |
412 } | 415 } |
413 | 416 |
414 void FlowGraphCompiler::CompileGraph() { | 417 void FlowGraphCompiler::CompileGraph() { |
415 InitCompiler(); | 418 InitCompiler(); |
416 | 419 |
417 if (TryIntrinsify()) { | 420 if (TryIntrinsify()) { |
418 // Skip regular code generation. | 421 // Skip regular code generation. |
419 return; | 422 return; |
420 } | 423 } |
421 | 424 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 | 549 |
547 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 550 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
548 UNIMPLEMENTED(); | 551 UNIMPLEMENTED(); |
549 } | 552 } |
550 | 553 |
551 #undef __ | 554 #undef __ |
552 | 555 |
553 } // namespace dart | 556 } // namespace dart |
554 | 557 |
555 #endif // defined TARGET_ARCH_DBC | 558 #endif // defined TARGET_ARCH_DBC |
OLD | NEW |