Index: src/code-stubs.h |
=================================================================== |
--- src/code-stubs.h (revision 8053) |
+++ src/code-stubs.h (working copy) |
@@ -34,8 +34,7 @@ |
namespace v8 { |
namespace internal { |
-// List of code stubs used on all platforms. The order in this list is important |
-// as only the stubs up to and including Instanceof allows nested stub calls. |
+// List of code stubs used on all platforms. |
#define CODE_STUB_LIST_ALL_PLATFORMS(V) \ |
V(CallFunction) \ |
V(UnaryOp) \ |
@@ -43,12 +42,17 @@ |
V(StringAdd) \ |
V(SubString) \ |
V(StringCompare) \ |
- V(SmiOp) \ |
V(Compare) \ |
- V(CompareIC) \ |
V(MathPow) \ |
V(TranscendentalCache) \ |
V(Instanceof) \ |
+ /* All stubs above this line only exist in a few versions, which are */ \ |
+ /* generated ahead of time. Therefore inserting a call to one of */ \ |
Kevin Millikin (Chromium)
2011/05/25 12:22:29
Maybe less ambiguous: "inserting" --> "compiling",
Erik Corry
2011/05/25 12:51:06
Done.
|
+ /* them can't cause a new stub to be compiled, so inserting a call to*/ \ |
+ /* them is GC safe. The ones below this line exist in many variants */ \ |
+ /* so code generating a call to one can cause a GC. This means they */ \ |
+ /* can't be called from other stubs, since stub generation code is */ \ |
+ /* not GC safe. */ \ |
V(ConvertToDouble) \ |
V(WriteInt32ToHeapNumber) \ |
V(StackCheck) \ |
@@ -195,6 +199,7 @@ |
MajorKeyBits::encode(MajorKey()); |
} |
+ // See comment above, where Instanceof is defined. |
bool AllowsStubCalls() { return MajorKey() <= Instanceof; } |
class MajorKeyBits: public BitField<uint32_t, 0, kMajorBits> {}; |