Add a workaround for a compiler gug in GCC 4.2.3. See issue 122 for details.
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 22 Oct 2008 15:04:40 +0000 (15:04 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 22 Oct 2008 15:04:40 +0000 (15:04 +0000)
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/top.h

index 56909c96ad9bddc52e787b3ec5d0003e03a080da..cc4e3f1cf7fb45036a2092c40536c56b70c0a344 100644 (file)
--- a/src/top.h
+++ b/src/top.h
@@ -294,10 +294,16 @@ class Top {
 };
 
 
+// TODO(122): If the GCC version is 4.2.0 or higher an additional field is added
+// to this class as a workarround for a bug in the generated code found with
+// GCC 4.2.3.
 class SaveContext BASE_EMBEDDED {
  public:
   SaveContext() :
       context_(Top::context()),
+#if __GNUC_VERSION__ >= 40200
+      dummy_(Top::context()),
+#endif
       prev_(Top::save_context()) {
     Top::set_save_context(this);
   }
@@ -312,6 +318,9 @@ class SaveContext BASE_EMBEDDED {
 
  private:
   Handle<Context> context_;
+#if __GNUC_VERSION__ >= 40200
+  Handle<Context> dummy_;
+#endif
   SaveContext* prev_;
 };