| 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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 | 987 |
| 988 | 988 |
| 989 static const Register new_pp = T7; | 989 static const Register new_pp = T7; |
| 990 | 990 |
| 991 | 991 |
| 992 void FlowGraphCompiler::EmitFrameEntry() { | 992 void FlowGraphCompiler::EmitFrameEntry() { |
| 993 const Function& function = parsed_function().function(); | 993 const Function& function = parsed_function().function(); |
| 994 if (CanOptimizeFunction() && | 994 if (CanOptimizeFunction() && |
| 995 function.IsOptimizable() && | 995 function.IsOptimizable() && |
| 996 (!is_optimizing() || may_reoptimize())) { | 996 (!is_optimizing() || may_reoptimize())) { |
| 997 __ Comment("Invocation Count Check"); |
| 997 const Register function_reg = T0; | 998 const Register function_reg = T0; |
| 998 | 999 |
| 999 // Temporarily setup pool pointer for this dart function. | 1000 // Temporarily setup pool pointer for this dart function. |
| 1000 __ LoadPoolPointer(new_pp); | 1001 __ LoadPoolPointer(new_pp); |
| 1001 // Load function object from object pool. | 1002 // Load function object from object pool. |
| 1002 __ LoadFunctionFromCalleePool(function_reg, function, new_pp); | 1003 __ LoadFunctionFromCalleePool(function_reg, function, new_pp); |
| 1003 | 1004 |
| 1004 __ lw(T1, FieldAddress(function_reg, Function::usage_counter_offset())); | 1005 __ lw(T1, FieldAddress(function_reg, Function::usage_counter_offset())); |
| 1005 // Reoptimization of an optimized function is triggered by counting in | 1006 // Reoptimization of an optimized function is triggered by counting in |
| 1006 // IC stubs, but not at the entry of the function. | 1007 // IC stubs, but not at the entry of the function. |
| (...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1896 __ AddImmediate(SP, kDoubleSize); | 1897 __ AddImmediate(SP, kDoubleSize); |
| 1897 } | 1898 } |
| 1898 | 1899 |
| 1899 | 1900 |
| 1900 #undef __ | 1901 #undef __ |
| 1901 | 1902 |
| 1902 | 1903 |
| 1903 } // namespace dart | 1904 } // namespace dart |
| 1904 | 1905 |
| 1905 #endif // defined TARGET_ARCH_MIPS | 1906 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |