Commit e5fc9762 authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

Add comment better explaining the calling-stubs-from-stubs issue.

Review URL: http://codereview.chromium.org/7031046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 65e406ed
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
// List of code stubs used on all platforms. The order in this list is important // List of code stubs used on all platforms.
// as only the stubs up to and including Instanceof allows nested stub calls.
#define CODE_STUB_LIST_ALL_PLATFORMS(V) \ #define CODE_STUB_LIST_ALL_PLATFORMS(V) \
V(CallFunction) \ V(CallFunction) \
V(UnaryOp) \ V(UnaryOp) \
...@@ -43,12 +42,17 @@ namespace internal { ...@@ -43,12 +42,17 @@ namespace internal {
V(StringAdd) \ V(StringAdd) \
V(SubString) \ V(SubString) \
V(StringCompare) \ V(StringCompare) \
V(SmiOp) \
V(Compare) \ V(Compare) \
V(CompareIC) \
V(MathPow) \ V(MathPow) \
V(TranscendentalCache) \ V(TranscendentalCache) \
V(Instanceof) \ V(Instanceof) \
/* All stubs above this line only exist in a few versions, which are */ \
/* generated ahead of time. Therefore compiling a call to one of */ \
/* them can't cause a new stub to be compiled, so compiling a call to */ \
/* them is GC safe. The ones below this line exist in many variants */ \
/* so code compiling 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(ConvertToDouble) \
V(WriteInt32ToHeapNumber) \ V(WriteInt32ToHeapNumber) \
V(StackCheck) \ V(StackCheck) \
...@@ -195,6 +199,7 @@ class CodeStub BASE_EMBEDDED { ...@@ -195,6 +199,7 @@ class CodeStub BASE_EMBEDDED {
MajorKeyBits::encode(MajorKey()); MajorKeyBits::encode(MajorKey());
} }
// See comment above, where Instanceof is defined.
bool AllowsStubCalls() { return MajorKey() <= Instanceof; } bool AllowsStubCalls() { return MajorKey() <= Instanceof; }
class MajorKeyBits: public BitField<uint32_t, 0, kMajorBits> {}; class MajorKeyBits: public BitField<uint32_t, 0, kMajorBits> {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment