| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 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 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 __ LoadPoolPointer(new_pp); | 967 __ LoadPoolPointer(new_pp); |
| 968 | 968 |
| 969 // Load function object using the callee's pool pointer. | 969 // Load function object using the callee's pool pointer. |
| 970 __ LoadObject(function_reg, function, new_pp); | 970 __ LoadObject(function_reg, function, new_pp); |
| 971 | 971 |
| 972 // Patch point is after the eventually inlined function object. | 972 // Patch point is after the eventually inlined function object. |
| 973 entry_patch_pc_offset_ = assembler()->CodeSize(); | 973 entry_patch_pc_offset_ = assembler()->CodeSize(); |
| 974 | 974 |
| 975 intptr_t threshold = FLAG_optimization_counter_threshold; | 975 intptr_t threshold = FLAG_optimization_counter_threshold; |
| 976 __ LoadFieldFromOffset( | 976 __ LoadFieldFromOffset( |
| 977 R7, function_reg, Function::usage_counter_offset(), new_pp); | 977 R7, function_reg, Function::usage_counter_offset(), new_pp, kWord); |
| 978 if (is_optimizing()) { | 978 if (is_optimizing()) { |
| 979 // Reoptimization of an optimized function is triggered by counting in | 979 // Reoptimization of an optimized function is triggered by counting in |
| 980 // IC stubs, but not at the entry of the function. | 980 // IC stubs, but not at the entry of the function. |
| 981 threshold = FLAG_reoptimization_counter_threshold; | 981 threshold = FLAG_reoptimization_counter_threshold; |
| 982 } else { | 982 } else { |
| 983 __ add(R7, R7, Operand(1)); | 983 __ add(R7, R7, Operand(1)); |
| 984 __ StoreFieldToOffset( | 984 __ StoreFieldToOffset( |
| 985 R7, function_reg, Function::usage_counter_offset(), new_pp); | 985 R7, function_reg, Function::usage_counter_offset(), new_pp, kWord); |
| 986 } | 986 } |
| 987 __ CompareImmediate(R7, threshold, new_pp); | 987 __ CompareImmediate(R7, threshold, new_pp); |
| 988 ASSERT(function_reg == R6); | 988 ASSERT(function_reg == R6); |
| 989 Label dont_optimize; | 989 Label dont_optimize; |
| 990 __ b(&dont_optimize, LT); | 990 __ b(&dont_optimize, LT); |
| 991 __ Branch(&StubCode::OptimizeFunctionLabel(), new_pp); | 991 __ Branch(&StubCode::OptimizeFunctionLabel(), new_pp); |
| 992 __ Bind(&dont_optimize); | 992 __ Bind(&dont_optimize); |
| 993 } else if (!flow_graph().IsCompiledForOsr()) { | 993 } else if (!flow_graph().IsCompiledForOsr()) { |
| 994 // We have to load the PP here too because a load of an external label | 994 // We have to load the PP here too because a load of an external label |
| 995 // may be patched at the AddCurrentDescriptor below. | 995 // may be patched at the AddCurrentDescriptor below. |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1709 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1709 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
| 1710 UNIMPLEMENTED(); | 1710 UNIMPLEMENTED(); |
| 1711 } | 1711 } |
| 1712 | 1712 |
| 1713 | 1713 |
| 1714 #undef __ | 1714 #undef __ |
| 1715 | 1715 |
| 1716 } // namespace dart | 1716 } // namespace dart |
| 1717 | 1717 |
| 1718 #endif // defined TARGET_ARCH_ARM64 | 1718 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |