From ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Mon, 16 May 2011 16:25:10 +0100 Subject: Merge WebKit at r76408: Initial merge by git. Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53 --- Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp | 5 +++-- Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h | 4 ++-- Source/JavaScriptCore/bytecompiler/RegisterID.h | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'Source/JavaScriptCore/bytecompiler') 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::emptyValue() || HashTraits::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::emptyValue() || HashTraits::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 #include #include #include @@ -85,7 +84,8 @@ namespace JSC { RefPtr 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 -#include #include namespace JSC { - class RegisterID : public Noncopyable { + class RegisterID { + WTF_MAKE_NONCOPYABLE(RegisterID); public: RegisterID() : m_refCount(0) -- cgit v1.1