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" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) { | 930 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) { |
931 __ Unimplemented("JumpToErrorHandler Stub"); | 931 __ Unimplemented("JumpToErrorHandler Stub"); |
932 } | 932 } |
933 | 933 |
934 | 934 |
935 void StubCode::GenerateEqualityWithNullArgStub(Assembler* assembler) { | 935 void StubCode::GenerateEqualityWithNullArgStub(Assembler* assembler) { |
936 __ Unimplemented("EqualityWithNullArg Stub"); | 936 __ Unimplemented("EqualityWithNullArg Stub"); |
937 } | 937 } |
938 | 938 |
939 | 939 |
| 940 // Calls to the runtime to optimize the given function. |
| 941 // R6: function to be reoptimized. |
| 942 // R4: argument descriptor (preserved). |
940 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { | 943 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { |
941 __ Unimplemented("OptimizeFunction stub"); | 944 __ EnterStubFrame(); |
| 945 __ Push(R4); |
| 946 __ LoadImmediate(IP, reinterpret_cast<intptr_t>(Object::null())); |
| 947 __ Push(IP); // Setup space on stack for return value. |
| 948 __ Push(R6); |
| 949 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry); |
| 950 __ Pop(R0); // Discard argument. |
| 951 __ Pop(R0); // Get Code object |
| 952 __ Pop(R4); // Restore argument descriptor. |
| 953 __ ldr(R0, FieldAddress(R0, Code::instructions_offset())); |
| 954 __ AddImmediate(R0, Instructions::HeaderSize() - kHeapObjectTag); |
| 955 __ LeaveStubFrame(); |
| 956 __ bx(R0); |
| 957 __ bkpt(0); |
942 } | 958 } |
943 | 959 |
944 | 960 |
945 DECLARE_LEAF_RUNTIME_ENTRY(intptr_t, | 961 DECLARE_LEAF_RUNTIME_ENTRY(intptr_t, |
946 BigintCompare, | 962 BigintCompare, |
947 RawBigint* left, | 963 RawBigint* left, |
948 RawBigint* right); | 964 RawBigint* right); |
949 | 965 |
950 | 966 |
951 // Does identical check (object references are equal or not equal) with special | 967 // Does identical check (object references are equal or not equal) with special |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 __ Bind(&reference_compare); | 1039 __ Bind(&reference_compare); |
1024 __ cmp(left, ShifterOperand(right)); | 1040 __ cmp(left, ShifterOperand(right)); |
1025 __ Bind(&done); | 1041 __ Bind(&done); |
1026 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); | 1042 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); |
1027 __ Ret(); | 1043 __ Ret(); |
1028 } | 1044 } |
1029 | 1045 |
1030 } // namespace dart | 1046 } // namespace dart |
1031 | 1047 |
1032 #endif // defined TARGET_ARCH_ARM | 1048 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |