Author: [EMAIL PROTECTED]
Date: Wed Nov 19 01:33:51 2008
New Revision: 789

Modified:
    branches/experimental/toiger/src/checks.h
    branches/experimental/toiger/src/virtual-frame-ia32.h

Log:
For some reason gcc didn't like a STATIC_ASSERT argument with '>' in
it, because it confused parsing of the template that STATIC_ASSERT
expands to.

It's all too magical for me.
Review URL: http://codereview.chromium.org/11468

Modified: branches/experimental/toiger/src/checks.h
==============================================================================
--- branches/experimental/toiger/src/checks.h   (original)
+++ branches/experimental/toiger/src/checks.h   Wed Nov 19 01:33:51 2008
@@ -228,8 +228,8 @@
  // actually causes each use to introduce a new defined type with a
  // name depending on the source line.
  template <int> class StaticAssertionHelper { };
-#define  
STATIC_CHECK(test)                                                  \
-   
typedef                                                                   \
+#define  
STATIC_CHECK(test)                                                    \
+   
typedef                                                                      
\
       
StaticAssertionHelper<sizeof(StaticAssertion<static_cast<bool>(test)>)> \
      SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)


Modified: branches/experimental/toiger/src/virtual-frame-ia32.h
==============================================================================
--- branches/experimental/toiger/src/virtual-frame-ia32.h       (original)
+++ branches/experimental/toiger/src/virtual-frame-ia32.h       Wed Nov 19  
01:33:51 2008
@@ -52,7 +52,6 @@
    Type type() const { return static_cast<Type>(type_ & kTypeMask); }

    bool is_dirty() const {
-    STATIC_ASSERT(kDirtyBit > LAST_TYPE);
      return (type_ & kDirtyBit) != 0;
    }

@@ -74,6 +73,8 @@
   private:
    static const int kDirtyBit = 1 << 8;
    static const int kTypeMask = kDirtyBit - 1;
+
+  STATIC_ASSERT((kDirtyBit > LAST_TYPE));

    // The element's type and a dirty bit.  The dirty bit can be cleared
    // for non-memory elements to indicate that the element agrees with

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to