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

Unified Diff: src/ia32/macro-assembler-ia32.cc

Issue 6778018: Only pass isolate parameter to C helper functions that need it. (Closed)
Patch Set: Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/regexp-macro-assembler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index ba30c49ced678c18fcc4658323e9ff779e38ecd6..21315378c38eb25be1392499cc4f31b2b996865b 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -1988,17 +1988,14 @@ void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register object1,
void MacroAssembler::PrepareCallCFunction(int num_arguments, Register scratch) {
- // Reserve space for Isolate address which is always passed as last parameter
- num_arguments += 1;
-
- int frameAlignment = OS::ActivationFrameAlignment();
- if (frameAlignment != 0) {
+ int frame_alignment = OS::ActivationFrameAlignment();
+ if (frame_alignment != 0) {
// Make stack end at alignment and make room for num_arguments words
// and the original value of esp.
mov(scratch, esp);
sub(Operand(esp), Immediate((num_arguments + 1) * kPointerSize));
- ASSERT(IsPowerOf2(frameAlignment));
- and_(esp, -frameAlignment);
+ ASSERT(IsPowerOf2(frame_alignment));
+ and_(esp, -frame_alignment);
mov(Operand(esp, num_arguments * kPointerSize), scratch);
} else {
sub(Operand(esp), Immediate(num_arguments * kPointerSize));
@@ -2016,11 +2013,6 @@ void MacroAssembler::CallCFunction(ExternalReference function,
void MacroAssembler::CallCFunction(Register function,
int num_arguments) {
- // Pass current isolate address as additional parameter.
- mov(Operand(esp, num_arguments * kPointerSize),
- Immediate(ExternalReference::isolate_address()));
- num_arguments += 1;
-
// Check stack alignment.
if (emit_debug_code()) {
CheckStackAlignment();
@@ -2030,7 +2022,7 @@ void MacroAssembler::CallCFunction(Register function,
if (OS::ActivationFrameAlignment() != 0) {
mov(esp, Operand(esp, num_arguments * kPointerSize));
} else {
- add(Operand(esp), Immediate(num_arguments * sizeof(int32_t)));
+ add(Operand(esp), Immediate(num_arguments * kPointerSize));
}
}
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/regexp-macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698