| OLD | NEW | 
|     1 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file |     1 // Copyright (c) 2012, 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" |     5 #include "vm/globals.h" | 
|     6 #if defined(TARGET_ARCH_IA32) |     6 #if defined(TARGET_ARCH_IA32) | 
|     7  |     7  | 
|     8 #include "vm/assembler.h" |     8 #include "vm/assembler.h" | 
|     9 #include "vm/assembler_macros.h" |     9 #include "vm/assembler_macros.h" | 
|    10 #include "vm/compiler.h" |    10 #include "vm/compiler.h" | 
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   556     // Restore result into EBX. |   556     // Restore result into EBX. | 
|   557     __ movl(EBX, Address(EBP, -1 * kWordSize)); |   557     __ movl(EBX, Address(EBP, -1 * kWordSize)); | 
|   558   } |   558   } | 
|   559   // Code above cannot cause GC. |   559   // Code above cannot cause GC. | 
|   560   __ LeaveFrame(); |   560   __ LeaveFrame(); | 
|   561   __ movl(EBP, EAX); |   561   __ movl(EBP, EAX); | 
|   562  |   562  | 
|   563   // Frame is fully rewritten at this point and it is safe to perform a GC. |   563   // Frame is fully rewritten at this point and it is safe to perform a GC. | 
|   564   // Materialize any objects that were deferred by FillFrame because they |   564   // Materialize any objects that were deferred by FillFrame because they | 
|   565   // require allocation. |   565   // require allocation. | 
|   566   __ EnterFrame(0); |   566   AssemblerMacros::EnterStubFrame(assembler); | 
|   567   if (preserve_eax) { |   567   if (preserve_eax) { | 
|   568     __ pushl(EBX);  // Preserve result, it will be GC-d here. |   568     __ pushl(EBX);  // Preserve result, it will be GC-d here. | 
|   569   } |   569   } | 
|   570   __ CallRuntime(kDeoptimizeMaterializeDoublesRuntimeEntry); |   570   __ CallRuntime(kDeoptimizeMaterializeDoublesRuntimeEntry); | 
|   571   if (preserve_eax) { |   571   if (preserve_eax) { | 
|   572     __ popl(EAX);  // Restore result. |   572     __ popl(EAX);  // Restore result. | 
|   573   } |   573   } | 
|   574   __ LeaveFrame(); |   574   __ LeaveFrame(); | 
|   575   __ ret(); |   575   __ ret(); | 
|   576 } |   576 } | 
|   577  |   577  | 
 |   578  | 
|   578 // TOS: return address + call-instruction-size (5 bytes). |   579 // TOS: return address + call-instruction-size (5 bytes). | 
|   579 // EAX: result, must be preserved |   580 // EAX: result, must be preserved | 
|   580 void StubCode::GenerateDeoptimizeLazyStub(Assembler* assembler) { |   581 void StubCode::GenerateDeoptimizeLazyStub(Assembler* assembler) { | 
|   581   // Correct return address to point just after the call that is being |   582   // Correct return address to point just after the call that is being | 
|   582   // deoptimized. |   583   // deoptimized. | 
|   583   __ popl(EBX); |   584   __ popl(EBX); | 
|   584   __ subl(EBX, Immediate(CallPattern::InstructionLength())); |   585   __ subl(EBX, Immediate(CallPattern::InstructionLength())); | 
|   585   __ pushl(EBX); |   586   __ pushl(EBX); | 
|   586   GenerateDeoptimizationSequence(assembler, true);  // Preserve EAX. |   587   GenerateDeoptimizationSequence(assembler, true);  // Preserve EAX. | 
|   587 } |   588 } | 
| (...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1960   __ movl(EAX, Address(ESP, 4 * kWordSize));  // Load error object. |  1961   __ movl(EAX, Address(ESP, 4 * kWordSize));  // Load error object. | 
|  1961   __ movl(EBP, Address(ESP, 3 * kWordSize));  // Load target frame_pointer. |  1962   __ movl(EBP, Address(ESP, 3 * kWordSize));  // Load target frame_pointer. | 
|  1962   __ movl(EBX, Address(ESP, 1 * kWordSize));  // Load target PC into EBX. |  1963   __ movl(EBX, Address(ESP, 1 * kWordSize));  // Load target PC into EBX. | 
|  1963   __ movl(ESP, Address(ESP, 2 * kWordSize));  // Load target stack_pointer. |  1964   __ movl(ESP, Address(ESP, 2 * kWordSize));  // Load target stack_pointer. | 
|  1964   __ jmp(EBX);  // Jump to the exception handler code. |  1965   __ jmp(EBX);  // Jump to the exception handler code. | 
|  1965 } |  1966 } | 
|  1966  |  1967  | 
|  1967 }  // namespace dart |  1968 }  // namespace dart | 
|  1968  |  1969  | 
|  1969 #endif  // defined TARGET_ARCH_IA32 |  1970 #endif  // defined TARGET_ARCH_IA32 | 
| OLD | NEW |