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 // The intrinsic code below is executed before a method has built its frame. | 5 // The intrinsic code below is executed before a method has built its frame. |
6 // The return address is on the stack and the arguments below it. | 6 // The return address is on the stack and the arguments below it. |
7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. | 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. |
8 // Each intrinsification method returns true if the corresponding | 8 // Each intrinsification method returns true if the corresponding |
9 // Dart method was intrinsified. | 9 // Dart method was intrinsified. |
10 | 10 |
(...skipping 2298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2309 __ j(NOT_ZERO, &true_label, Assembler::kNearJump); | 2309 __ j(NOT_ZERO, &true_label, Assembler::kNearJump); |
2310 // Not enabled. | 2310 // Not enabled. |
2311 __ LoadObject(EAX, Bool::False()); | 2311 __ LoadObject(EAX, Bool::False()); |
2312 __ ret(); | 2312 __ ret(); |
2313 // Enabled. | 2313 // Enabled. |
2314 __ Bind(&true_label); | 2314 __ Bind(&true_label); |
2315 __ LoadObject(EAX, Bool::True()); | 2315 __ LoadObject(EAX, Bool::True()); |
2316 __ ret(); | 2316 __ ret(); |
2317 } | 2317 } |
2318 | 2318 |
| 2319 |
| 2320 void Intrinsifier::ClearAsyncThreadStackTrace(Assembler* assembler) { |
| 2321 __ LoadObject(EAX, Object::null_object()); |
| 2322 __ movl(Address(THR, Thread::async_stack_trace_offset()), EAX); |
| 2323 __ ret(); |
| 2324 } |
| 2325 |
| 2326 |
| 2327 void Intrinsifier::SetAsyncThreadStackTrace(Assembler* assembler) { |
| 2328 __ movl(Address(THR, Thread::async_stack_trace_offset()), EAX); |
| 2329 __ LoadObject(EAX, Object::null_object()); |
| 2330 __ ret(); |
| 2331 } |
| 2332 |
2319 #undef __ | 2333 #undef __ |
2320 | 2334 |
2321 } // namespace dart | 2335 } // namespace dart |
2322 | 2336 |
2323 #endif // defined TARGET_ARCH_IA32 | 2337 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |