| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2095 __ pushl(context_value); | 2095 __ pushl(context_value); |
| 2096 compiler->GenerateCallRuntime(token_pos(), | 2096 compiler->GenerateCallRuntime(token_pos(), |
| 2097 deopt_id(), | 2097 deopt_id(), |
| 2098 kCloneContextRuntimeEntry, | 2098 kCloneContextRuntimeEntry, |
| 2099 locs()); | 2099 locs()); |
| 2100 __ popl(result); // Remove argument. | 2100 __ popl(result); // Remove argument. |
| 2101 __ popl(result); // Get result (cloned context). | 2101 __ popl(result); // Get result (cloned context). |
| 2102 } | 2102 } |
| 2103 | 2103 |
| 2104 | 2104 |
| 2105 LocationSummary* CatchEntryInstr::MakeLocationSummary() const { | 2105 LocationSummary* CatchBlockEntryInstr::MakeLocationSummary() const { |
| 2106 return LocationSummary::Make(0, | 2106 UNREACHABLE(); |
| 2107 Location::NoLocation(), | 2107 return NULL; |
| 2108 LocationSummary::kNoCall); | |
| 2109 } | 2108 } |
| 2110 | 2109 |
| 2111 | 2110 |
| 2112 // Restore stack and initialize the two exception variables: | 2111 void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2113 // exception and stack trace variables. | 2112 __ Bind(compiler->GetJumpLabel(this)); |
| 2114 void CatchEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2113 compiler->AddExceptionHandler(catch_try_index(), |
| 2114 try_index(), |
| 2115 compiler->assembler()->CodeSize(), |
| 2116 catch_handler_types_); |
| 2117 if (HasParallelMove()) { |
| 2118 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
| 2119 } |
| 2120 |
| 2115 // Restore ESP from EBP as we are coming from a throw and the code for | 2121 // Restore ESP from EBP as we are coming from a throw and the code for |
| 2116 // popping arguments has not been run. | 2122 // popping arguments has not been run. |
| 2117 const intptr_t fp_sp_dist = | 2123 const intptr_t fp_sp_dist = |
| 2118 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; | 2124 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; |
| 2119 ASSERT(fp_sp_dist <= 0); | 2125 ASSERT(fp_sp_dist <= 0); |
| 2120 __ leal(ESP, Address(EBP, fp_sp_dist)); | 2126 __ leal(ESP, Address(EBP, fp_sp_dist)); |
| 2121 | 2127 |
| 2122 ASSERT(!exception_var().is_captured()); | 2128 // Restore stack and initialize the two exception variables: |
| 2123 ASSERT(!stacktrace_var().is_captured()); | 2129 // exception and stack trace variables. |
| 2124 __ movl(Address(EBP, exception_var().index() * kWordSize), | 2130 __ movl(Address(EBP, exception_var().index() * kWordSize), |
| 2125 kExceptionObjectReg); | 2131 kExceptionObjectReg); |
| 2126 __ movl(Address(EBP, stacktrace_var().index() * kWordSize), | 2132 __ movl(Address(EBP, stacktrace_var().index() * kWordSize), |
| 2127 kStackTraceObjectReg); | 2133 kStackTraceObjectReg); |
| 2128 } | 2134 } |
| 2129 | 2135 |
| 2130 | 2136 |
| 2131 LocationSummary* CheckStackOverflowInstr::MakeLocationSummary() const { | 2137 LocationSummary* CheckStackOverflowInstr::MakeLocationSummary() const { |
| 2132 const intptr_t kNumInputs = 0; | 2138 const intptr_t kNumInputs = 0; |
| 2133 const intptr_t kNumTemps = 0; | 2139 const intptr_t kNumTemps = 0; |
| (...skipping 2817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4951 PcDescriptors::kOther, | 4957 PcDescriptors::kOther, |
| 4952 locs()); | 4958 locs()); |
| 4953 __ Drop(2); // Discard type arguments and receiver. | 4959 __ Drop(2); // Discard type arguments and receiver. |
| 4954 } | 4960 } |
| 4955 | 4961 |
| 4956 } // namespace dart | 4962 } // namespace dart |
| 4957 | 4963 |
| 4958 #undef __ | 4964 #undef __ |
| 4959 | 4965 |
| 4960 #endif // defined TARGET_ARCH_IA32 | 4966 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |