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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
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 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2050 __ pushq(context_value); | 2050 __ pushq(context_value); |
2051 compiler->GenerateCallRuntime(token_pos(), | 2051 compiler->GenerateCallRuntime(token_pos(), |
2052 deopt_id(), | 2052 deopt_id(), |
2053 kCloneContextRuntimeEntry, | 2053 kCloneContextRuntimeEntry, |
2054 locs()); | 2054 locs()); |
2055 __ popq(result); // Remove argument. | 2055 __ popq(result); // Remove argument. |
2056 __ popq(result); // Get result (cloned context). | 2056 __ popq(result); // Get result (cloned context). |
2057 } | 2057 } |
2058 | 2058 |
2059 | 2059 |
2060 LocationSummary* CatchEntryInstr::MakeLocationSummary() const { | 2060 LocationSummary* CatchBlockEntryInstr::MakeLocationSummary() const { |
2061 return LocationSummary::Make(0, | 2061 UNREACHABLE(); |
2062 Location::NoLocation(), | 2062 return NULL; |
2063 LocationSummary::kNoCall); | |
2064 } | 2063 } |
2065 | 2064 |
2066 | 2065 |
2067 // Restore stack and initialize the two exception variables: | 2066 void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2068 // exception and stack trace variables. | 2067 __ Bind(compiler->GetJumpLabel(this)); |
2069 void CatchEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2068 compiler->AddExceptionHandler(catch_try_index(), |
| 2069 try_index(), |
| 2070 compiler->assembler()->CodeSize(), |
| 2071 catch_handler_types_); |
| 2072 if (HasParallelMove()) { |
| 2073 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
| 2074 } |
| 2075 |
2070 // Restore RSP from RBP as we are coming from a throw and the code for | 2076 // Restore RSP from RBP as we are coming from a throw and the code for |
2071 // popping arguments has not been run. | 2077 // popping arguments has not been run. |
2072 const intptr_t fp_sp_dist = | 2078 const intptr_t fp_sp_dist = |
2073 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; | 2079 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; |
2074 ASSERT(fp_sp_dist <= 0); | 2080 ASSERT(fp_sp_dist <= 0); |
2075 __ leaq(RSP, Address(RBP, fp_sp_dist)); | 2081 __ leaq(RSP, Address(RBP, fp_sp_dist)); |
2076 | 2082 |
2077 ASSERT(!exception_var().is_captured()); | 2083 // Restore stack and initialize the two exception variables: |
2078 ASSERT(!stacktrace_var().is_captured()); | 2084 // exception and stack trace variables. |
2079 __ movq(Address(RBP, exception_var().index() * kWordSize), | 2085 __ movq(Address(RBP, exception_var().index() * kWordSize), |
2080 kExceptionObjectReg); | 2086 kExceptionObjectReg); |
2081 __ movq(Address(RBP, stacktrace_var().index() * kWordSize), | 2087 __ movq(Address(RBP, stacktrace_var().index() * kWordSize), |
2082 kStackTraceObjectReg); | 2088 kStackTraceObjectReg); |
2083 } | 2089 } |
2084 | 2090 |
2085 | 2091 |
2086 LocationSummary* CheckStackOverflowInstr::MakeLocationSummary() const { | 2092 LocationSummary* CheckStackOverflowInstr::MakeLocationSummary() const { |
2087 const intptr_t kNumInputs = 0; | 2093 const intptr_t kNumInputs = 0; |
2088 const intptr_t kNumTemps = 1; | 2094 const intptr_t kNumTemps = 1; |
(...skipping 2495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4584 PcDescriptors::kOther, | 4590 PcDescriptors::kOther, |
4585 locs()); | 4591 locs()); |
4586 __ Drop(2); // Discard type arguments and receiver. | 4592 __ Drop(2); // Discard type arguments and receiver. |
4587 } | 4593 } |
4588 | 4594 |
4589 } // namespace dart | 4595 } // namespace dart |
4590 | 4596 |
4591 #undef __ | 4597 #undef __ |
4592 | 4598 |
4593 #endif // defined TARGET_ARCH_X64 | 4599 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |