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

Unified Diff: src/code-stubs.h

Issue 8041035: Tighten up assertions checking GC-safety of stub calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 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
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 42da75eba13ca73e9dc4a4c7fdc4f300be2c2829..1368bacf6deeecc42839afcfaede53cee2066bd3 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -144,8 +144,17 @@ class CodeStub BASE_EMBEDDED {
virtual ~CodeStub() {}
+ bool CompilingCallsToThisStubIsGCSafe() {
+ bool is_pregenerated = IsPregenerated();
+#ifdef DEBUG
+ Code* code = NULL;
+ ASSERT(!is_pregenerated || FindCodeInCache(&code));
+#endif
+ return is_pregenerated;
+ }
+
// See comment above, where Instanceof is defined.
- virtual bool CompilingCallsToThisStubIsGCSafe() {
+ virtual bool IsPregenerated() {
return MajorKey() <= Instanceof;
}
@@ -564,7 +573,7 @@ class CEntryStub : public CodeStub {
// time, so it's OK to call it from other stubs that can't cope with GC during
// their code generation. On machines that always have gp registers (x64) we
// can generate both variants ahead of time.
- virtual bool CompilingCallsToThisStubIsGCSafe();
+ virtual bool IsPregenerated();
private:
void GenerateCore(MacroAssembler* masm,

Powered by Google App Engine
This is Rietveld 408576698