| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 } | 902 } |
| 903 | 903 |
| 904 | 904 |
| 905 // TODO(srdjan): Investigate where to put the argument type checks for | 905 // TODO(srdjan): Investigate where to put the argument type checks for |
| 906 // checked mode. | 906 // checked mode. |
| 907 void FlowGraphCompiler::CompileGraph() { | 907 void FlowGraphCompiler::CompileGraph() { |
| 908 // Specialized version of entry code from CodeGenerator::GenerateEntryCode. | 908 // Specialized version of entry code from CodeGenerator::GenerateEntryCode. |
| 909 const Function& function = parsed_function_.function(); | 909 const Function& function = parsed_function_.function(); |
| 910 | 910 |
| 911 const int parameter_count = function.num_fixed_parameters(); | 911 const int parameter_count = function.num_fixed_parameters(); |
| 912 const int num_opt_params = function.num_optional_parameters(); | |
| 913 const int num_copied_params = parsed_function_.copied_parameter_count(); | 912 const int num_copied_params = parsed_function_.copied_parameter_count(); |
| 914 const int local_count = parsed_function_.stack_local_count(); | 913 const int local_count = parsed_function_.stack_local_count(); |
| 915 __ EnterFrame(StackSize() * kWordSize); | 914 __ EnterFrame(StackSize() * kWordSize); |
| 916 | 915 |
| 917 // We check the number of passed arguments when we have to copy them due to | 916 // We check the number of passed arguments when we have to copy them due to |
| 918 // the presence of optional named parameters. | 917 // the presence of optional named parameters. |
| 919 // No such checking code is generated if only fixed parameters are declared, | 918 // No such checking code is generated if only fixed parameters are declared, |
| 920 // unless we are debug mode or unless we are compiling a closure. | 919 // unless we are debug mode or unless we are compiling a closure. |
| 921 if (num_copied_params == 0) { | 920 if (num_copied_params == 0) { |
| 922 #ifdef DEBUG | 921 #ifdef DEBUG |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { | 1035 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { |
| 1037 // We don't compile exception handlers yet. | 1036 // We don't compile exception handlers yet. |
| 1038 code.set_exception_handlers( | 1037 code.set_exception_handlers( |
| 1039 ExceptionHandlers::Handle(ExceptionHandlers::New(0))); | 1038 ExceptionHandlers::Handle(ExceptionHandlers::New(0))); |
| 1040 } | 1039 } |
| 1041 | 1040 |
| 1042 | 1041 |
| 1043 } // namespace dart | 1042 } // namespace dart |
| 1044 | 1043 |
| 1045 #endif // defined TARGET_ARCH_X64 | 1044 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |