diff options
| author | Ben Murdoch <benm@google.com> | 2011-05-16 16:25:10 +0100 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2011-05-23 18:54:14 +0100 |
| commit | ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb (patch) | |
| tree | db769fadd053248f85db67434a5b275224defef7 /Source/JavaScriptCore/bytecompiler | |
| parent | 52e2557aeb8477967e97fd24f20f8f407a10fa15 (diff) | |
| download | external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.zip external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.gz external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.bz2 | |
Merge WebKit at r76408: Initial merge by git.
Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53
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) |
