Revision: 16710
Author: [email protected]
Date: Fri Sep 13 10:23:04 2013 UTC
Log: remove getcurrent from stubs
[email protected]
BUG=
Review URL: https://codereview.chromium.org/23756009
http://code.google.com/p/v8/source/detail?r=16710
Modified:
/branches/bleeding_edge/src/arm/builtins-arm.cc
/branches/bleeding_edge/src/arm/code-stubs-arm.cc
/branches/bleeding_edge/src/arm/codegen-arm.cc
/branches/bleeding_edge/src/ia32/builtins-ia32.cc
/branches/bleeding_edge/src/ia32/code-stubs-ia32.cc
/branches/bleeding_edge/src/ia32/codegen-ia32.cc
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/src/objects.h
/branches/bleeding_edge/src/runtime.cc
/branches/bleeding_edge/src/runtime.h
/branches/bleeding_edge/src/x64/builtins-x64.cc
/branches/bleeding_edge/src/x64/code-stubs-x64.cc
/branches/bleeding_edge/src/x64/codegen-x64.cc
=======================================
--- /branches/bleeding_edge/src/arm/builtins-arm.cc Thu Sep 12 11:30:56
2013 UTC
+++ /branches/bleeding_edge/src/arm/builtins-arm.cc Fri Sep 13 10:23:04
2013 UTC
@@ -807,12 +807,13 @@
// The following registers must be saved and restored when calling
through to
// the runtime:
// r0 - contains return address (beginning of patch sequence)
- // r1 - function object
+ // r1 - isolate
FrameScope scope(masm, StackFrame::MANUAL);
__ stm(db_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit());
- __ PrepareCallCFunction(1, 0, r1);
+ __ PrepareCallCFunction(1, 0, r2);
+ __ mov(r1, Operand(ExternalReference::isolate_address(masm->isolate())));
__ CallCFunction(
- ExternalReference::get_make_code_young_function(masm->isolate()), 1);
+ ExternalReference::get_make_code_young_function(masm->isolate()), 2);
__ ldm(ia_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit());
__ mov(pc, r0);
}
=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.cc Fri Sep 13 09:57:48
2013 UTC
+++ /branches/bleeding_edge/src/arm/code-stubs-arm.cc Fri Sep 13 10:23:04
2013 UTC
@@ -2765,9 +2765,10 @@
if (do_gc) {
// Passing r0.
- __ PrepareCallCFunction(1, 0, r1);
+ __ PrepareCallCFunction(2, 0, r1);
+ __ mov(r1,
Operand(ExternalReference::isolate_address(masm->isolate())));
__ CallCFunction(ExternalReference::perform_gc_function(isolate),
- 1, 0);
+ 2, 0);
}
ExternalReference scope_depth =
=======================================
--- /branches/bleeding_edge/src/arm/codegen-arm.cc Wed Sep 11 18:30:01 2013
UTC
+++ /branches/bleeding_edge/src/arm/codegen-arm.cc Fri Sep 13 10:23:04 2013
UTC
@@ -870,7 +870,8 @@
}
-void Code::PatchPlatformCodeAge(byte* sequence,
+void Code::PatchPlatformCodeAge(Isolate* isolate,
+ byte* sequence,
Code::Age age,
MarkingParity parity) {
uint32_t young_length;
@@ -879,7 +880,7 @@
CopyBytes(sequence, young_sequence, young_length);
CPU::FlushICache(sequence, young_length);
} else {
- Code* stub = GetCodeAgeStub(age, parity);
+ Code* stub = GetCodeAgeStub(isolate, age, parity);
CodePatcher patcher(sequence, young_length / Assembler::kInstrSize);
patcher.masm()->add(r0, pc, Operand(-8));
patcher.masm()->ldr(pc, MemOperand(pc, -4));
=======================================
--- /branches/bleeding_edge/src/ia32/builtins-ia32.cc Thu Sep 12 11:30:56
2013 UTC
+++ /branches/bleeding_edge/src/ia32/builtins-ia32.cc Fri Sep 13 10:23:04
2013 UTC
@@ -539,10 +539,12 @@
__ mov(eax, Operand(esp, 8 * kPointerSize));
{
FrameScope scope(masm, StackFrame::MANUAL);
- __ PrepareCallCFunction(1, ebx);
+ __ PrepareCallCFunction(2, ebx);
+ __ mov(Operand(esp, 1 * kPointerSize),
+ Immediate(ExternalReference::isolate_address(masm->isolate())));
__ mov(Operand(esp, 0), eax);
__ CallCFunction(
- ExternalReference::get_make_code_young_function(masm->isolate()),
1);
+ ExternalReference::get_make_code_young_function(masm->isolate()),
2);
}
__ popad();
__ ret(0);
=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Fri Sep 13 09:57:48
2013 UTC
+++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Fri Sep 13 10:23:04
2013 UTC
@@ -4507,6 +4507,8 @@
// stack alignment is known to be correct. This function takes one
argument
// which is passed on the stack, and we know that the stack has been
// prepared to pass at least one argument.
+ __ mov(Operand(esp, 1 * kPointerSize),
+ Immediate(ExternalReference::isolate_address(masm->isolate())));
__ mov(Operand(esp, 0 * kPointerSize), eax); // Result.
__ call(FUNCTION_ADDR(Runtime::PerformGC), RelocInfo::RUNTIME_ENTRY);
}
=======================================
--- /branches/bleeding_edge/src/ia32/codegen-ia32.cc Fri Sep 13 07:59:48
2013 UTC
+++ /branches/bleeding_edge/src/ia32/codegen-ia32.cc Fri Sep 13 10:23:04
2013 UTC
@@ -1165,7 +1165,8 @@
}
-void Code::PatchPlatformCodeAge(byte* sequence,
+void Code::PatchPlatformCodeAge(Isolate* isolate,
+ byte* sequence,
Code::Age age,
MarkingParity parity) {
uint32_t young_length;
@@ -1174,7 +1175,7 @@
CopyBytes(sequence, young_sequence, young_length);
CPU::FlushICache(sequence, young_length);
} else {
- Code* stub = GetCodeAgeStub(age, parity);
+ Code* stub = GetCodeAgeStub(isolate, age, parity);
CodePatcher patcher(sequence, young_length);
patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32);
}
=======================================
--- /branches/bleeding_edge/src/objects.cc Fri Sep 13 09:51:11 2013 UTC
+++ /branches/bleeding_edge/src/objects.cc Fri Sep 13 10:23:04 2013 UTC
@@ -10436,8 +10436,8 @@
}
-void Code::MakeCodeAgeSequenceYoung(byte* sequence) {
- PatchPlatformCodeAge(sequence, kNoAge, NO_MARKING_PARITY);
+void Code::MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate) {
+ PatchPlatformCodeAge(isolate, sequence, kNoAge, NO_MARKING_PARITY);
}
@@ -10448,7 +10448,9 @@
MarkingParity code_parity;
GetCodeAgeAndParity(sequence, &age, &code_parity);
if (age != kLastCodeAge && code_parity != current_parity) {
- PatchPlatformCodeAge(sequence, static_cast<Age>(age + 1),
+ PatchPlatformCodeAge(GetIsolate(),
+ sequence,
+ static_cast<Age>(age + 1),
current_parity);
}
}
@@ -10511,8 +10513,7 @@
}
-Code* Code::GetCodeAgeStub(Age age, MarkingParity parity) {
- Isolate* isolate = Isolate::Current();
+Code* Code::GetCodeAgeStub(Isolate* isolate, Age age, MarkingParity
parity) {
Builtins* builtins = isolate->builtins();
switch (age) {
#define HANDLE_CODE_AGE(AGE) \
=======================================
--- /branches/bleeding_edge/src/objects.h Fri Sep 13 09:51:11 2013 UTC
+++ /branches/bleeding_edge/src/objects.h Fri Sep 13 10:23:04 2013 UTC
@@ -5155,7 +5155,7 @@
// being entered through the prologue. Used to determine when it is
// relatively safe to flush this code object and replace it with the lazy
// compilation stub.
- static void MakeCodeAgeSequenceYoung(byte* sequence);
+ static void MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate);
void MakeOlder(MarkingParity);
static bool IsYoungSequence(byte* sequence);
bool IsOld();
@@ -5301,10 +5301,11 @@
MarkingParity* parity);
static void GetCodeAgeAndParity(byte* sequence, Age* age,
MarkingParity* parity);
- static Code* GetCodeAgeStub(Age age, MarkingParity parity);
+ static Code* GetCodeAgeStub(Isolate* isolate, Age age, MarkingParity
parity);
// Code aging -- platform-specific
- static void PatchPlatformCodeAge(byte* sequence, Age age,
+ static void PatchPlatformCodeAge(Isolate* isolate,
+ byte* sequence, Age age,
MarkingParity parity);
DISALLOW_IMPLICIT_CONSTRUCTORS(Code);
=======================================
--- /branches/bleeding_edge/src/runtime.cc Fri Sep 13 09:51:11 2013 UTC
+++ /branches/bleeding_edge/src/runtime.cc Fri Sep 13 10:23:04 2013 UTC
@@ -14791,8 +14791,7 @@
}
-void Runtime::PerformGC(Object* result) {
- Isolate* isolate = Isolate::Current();
+void Runtime::PerformGC(Object* result, Isolate* isolate) {
Failure* failure = Failure::cast(result);
if (failure->IsRetryAfterGC()) {
if (isolate->heap()->new_space()->AddFreshPage()) {
=======================================
--- /branches/bleeding_edge/src/runtime.h Thu Sep 12 11:30:56 2013 UTC
+++ /branches/bleeding_edge/src/runtime.h Fri Sep 13 10:23:04 2013 UTC
@@ -838,7 +838,7 @@
JSArrayBuffer* phantom_array_buffer);
// Helper functions used stubs.
- static void PerformGC(Object* result);
+ static void PerformGC(Object* result, Isolate* isolate);
// Used in runtime.cc and hydrogen's VisitArrayLiteral.
static Handle<Object> CreateArrayLiteralBoilerplate(
=======================================
--- /branches/bleeding_edge/src/x64/builtins-x64.cc Thu Sep 12 11:30:56
2013 UTC
+++ /branches/bleeding_edge/src/x64/builtins-x64.cc Fri Sep 13 10:23:04
2013 UTC
@@ -600,6 +600,8 @@
// the stub returns.
__ subq(Operand(rsp, 0), Immediate(5));
__ Pushad();
+ __ movq(arg_reg_2,
+ ExternalReference::isolate_address(masm->isolate()));
__ movq(arg_reg_1, Operand(rsp, kNumSafepointRegisters * kPointerSize));
{ // NOLINT
FrameScope scope(masm, StackFrame::MANUAL);
=======================================
--- /branches/bleeding_edge/src/x64/code-stubs-x64.cc Fri Sep 13 09:57:48
2013 UTC
+++ /branches/bleeding_edge/src/x64/code-stubs-x64.cc Fri Sep 13 10:23:04
2013 UTC
@@ -3618,6 +3618,7 @@
// PerformGC. No need to use PrepareCallCFunction/CallCFunction here
as the
// stack is known to be aligned. This function takes one argument
which is
// passed in register.
+ __ movq(arg_reg_2,
ExternalReference::isolate_address(masm->isolate()));
__ movq(arg_reg_1, rax);
__ movq(kScratchRegister,
ExternalReference::perform_gc_function(masm->isolate()));
=======================================
--- /branches/bleeding_edge/src/x64/codegen-x64.cc Fri Sep 13 07:59:48 2013
UTC
+++ /branches/bleeding_edge/src/x64/codegen-x64.cc Fri Sep 13 10:23:04 2013
UTC
@@ -723,7 +723,8 @@
}
-void Code::PatchPlatformCodeAge(byte* sequence,
+void Code::PatchPlatformCodeAge(Isolate* isolate,
+ byte* sequence,
Code::Age age,
MarkingParity parity) {
uint32_t young_length;
@@ -732,7 +733,7 @@
CopyBytes(sequence, young_sequence, young_length);
CPU::FlushICache(sequence, young_length);
} else {
- Code* stub = GetCodeAgeStub(age, parity);
+ Code* stub = GetCodeAgeStub(isolate, age, parity);
CodePatcher patcher(sequence, young_length);
patcher.masm()->call(stub->instruction_start());
for (int i = 0;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.