Add a workaround for a compiler gug in GCC 4.2.3. See issue 122 for details.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
sgjesse@chromium.org 2008-10-22 15:04:40 +00:00
parent 65821f321c
commit 03e44f3f75

View File

@ -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_;
};