OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
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 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 | 1035 |
1036 // Input parameters: | 1036 // Input parameters: |
1037 // RA: return address. | 1037 // RA: return address. |
1038 // SP: address of last argument. | 1038 // SP: address of last argument. |
1039 // FP: caller's frame pointer. | 1039 // FP: caller's frame pointer. |
1040 // PP: caller's pool pointer. | 1040 // PP: caller's pool pointer. |
1041 // S5: ic-data. | 1041 // S5: ic-data. |
1042 // S4: arguments descriptor array. | 1042 // S4: arguments descriptor array. |
1043 void FlowGraphCompiler::CompileGraph() { | 1043 void FlowGraphCompiler::CompileGraph() { |
1044 InitCompiler(); | 1044 InitCompiler(); |
| 1045 const Function& function = parsed_function().function(); |
| 1046 |
| 1047 #ifdef DART_PRECOMPILER |
| 1048 if (function.IsDynamicFunction()) { |
| 1049 __ MonomorphicCheckedEntry(); |
| 1050 } |
| 1051 #endif // DART_PRECOMPILER |
1045 | 1052 |
1046 if (TryIntrinsify()) { | 1053 if (TryIntrinsify()) { |
1047 // Skip regular code generation. | 1054 // Skip regular code generation. |
1048 return; | 1055 return; |
1049 } | 1056 } |
1050 | 1057 |
1051 EmitFrameEntry(); | 1058 EmitFrameEntry(); |
1052 | 1059 ASSERT(assembler()->constant_pool_allowed()); |
1053 const Function& function = parsed_function().function(); | |
1054 | 1060 |
1055 const int num_fixed_params = function.num_fixed_parameters(); | 1061 const int num_fixed_params = function.num_fixed_parameters(); |
1056 const int num_copied_params = parsed_function().num_copied_params(); | 1062 const int num_copied_params = parsed_function().num_copied_params(); |
1057 const int num_locals = parsed_function().num_stack_locals(); | 1063 const int num_locals = parsed_function().num_stack_locals(); |
1058 | 1064 |
1059 // We check the number of passed arguments when we have to copy them due to | 1065 // We check the number of passed arguments when we have to copy them due to |
1060 // the presence of optional parameters. | 1066 // the presence of optional parameters. |
1061 // No such checking code is generated if only fixed parameters are declared, | 1067 // No such checking code is generated if only fixed parameters are declared, |
1062 // unless we are in debug mode or unless we are compiling a closure. | 1068 // unless we are in debug mode or unless we are compiling a closure. |
1063 if (num_copied_params == 0) { | 1069 if (num_copied_params == 0) { |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1931 __ AddImmediate(SP, kDoubleSize); | 1937 __ AddImmediate(SP, kDoubleSize); |
1932 } | 1938 } |
1933 | 1939 |
1934 | 1940 |
1935 #undef __ | 1941 #undef __ |
1936 | 1942 |
1937 | 1943 |
1938 } // namespace dart | 1944 } // namespace dart |
1939 | 1945 |
1940 #endif // defined TARGET_ARCH_MIPS | 1946 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |