diff options
Diffstat (limited to 'Source/JavaScriptCore/bytecompiler')
| -rw-r--r-- | Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp | 5 | ||||
| -rw-r--r-- | Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h | 4 | ||||
| -rw-r--r-- | Source/JavaScriptCore/bytecompiler/RegisterID.h | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index 34afb52..78c373a 100644 --- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -1082,8 +1082,9 @@ RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, bool b) RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, double number) { // FIXME: Our hash tables won't hold infinity, so we make a new JSNumberCell each time. - // Later we can do the extra work to handle that like the other cases. - if (number == HashTraits<double>::emptyValue() || HashTraits<double>::isDeletedValue(number)) + // Later we can do the extra work to handle that like the other cases. They also don't + // work correctly with NaN as a key. + if (isnan(number) || number == HashTraits<double>::emptyValue() || HashTraits<double>::isDeletedValue(number)) return emitLoad(dst, jsNumber(number)); JSValue& valueInMap = m_numberMap.add(number, JSValue()).first->second; if (!valueInMap) diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h index 8b0cc40..de16f8e 100644 --- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h +++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h @@ -40,7 +40,6 @@ #include "SymbolTable.h" #include "Debugger.h" #include "Nodes.h" -#include <wtf/FastAllocBase.h> #include <wtf/PassRefPtr.h> #include <wtf/SegmentedVector.h> #include <wtf/Vector.h> @@ -85,7 +84,8 @@ namespace JSC { RefPtr<RegisterID> propertyRegister; }; - class BytecodeGenerator : public FastAllocBase { + class BytecodeGenerator { + WTF_MAKE_FAST_ALLOCATED; public: typedef DeclarationStacks::VarStack VarStack; typedef DeclarationStacks::FunctionStack FunctionStack; diff --git a/Source/JavaScriptCore/bytecompiler/RegisterID.h b/Source/JavaScriptCore/bytecompiler/RegisterID.h index 3532ad8..78d49d2 100644 --- a/Source/JavaScriptCore/bytecompiler/RegisterID.h +++ b/Source/JavaScriptCore/bytecompiler/RegisterID.h @@ -30,12 +30,12 @@ #define RegisterID_h #include <wtf/Assertions.h> -#include <wtf/Noncopyable.h> #include <wtf/VectorTraits.h> namespace JSC { - class RegisterID : public Noncopyable { + class RegisterID { + WTF_MAKE_NONCOPYABLE(RegisterID); public: RegisterID() : m_refCount(0) |
