| OLD | NEW |
| 1 | 1 |
| 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. | 6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 7 #if defined(TARGET_ARCH_ARM) | 7 #if defined(TARGET_ARCH_ARM) |
| 8 | 8 |
| 9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 | 10 |
| (...skipping 2889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2900 // Auxiliary variables introduced by the try catch can be captured if we are | 2900 // Auxiliary variables introduced by the try catch can be captured if we are |
| 2901 // inside a function with yield/resume points. In this case we first need | 2901 // inside a function with yield/resume points. In this case we first need |
| 2902 // to restore the context to match the context at entry into the closure. | 2902 // to restore the context to match the context at entry into the closure. |
| 2903 if (should_restore_closure_context()) { | 2903 if (should_restore_closure_context()) { |
| 2904 const ParsedFunction& parsed_function = compiler->parsed_function(); | 2904 const ParsedFunction& parsed_function = compiler->parsed_function(); |
| 2905 ASSERT(parsed_function.function().IsClosureFunction()); | 2905 ASSERT(parsed_function.function().IsClosureFunction()); |
| 2906 LocalScope* scope = parsed_function.node_sequence()->scope(); | 2906 LocalScope* scope = parsed_function.node_sequence()->scope(); |
| 2907 | 2907 |
| 2908 LocalVariable* closure_parameter = scope->VariableAt(0); | 2908 LocalVariable* closure_parameter = scope->VariableAt(0); |
| 2909 ASSERT(!closure_parameter->is_captured()); | 2909 ASSERT(!closure_parameter->is_captured()); |
| 2910 __ ldr(CTX, Address(FP, closure_parameter->index() * kWordSize)); | 2910 __ LoadFromOffset(kWord, CTX, FP, closure_parameter->index() * kWordSize); |
| 2911 __ ldr(CTX, FieldAddress(CTX, Closure::context_offset())); | 2911 __ LoadFieldFromOffset(kWord, CTX, CTX, Closure::context_offset()); |
| 2912 | 2912 |
| 2913 const intptr_t context_index = | 2913 const intptr_t context_index = |
| 2914 parsed_function.current_context_var()->index(); | 2914 parsed_function.current_context_var()->index(); |
| 2915 __ StoreToOffset(kWord, CTX, FP, context_index * kWordSize); | 2915 __ StoreToOffset(kWord, CTX, FP, context_index * kWordSize); |
| 2916 } | 2916 } |
| 2917 | 2917 |
| 2918 // Initialize exception and stack trace variables. | 2918 // Initialize exception and stack trace variables. |
| 2919 if (exception_var().is_captured()) { | 2919 if (exception_var().is_captured()) { |
| 2920 ASSERT(stacktrace_var().is_captured()); | 2920 ASSERT(stacktrace_var().is_captured()); |
| 2921 __ StoreIntoObjectOffset(CTX, | 2921 __ StoreIntoObjectOffset(CTX, |
| (...skipping 4335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7257 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), | 7257 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), |
| 7258 kGrowRegExpStackRuntimeEntry, 1, locs()); | 7258 kGrowRegExpStackRuntimeEntry, 1, locs()); |
| 7259 __ Drop(1); | 7259 __ Drop(1); |
| 7260 __ Pop(result); | 7260 __ Pop(result); |
| 7261 } | 7261 } |
| 7262 | 7262 |
| 7263 | 7263 |
| 7264 } // namespace dart | 7264 } // namespace dart |
| 7265 | 7265 |
| 7266 #endif // defined TARGET_ARCH_ARM | 7266 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |