Revision: 8747
Author: [email protected]
Date: Wed Jul 27 07:56:36 2011
Log: Record safepoint at calls ToBooleanStub.
This fixes the issues when GC happens when invoking
ToBooleanStub.
Review URL: http://codereview.chromium.org/7465066
http://code.google.com/p/v8/source/detail?r=8747
Modified:
/branches/bleeding_edge/src/code-stubs.h
/branches/bleeding_edge/src/ia32/code-stubs-ia32.cc
/branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc
=======================================
--- /branches/bleeding_edge/src/code-stubs.h Mon Jul 25 07:08:36 2011
+++ /branches/bleeding_edge/src/code-stubs.h Wed Jul 27 07:56:36 2011
@@ -922,6 +922,7 @@
explicit Types(byte bits) : set_(bits) {}
bool IsEmpty() const { return set_.IsEmpty(); }
+ bool IsAll() const { return ToByte() == ((1 << NUMBER_OF_TYPES) - 1); }
bool Contains(Type type) const { return set_.Contains(type); }
void Add(Type type) { set_.Add(type); }
byte ToByte() const { return set_.ToIntegral(); }
@@ -934,6 +935,7 @@
};
static Types no_types() { return Types(); }
+ static Types all_types() { return Types((1 << NUMBER_OF_TYPES) - 1); }
explicit ToBooleanStub(Register tos, Types types = Types())
: tos_(tos), types_(types) { }
=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Fri Jul 22 05:42:40
2011
+++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Wed Jul 27 07:56:36
2011
@@ -348,8 +348,10 @@
__ ret(1 * kPointerSize);
}
- __ bind(&patch);
- GenerateTypeTransition(masm);
+ if (!types_.IsAll()) {
+ __ bind(&patch);
+ GenerateTypeTransition(masm);
+ }
}
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Mon Jul 25
08:43:41 2011
+++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Wed Jul 27
07:56:36 2011
@@ -1424,7 +1424,7 @@
// The conversion stub doesn't cause garbage collections so it's
// safe to not record a safepoint after the call.
__ bind(&call_stub);
- ToBooleanStub stub(eax);
+ ToBooleanStub stub(eax, ToBooleanStub::all_types());
__ pushad();
__ push(reg);
__ CallStub(&stub);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev