Ignore:
Timestamp:
Oct 28, 2007, 6:56:05 PM (18 years ago)
Author:
[email protected]
Message:

2007-10-28 Mark Rowe <[email protected]>

Reviewed by Maciej.

Fix "AllInOneFile.o has a global initializer in it".

Some versions of gcc generate a global initializer for std::numeric_limits<size_t>::max().
We can avoid this by moving it inside an inline function.

  • kjs/SymbolTable.h: (KJS::missingSymbolMarker):
  • kjs/function.cpp: (KJS::ActivationImp::getOwnPropertySlot): (KJS::ActivationImp::put):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/SymbolTable.h

    r27178 r27198  
    3131
    3232#include "property_map.h"
     33#include "AlwaysInline.h"
    3334
    3435namespace KJS {
     
    4243    };
    4344
    44     static const size_t missingSymbolMarker = std::numeric_limits<size_t>::max();
     45    static ALWAYS_INLINE size_t missingSymbolMarker() { return std::numeric_limits<size_t>::max(); }
    4546
    4647    struct SymbolTableIndexHashTraits {
    4748        typedef size_t TraitType;
    4849        typedef SymbolTableIndexHashTraits StorageTraits;
    49         static size_t emptyValue() { return missingSymbolMarker; }
     50        static size_t emptyValue() { return missingSymbolMarker(); }
    5051        static const bool emptyValueIsZero = false;
    5152        static const bool needsDestruction = false;
Note: See TracChangeset for help on using the changeset viewer.