| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 } | 936 } |
| 937 | 937 |
| 938 EmitFrameEntry(); | 938 EmitFrameEntry(); |
| 939 | 939 |
| 940 const Function& function = parsed_function().function(); | 940 const Function& function = parsed_function().function(); |
| 941 | 941 |
| 942 const int num_fixed_params = function.num_fixed_parameters(); | 942 const int num_fixed_params = function.num_fixed_parameters(); |
| 943 const int num_copied_params = parsed_function().num_copied_params(); | 943 const int num_copied_params = parsed_function().num_copied_params(); |
| 944 const int num_locals = parsed_function().num_stack_locals(); | 944 const int num_locals = parsed_function().num_stack_locals(); |
| 945 | 945 |
| 946 // For optimized code, keep a bitmap of the frame in order to build | |
| 947 // stackmaps for GC safepoints in the prologue. | |
| 948 LocationSummary* prologue_locs = NULL; | |
| 949 if (is_optimizing()) { | |
| 950 // Spill slots are allocated but not initialized. | |
| 951 prologue_locs = new LocationSummary(0, 0, LocationSummary::kCall); | |
| 952 prologue_locs->stack_bitmap()->SetLength(StackSize()); | |
| 953 } | |
| 954 | |
| 955 // We check the number of passed arguments when we have to copy them due to | 946 // We check the number of passed arguments when we have to copy them due to |
| 956 // the presence of optional parameters. | 947 // the presence of optional parameters. |
| 957 // No such checking code is generated if only fixed parameters are declared, | 948 // No such checking code is generated if only fixed parameters are declared, |
| 958 // unless we are in debug mode or unless we are compiling a closure. | 949 // unless we are in debug mode or unless we are compiling a closure. |
| 959 LocalVariable* saved_args_desc_var = | 950 LocalVariable* saved_args_desc_var = |
| 960 parsed_function().GetSavedArgumentsDescriptorVar(); | 951 parsed_function().GetSavedArgumentsDescriptorVar(); |
| 961 if (num_copied_params == 0) { | 952 if (num_copied_params == 0) { |
| 962 #ifdef DEBUG | 953 #ifdef DEBUG |
| 963 ASSERT(!parsed_function().function().HasOptionalParameters()); | 954 ASSERT(!parsed_function().function().HasOptionalParameters()); |
| 964 const bool check_arguments = true; | 955 const bool check_arguments = true; |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1708 __ popl(ECX); | 1699 __ popl(ECX); |
| 1709 __ popl(EAX); | 1700 __ popl(EAX); |
| 1710 } | 1701 } |
| 1711 | 1702 |
| 1712 | 1703 |
| 1713 #undef __ | 1704 #undef __ |
| 1714 | 1705 |
| 1715 } // namespace dart | 1706 } // namespace dart |
| 1716 | 1707 |
| 1717 #endif // defined TARGET_ARCH_IA32 | 1708 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |