Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: src/ia32/deoptimizer-ia32.cc

Issue 6778018: Only pass isolate parameter to C helper functions that need it. (Closed)
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 __ Set(ecx, Immediate(0)); 634 __ Set(ecx, Immediate(0));
635 __ lea(edx, Operand(esp, kSavedRegistersAreaSize + 1 * kPointerSize)); 635 __ lea(edx, Operand(esp, kSavedRegistersAreaSize + 1 * kPointerSize));
636 } else { 636 } else {
637 __ mov(ecx, Operand(esp, kSavedRegistersAreaSize + 1 * kPointerSize)); 637 __ mov(ecx, Operand(esp, kSavedRegistersAreaSize + 1 * kPointerSize));
638 __ lea(edx, Operand(esp, kSavedRegistersAreaSize + 2 * kPointerSize)); 638 __ lea(edx, Operand(esp, kSavedRegistersAreaSize + 2 * kPointerSize));
639 } 639 }
640 __ sub(edx, Operand(ebp)); 640 __ sub(edx, Operand(ebp));
641 __ neg(edx); 641 __ neg(edx);
642 642
643 // Allocate a new deoptimizer object. 643 // Allocate a new deoptimizer object.
644 __ PrepareCallCFunction(5, eax); 644 __ PrepareCallCFunction(6, eax);
645 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 645 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
646 __ mov(Operand(esp, 0 * kPointerSize), eax); // Function. 646 __ mov(Operand(esp, 0 * kPointerSize), eax); // Function.
647 __ mov(Operand(esp, 1 * kPointerSize), Immediate(type())); // Bailout type. 647 __ mov(Operand(esp, 1 * kPointerSize), Immediate(type())); // Bailout type.
648 __ mov(Operand(esp, 2 * kPointerSize), ebx); // Bailout id. 648 __ mov(Operand(esp, 2 * kPointerSize), ebx); // Bailout id.
649 __ mov(Operand(esp, 3 * kPointerSize), ecx); // Code address or 0. 649 __ mov(Operand(esp, 3 * kPointerSize), ecx); // Code address or 0.
650 __ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta. 650 __ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta.
651 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 5); 651 __ mov(Operand(esp, 5 * kPointerSize),
652 Immediate(ExternalReference::isolate_address()));
653 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6);
652 654
653 // Preserve deoptimizer object in register eax and get the input 655 // Preserve deoptimizer object in register eax and get the input
654 // frame descriptor pointer. 656 // frame descriptor pointer.
655 __ mov(ebx, Operand(eax, Deoptimizer::input_offset())); 657 __ mov(ebx, Operand(eax, Deoptimizer::input_offset()));
656 658
657 // Fill in the input registers. 659 // Fill in the input registers.
658 for (int i = kNumberOfRegisters - 1; i >= 0; i--) { 660 for (int i = kNumberOfRegisters - 1; i >= 0; i--) {
659 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); 661 int offset = (i * kPointerSize) + FrameDescription::registers_offset();
660 __ pop(Operand(ebx, offset)); 662 __ pop(Operand(ebx, offset));
661 } 663 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 } 765 }
764 __ bind(&done); 766 __ bind(&done);
765 } 767 }
766 768
767 #undef __ 769 #undef __
768 770
769 771
770 } } // namespace v8::internal 772 } } // namespace v8::internal
771 773
772 #endif // V8_TARGET_ARCH_IA32 774 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698