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

Unified Diff: src/code-stubs.h

Issue 7031046: Add comment better explaining the calling-stubs-from-stubs issue. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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> {};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698