| 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_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 "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 } | 935 } |
| 936 | 936 |
| 937 EmitFrameEntry(); | 937 EmitFrameEntry(); |
| 938 | 938 |
| 939 const Function& function = parsed_function().function(); | 939 const Function& function = parsed_function().function(); |
| 940 | 940 |
| 941 const int num_fixed_params = function.num_fixed_parameters(); | 941 const int num_fixed_params = function.num_fixed_parameters(); |
| 942 const int num_copied_params = parsed_function().num_copied_params(); | 942 const int num_copied_params = parsed_function().num_copied_params(); |
| 943 const int num_locals = parsed_function().num_stack_locals(); | 943 const int num_locals = parsed_function().num_stack_locals(); |
| 944 | 944 |
| 945 // For optimized code, keep a bitmap of the frame in order to build | |
| 946 // stackmaps for GC safepoints in the prologue. | |
| 947 LocationSummary* prologue_locs = NULL; | |
| 948 if (is_optimizing()) { | |
| 949 // Spill slots are allocated but not initialized. | |
| 950 prologue_locs = new LocationSummary(0, 0, LocationSummary::kCall); | |
| 951 prologue_locs->stack_bitmap()->SetLength(StackSize()); | |
| 952 } | |
| 953 | |
| 954 // We check the number of passed arguments when we have to copy them due to | 945 // We check the number of passed arguments when we have to copy them due to |
| 955 // the presence of optional parameters. | 946 // the presence of optional parameters. |
| 956 // No such checking code is generated if only fixed parameters are declared, | 947 // No such checking code is generated if only fixed parameters are declared, |
| 957 // unless we are in debug mode or unless we are compiling a closure. | 948 // unless we are in debug mode or unless we are compiling a closure. |
| 958 LocalVariable* saved_args_desc_var = | 949 LocalVariable* saved_args_desc_var = |
| 959 parsed_function().GetSavedArgumentsDescriptorVar(); | 950 parsed_function().GetSavedArgumentsDescriptorVar(); |
| 960 if (num_copied_params == 0) { | 951 if (num_copied_params == 0) { |
| 961 #ifdef DEBUG | 952 #ifdef DEBUG |
| 962 ASSERT(!parsed_function().function().HasOptionalParameters()); | 953 ASSERT(!parsed_function().function().HasOptionalParameters()); |
| 963 const bool check_arguments = true; | 954 const bool check_arguments = true; |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { | 1673 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
| 1683 __ Exchange(mem1, mem2); | 1674 __ Exchange(mem1, mem2); |
| 1684 } | 1675 } |
| 1685 | 1676 |
| 1686 | 1677 |
| 1687 #undef __ | 1678 #undef __ |
| 1688 | 1679 |
| 1689 } // namespace dart | 1680 } // namespace dart |
| 1690 | 1681 |
| 1691 #endif // defined TARGET_ARCH_X64 | 1682 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |