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" | 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/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 __ ret(); | 451 __ ret(); |
452 } | 452 } |
453 | 453 |
454 | 454 |
455 // TOS: return address + call-instruction-size (5 bytes). | 455 // TOS: return address + call-instruction-size (5 bytes). |
456 // EAX: result, must be preserved | 456 // EAX: result, must be preserved |
457 void StubCode::GenerateDeoptimizeLazyStub(Assembler* assembler) { | 457 void StubCode::GenerateDeoptimizeLazyStub(Assembler* assembler) { |
458 // Correct return address to point just after the call that is being | 458 // Correct return address to point just after the call that is being |
459 // deoptimized. | 459 // deoptimized. |
460 __ popl(EBX); | 460 __ popl(EBX); |
461 __ subl(EBX, Immediate(CallPattern::InstructionLength())); | 461 __ subl(EBX, Immediate(CallPattern::pattern_length_in_bytes())); |
462 __ pushl(EBX); | 462 __ pushl(EBX); |
463 GenerateDeoptimizationSequence(assembler, true); // Preserve EAX. | 463 GenerateDeoptimizationSequence(assembler, true); // Preserve EAX. |
464 } | 464 } |
465 | 465 |
466 | 466 |
467 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { | 467 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { |
468 GenerateDeoptimizationSequence(assembler, false); // Don't preserve EAX. | 468 GenerateDeoptimizationSequence(assembler, false); // Don't preserve EAX. |
469 } | 469 } |
470 | 470 |
471 | 471 |
(...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2074 // EBX: entry point. | 2074 // EBX: entry point. |
2075 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { | 2075 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { |
2076 EmitMegamorphicLookup(assembler, EDI, EBX, EBX); | 2076 EmitMegamorphicLookup(assembler, EDI, EBX, EBX); |
2077 __ ret(); | 2077 __ ret(); |
2078 } | 2078 } |
2079 | 2079 |
2080 | 2080 |
2081 } // namespace dart | 2081 } // namespace dart |
2082 | 2082 |
2083 #endif // defined TARGET_ARCH_IA32 | 2083 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |