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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2036 __ Push(context_value); | 2036 __ Push(context_value); |
2037 compiler->GenerateCallRuntime(token_pos(), | 2037 compiler->GenerateCallRuntime(token_pos(), |
2038 deopt_id(), | 2038 deopt_id(), |
2039 kCloneContextRuntimeEntry, | 2039 kCloneContextRuntimeEntry, |
2040 locs()); | 2040 locs()); |
2041 __ Drop(1); // Remove argument. | 2041 __ Drop(1); // Remove argument. |
2042 __ Pop(result); // Get result (cloned context). | 2042 __ Pop(result); // Get result (cloned context). |
2043 } | 2043 } |
2044 | 2044 |
2045 | 2045 |
2046 LocationSummary* CatchEntryInstr::MakeLocationSummary() const { | 2046 LocationSummary* CatchBlockEntryInstr::MakeLocationSummary() const { |
2047 return LocationSummary::Make(0, | 2047 UNREACHABLE(); |
2048 Location::NoLocation(), | 2048 return NULL; |
2049 LocationSummary::kNoCall); | |
2050 } | 2049 } |
2051 | 2050 |
2052 | 2051 |
2053 // Restore stack and initialize the two exception variables: | 2052 void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2054 // exception and stack trace variables. | 2053 __ Bind(compiler->GetJumpLabel(this)); |
2055 void CatchEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2054 compiler->AddExceptionHandler(catch_try_index(), |
| 2055 try_index(), |
| 2056 compiler->assembler()->CodeSize(), |
| 2057 catch_handler_types_); |
| 2058 |
| 2059 // Restore the pool pointer. |
| 2060 __ LoadPoolPointer(); |
| 2061 |
| 2062 if (HasParallelMove()) { |
| 2063 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
| 2064 } |
| 2065 |
2056 // Restore SP from FP as we are coming from a throw and the code for | 2066 // Restore SP from FP as we are coming from a throw and the code for |
2057 // popping arguments has not been run. | 2067 // popping arguments has not been run. |
2058 const intptr_t fp_sp_dist = | 2068 const intptr_t fp_sp_dist = |
2059 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; | 2069 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; |
2060 ASSERT(fp_sp_dist <= 0); | 2070 ASSERT(fp_sp_dist <= 0); |
2061 __ AddImmediate(SP, FP, fp_sp_dist); | 2071 __ AddImmediate(SP, FP, fp_sp_dist); |
2062 | 2072 |
2063 ASSERT(!exception_var().is_captured()); | 2073 // Restore stack and initialize the two exception variables: |
2064 ASSERT(!stacktrace_var().is_captured()); | 2074 // exception and stack trace variables. |
2065 __ StoreToOffset(kWord, kExceptionObjectReg, | 2075 __ StoreToOffset(kWord, kExceptionObjectReg, |
2066 FP, exception_var().index() * kWordSize); | 2076 FP, exception_var().index() * kWordSize); |
2067 __ StoreToOffset(kWord, kStackTraceObjectReg, | 2077 __ StoreToOffset(kWord, kStackTraceObjectReg, |
2068 FP, stacktrace_var().index() * kWordSize); | 2078 FP, stacktrace_var().index() * kWordSize); |
2069 | |
2070 // Restore the pool pointer. | |
2071 __ LoadPoolPointer(); | |
2072 } | 2079 } |
2073 | 2080 |
2074 | 2081 |
2075 LocationSummary* CheckStackOverflowInstr::MakeLocationSummary() const { | 2082 LocationSummary* CheckStackOverflowInstr::MakeLocationSummary() const { |
2076 const intptr_t kNumInputs = 0; | 2083 const intptr_t kNumInputs = 0; |
2077 const intptr_t kNumTemps = 1; | 2084 const intptr_t kNumTemps = 1; |
2078 LocationSummary* summary = | 2085 LocationSummary* summary = |
2079 new LocationSummary(kNumInputs, | 2086 new LocationSummary(kNumInputs, |
2080 kNumTemps, | 2087 kNumTemps, |
2081 LocationSummary::kCallOnSlowPath); | 2088 LocationSummary::kCallOnSlowPath); |
(...skipping 2345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4427 compiler->GenerateCall(token_pos(), | 4434 compiler->GenerateCall(token_pos(), |
4428 &label, | 4435 &label, |
4429 PcDescriptors::kOther, | 4436 PcDescriptors::kOther, |
4430 locs()); | 4437 locs()); |
4431 __ Drop(2); // Discard type arguments and receiver. | 4438 __ Drop(2); // Discard type arguments and receiver. |
4432 } | 4439 } |
4433 | 4440 |
4434 } // namespace dart | 4441 } // namespace dart |
4435 | 4442 |
4436 #endif // defined TARGET_ARCH_ARM | 4443 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |