summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore')
-rw-r--r--JavaScriptCore/API/JSContextRef.cpp2
-rw-r--r--JavaScriptCore/API/JSObjectRef.cpp4
-rw-r--r--JavaScriptCore/API/JSStringRef.cpp6
-rw-r--r--JavaScriptCore/API/JSStringRefCF.cpp4
-rw-r--r--JavaScriptCore/API/JSValueRef.cpp4
-rw-r--r--JavaScriptCore/ChangeLog228
-rw-r--r--JavaScriptCore/Configurations/Version.xcconfig2
-rw-r--r--JavaScriptCore/JavaScriptCore.exp1
-rw-r--r--JavaScriptCore/JavaScriptCore.pro2
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def1
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj292
-rw-r--r--JavaScriptCore/bytecode/CodeBlock.h2
-rw-r--r--JavaScriptCore/bytecode/Opcode.h2
-rw-r--r--JavaScriptCore/bytecompiler/BytecodeGenerator.cpp3
-rw-r--r--JavaScriptCore/bytecompiler/BytecodeGenerator.h2
-rw-r--r--JavaScriptCore/bytecompiler/NodesCodegen.cpp2
-rw-r--r--JavaScriptCore/jit/JIT.cpp3
-rw-r--r--JavaScriptCore/jit/JITOpcodes.cpp6
-rw-r--r--JavaScriptCore/jit/JITOpcodes32_64.cpp2
-rw-r--r--JavaScriptCore/jit/JITStubs.cpp2
-rw-r--r--JavaScriptCore/jsc.cpp2
-rw-r--r--JavaScriptCore/runtime/Identifier.cpp4
-rw-r--r--JavaScriptCore/runtime/JSImmediate.h94
-rw-r--r--JavaScriptCore/runtime/JSObject.h2
-rw-r--r--JavaScriptCore/runtime/JSString.h2
-rw-r--r--JavaScriptCore/runtime/JSZombie.cpp2
-rw-r--r--JavaScriptCore/runtime/Lookup.cpp2
-rw-r--r--JavaScriptCore/wtf/NullPtr.cpp33
-rw-r--r--JavaScriptCore/wtf/Platform.h3
-rw-r--r--JavaScriptCore/wtf/PlatformRefPtr.h9
-rw-r--r--JavaScriptCore/wtf/RandomNumberSeed.h9
-rw-r--r--JavaScriptCore/wtf/text/AtomicString.cpp8
-rw-r--r--JavaScriptCore/wtf/text/StringImpl.cpp2
-rw-r--r--JavaScriptCore/wtf/text/StringImpl.h4
34 files changed, 498 insertions, 248 deletions
diff --git a/JavaScriptCore/API/JSContextRef.cpp b/JavaScriptCore/API/JSContextRef.cpp
index 926badc..ccab953 100644
--- a/JavaScriptCore/API/JSContextRef.cpp
+++ b/JavaScriptCore/API/JSContextRef.cpp
@@ -46,7 +46,7 @@ using namespace JSC;
JSContextGroupRef JSContextGroupCreate()
{
initializeThreading();
- return toRef(JSGlobalData::createContextGroup(ThreadStackTypeSmall).releaseRef());
+ return toRef(JSGlobalData::createContextGroup(ThreadStackTypeSmall).leakRef());
}
JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group)
diff --git a/JavaScriptCore/API/JSObjectRef.cpp b/JavaScriptCore/API/JSObjectRef.cpp
index 8bd33d6..4198ca8 100644
--- a/JavaScriptCore/API/JSObjectRef.cpp
+++ b/JavaScriptCore/API/JSObjectRef.cpp
@@ -59,7 +59,7 @@ JSClassRef JSClassCreate(const JSClassDefinition* definition)
? OpaqueJSClass::createNoAutomaticPrototype(definition)
: OpaqueJSClass::create(definition);
- return jsClass.release().releaseRef();
+ return jsClass.release().leakRef();
}
JSClassRef JSClassRetain(JSClassRef jsClass)
@@ -507,7 +507,7 @@ JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef o
size_t size = array.size();
propertyNames->array.reserveInitialCapacity(size);
for (size_t i = 0; i < size; ++i)
- propertyNames->array.append(JSRetainPtr<JSStringRef>(Adopt, OpaqueJSString::create(array[i].ustring()).releaseRef()));
+ propertyNames->array.append(JSRetainPtr<JSStringRef>(Adopt, OpaqueJSString::create(array[i].ustring()).leakRef()));
return JSPropertyNameArrayRetain(propertyNames);
}
diff --git a/JavaScriptCore/API/JSStringRef.cpp b/JavaScriptCore/API/JSStringRef.cpp
index 8e236e4..ea31da6 100644
--- a/JavaScriptCore/API/JSStringRef.cpp
+++ b/JavaScriptCore/API/JSStringRef.cpp
@@ -36,7 +36,7 @@ using namespace WTF::Unicode;
JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars)
{
initializeThreading();
- return OpaqueJSString::create(chars, numChars).releaseRef();
+ return OpaqueJSString::create(chars, numChars).leakRef();
}
JSStringRef JSStringCreateWithUTF8CString(const char* string)
@@ -47,11 +47,11 @@ JSStringRef JSStringCreateWithUTF8CString(const char* string)
Vector<UChar, 1024> buffer(length);
UChar* p = buffer.data();
if (conversionOK == convertUTF8ToUTF16(&string, string + length, &p, p + length))
- return OpaqueJSString::create(buffer.data(), p - buffer.data()).releaseRef();
+ return OpaqueJSString::create(buffer.data(), p - buffer.data()).leakRef();
}
// Null string.
- return OpaqueJSString::create().releaseRef();
+ return OpaqueJSString::create().leakRef();
}
JSStringRef JSStringRetain(JSStringRef string)
diff --git a/JavaScriptCore/API/JSStringRefCF.cpp b/JavaScriptCore/API/JSStringRefCF.cpp
index d1f6fe3..e0961d0 100644
--- a/JavaScriptCore/API/JSStringRefCF.cpp
+++ b/JavaScriptCore/API/JSStringRefCF.cpp
@@ -45,9 +45,9 @@ JSStringRef JSStringCreateWithCFString(CFStringRef string)
OwnArrayPtr<UniChar> buffer(new UniChar[length]);
CFStringGetCharacters(string, CFRangeMake(0, length), buffer.get());
COMPILE_ASSERT(sizeof(UniChar) == sizeof(UChar), unichar_and_uchar_must_be_same_size);
- return OpaqueJSString::create(reinterpret_cast<UChar*>(buffer.get()), length).releaseRef();
+ return OpaqueJSString::create(reinterpret_cast<UChar*>(buffer.get()), length).leakRef();
} else {
- return OpaqueJSString::create(0, 0).releaseRef();
+ return OpaqueJSString::create(0, 0).leakRef();
}
}
diff --git a/JavaScriptCore/API/JSValueRef.cpp b/JavaScriptCore/API/JSValueRef.cpp
index b8dd7c6..faf4712 100644
--- a/JavaScriptCore/API/JSValueRef.cpp
+++ b/JavaScriptCore/API/JSValueRef.cpp
@@ -252,7 +252,7 @@ JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef apiValue, unsig
exec->clearException();
return 0;
}
- return OpaqueJSString::create(result).releaseRef();
+ return OpaqueJSString::create(result).leakRef();
}
bool JSValueToBoolean(JSContextRef ctx, JSValueRef value)
@@ -295,7 +295,7 @@ JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef*
exec->clearException();
stringRef.clear();
}
- return stringRef.release().releaseRef();
+ return stringRef.release().leakRef();
}
JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception)
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 7b935d4..8f663ff 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,229 @@
+2010-11-08 Adam Roben <aroben@apple.com>
+
+ Roll out r71532
+
+ It broke the build for Cygwin 1.7 installs. Cygwin 1.7's default
+ .bashrc unsets %TEMP%, which broke copy-tools.cmd.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
+ * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Removed.
+ * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Removed.
+
+2010-11-08 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ >=webkitgtk-1.2.5: parallel build fails with libtool: link: cannot find the library `libwebkit-1.0.la' or unhandled argument `libwebkit-1.0.la'
+ https://bugs.webkit.org/show_bug.cgi?id=49128
+
+ r59042 introduced a C++-style comment in Platform.h, which is often
+ included in C source files. Change it to a C-style comment.
+
+ * wtf/Platform.h: Fix the C++-style comment.
+
+2010-11-08 Adam Roben <aroben@apple.com>
+
+ Show a message and cause the build to immediately fail when any
+ .vsprops files are copied
+
+ When $WebKitLibrariesDir is set to a non-standard location, the
+ .vsprops files have to be copied from WebKitLibraries/win to
+ $WebKitLibrariesDir. When this happens, Visual Studio doesn't pick up
+ changes to the .vsprops files until the next time it opens the solution
+ file. Before this patch, the build would soldier on with the old
+ .vsprops files, leading to strange build failures. Now we detect that
+ the .vsprops files have been updated, display a message to the user
+ telling them what to do, and make the build fail immediately.
+
+ Fixes <http://webkit.org/b/49181> Windows build fail mysteriously when
+ .vsprops files are updated
+
+ Reviewed by Steve Falkenburg.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
+ Moved code to copy the tools directory to the new copy-tools.cmd
+ script. Moved that after the command that writes the buildfailed file
+ so the build will be considered a failure if copy-tools.cmd fails.
+ Changed to write the project name into buildfailed like all our other
+ projects do, so those other projects will know that the failure was due
+ to this project.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
+ Added new scripts.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Added. Copies
+ the tools directory to $WebKitLibrariesDir. If any files were copied,
+ we display a message to the user and exit with error code 1 to cause
+ the build to fail. In non-interactive builds, we just print the message
+ to the build log. In interactive builds, we show the message in an
+ alert.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Added. Uses
+ Windows Scripting Host to display a message in an alert.
+
+2010-11-07 Sam Magnuson <smagnuson@netflix.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] make install does not cause JavaScriptCore to be built
+ https://bugs.webkit.org/show_bug.cgi?id=49114
+
+ * JavaScriptCore.pro:
+
+2010-11-05 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Website consistently crashing TOT in JIT::execute() on news.com.au
+ https://bugs.webkit.org/show_bug.cgi?id=48954
+
+ The problem here was the strict pass of this conversion was loading the
+ this structure into one register but doing the flags check off a different
+ register. This is clearly wrong. I have been unable to trigger the crash
+ with a reduction, but I've added an assertion to the this conversion to
+ attempt to make it more readily catchable in future.
+
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_convert_this_strict):
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::emit_op_convert_this_strict):
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+
+2010-11-04 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Adam Barth.
+
+ Use leakRef instead of releaseRef
+ https://bugs.webkit.org/show_bug.cgi?id=48974
+
+ Use leakRef instead of the deprecated releaseRef. This was renamed
+ some time ago because 'releaseRef' is too close to 'release',
+ which does something completely different.
+
+2010-11-04 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Gavin Barraclough.
+
+ REGRESSION(49798): Crash in HTMLObjectElement::parseMappedAttribute
+ https://bugs.webkit.org/show_bug.cgi?id=48789
+
+ The contract for all String/AtomicString methods seems to be that it's
+ safe to call them, even when the String is null (impl() returns 0).
+ This contract was broken by r49798 (unintentionally) when optimizing
+ for dromeo.
+ This patch adds a null check to AtomicString::lower() fixing this
+ crash and preventing future confusion.
+
+ * wtf/text/AtomicString.cpp:
+ (WTF::AtomicString::lower):
+
+2010-11-04 Adam Barth <abarth@webkit.org>
+
+ Enabled ICCJPEG on Chromium Mac
+ https://bugs.webkit.org/show_bug.cgi?id=48977
+
+ * wtf/Platform.h:
+
+2010-11-03 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Crash in Function.prototype.call.apply
+ https://bugs.webkit.org/show_bug.cgi?id=48485
+
+ The problem here was op_load_varargs failing to ensure that
+ there was sufficient space for the entire callframe prior to
+ op_call_varargs. This meant that when we then re-entered the
+ VM it was possible to stomp over an earlier portion of the
+ stack, so causing sub-optimal behaviour.
+
+ * bytecode/Opcode.h:
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::emitLoadVarargs):
+ * bytecompiler/BytecodeGenerator.h:
+ * bytecompiler/NodesCodegen.cpp:
+ (JSC::ApplyFunctionCallDotNode::emitBytecode):
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompile):
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_load_varargs):
+
+2010-11-03 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Chris Marrin.
+
+ Redesign extension mechanism in GraphicsContext3D
+ https://bugs.webkit.org/show_bug.cgi?id=46894
+
+ * JavaScriptCore.exp:
+ - Exposed String::split(const String&, Vector<String>).
+
+2010-11-03 Adam Roben <aroben@apple.com>
+
+ Bring WTF.vcproj up to date
+
+ * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added filters for the text and
+ unicode directories, added new files, removed old files.
+
+2010-11-03 Gabor Loki <loki@webkit.org>
+
+ Reviewed by Andreas Kling.
+
+ Remove unused initializeWeakRandomNumberGenerator
+ https://bugs.webkit.org/show_bug.cgi?id=48899
+
+ WeakRandom class is used instead of weakRandomNumber and its initializer.
+
+ * wtf/RandomNumberSeed.h:
+
+2010-11-03 Gabor Loki <loki@webkit.org>
+
+ Reviewed by Geoffrey Garen.
+
+ Unused class: JSFastMath with JSValue64
+ https://bugs.webkit.org/show_bug.cgi?id=48835
+
+ Remove unused JSFastMath class.
+
+ * runtime/JSImmediate.h:
+
+2010-11-02 Adam Roben <aroben@apple.com>
+
+ Windows build fix after r71127
+
+ MSVC isn't smart enough to figure out that the definition of the global
+ nullptr variable isn't needed, so we provide one for it.
+
+ Fixes <http://webkit.org/b/48862> Windows build is broken due to
+ undefined symbol nullptr
+
+ Reviewed by Anders Carlsson.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export nullptr.
+
+ * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added NullPtr.cpp and let VS
+ resort the files.
+
+ * wtf/NullPtr.cpp: Added.
+
+2010-11-02 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ Remove special handling of HashTableDeletedValue in PlatformRefPtr and manually manage memory that cannot be controlled by HashTraits
+ https://bugs.webkit.org/show_bug.cgi?id=48841
+
+ Remove special handling of HashTableDeletedValue in PlatformRefPtr.
+ This is better handled on a case-by-case basis, when HashTraits
+ cannot account for it.
+
+ * wtf/PlatformRefPtr.h:
+ (WTF::PlatformRefPtr::~PlatformRefPtr):
+ (WTF::PlatformRefPtr::clear):
+ (WTF::::operator):
+
2010-10-29 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
@@ -6259,7 +6485,7 @@
once. Added a clear function.
* wtf/PassRefPtr.h: Changed all uses of releaseRef to leakRef.
-
+n
* wtf/RefPtr.h: Changed all uses of "template <...>" to instead do
"template<...>". Tidied up declarations and comments a bit.
Changed all uses of releaseRef to leakRef.
diff --git a/JavaScriptCore/Configurations/Version.xcconfig b/JavaScriptCore/Configurations/Version.xcconfig
index 35ae251..8cdcafc 100644
--- a/JavaScriptCore/Configurations/Version.xcconfig
+++ b/JavaScriptCore/Configurations/Version.xcconfig
@@ -22,7 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MAJOR_VERSION = 534;
-MINOR_VERSION = 11;
+MINOR_VERSION = 12;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/JavaScriptCore/JavaScriptCore.exp b/JavaScriptCore/JavaScriptCore.exp
index 6ef8ead..3715a43 100644
--- a/JavaScriptCore/JavaScriptCore.exp
+++ b/JavaScriptCore/JavaScriptCore.exp
@@ -563,6 +563,7 @@ __ZNK3WTF6String19characterStartingAtEj
__ZNK3WTF6String4utf8Eb
__ZNK3WTF6String5asciiEv
__ZNK3WTF6String5lowerEv
+__ZNK3WTF6String5splitERKS0_RNS_6VectorIS0_Lm0EEE
__ZNK3WTF6String5splitERKS0_bRNS_6VectorIS0_Lm0EEE
__ZNK3WTF6String5splitEtRNS_6VectorIS0_Lm0EEE
__ZNK3WTF6String5splitEtbRNS_6VectorIS0_Lm0EEE
diff --git a/JavaScriptCore/JavaScriptCore.pro b/JavaScriptCore/JavaScriptCore.pro
index f83bf4c..531b22c 100644
--- a/JavaScriptCore/JavaScriptCore.pro
+++ b/JavaScriptCore/JavaScriptCore.pro
@@ -68,6 +68,8 @@ wince* {
include(pcre/pcre.pri)
include(wtf/wtf.pri)
+INSTALLDEPS += all
+
SOURCES += \
API/JSBase.cpp \
API/JSCallbackConstructor.cpp \
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
index 779b0bc..aa9d529 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
+++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
@@ -228,6 +228,7 @@ EXPORTS
?name@JSFunction@JSC@@QAEABVUString@2@PAVExecState@2@@Z
?newUninitialized@CString@WTF@@SA?AV12@IAAPAD@Z
?nonInlineNaN@JSC@@YANXZ
+ ?nullptr@@3Vnullptr_t@std@@A
?number@UString@JSC@@SA?AV12@H@Z
?number@UString@JSC@@SA?AV12@I@Z
?number@UString@JSC@@SA?AV12@N@Z
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj b/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
index 3a53070..c0ecd45 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
+++ b/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
@@ -244,6 +244,114 @@
>
</File>
</Filter>
+ <Filter
+ Name="unicode"
+ >
+ <File
+ RelativePath="..\..\wtf\unicode\Collator.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\unicode\Unicode.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\unicode\UnicodeMacrosFromICU.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\unicode\UTF8.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\unicode\UTF8.h"
+ >
+ </File>
+ <Filter
+ Name="icu"
+ >
+ <File
+ RelativePath="..\..\wtf\unicode\icu\CollatorICU.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\unicode\icu\UnicodeIcu.h"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="text"
+ >
+ <File
+ RelativePath="..\..\wtf\text\AtomicString.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\AtomicString.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\AtomicStringHash.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\AtomicStringImpl.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\CString.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\CString.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\StringBuffer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\StringBuilder.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\StringBuilder.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\StringConcatenate.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\StringHash.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\StringImpl.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\StringImpl.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\StringImplBase.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\StringStatics.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\WTFString.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\text\WTFString.h"
+ >
+ </File>
+ </Filter>
<File
RelativePath="..\..\wtf\AlwaysInline.h"
>
@@ -265,23 +373,27 @@
>
</File>
<File
- RelativePath="..\..\wtf\ByteArray.cpp"
+ RelativePath="..\..\wtf\AVLTree.h"
>
</File>
<File
- RelativePath="..\..\wtf\ByteArray.h"
+ RelativePath="..\..\wtf\Bitmap.h"
>
</File>
<File
- RelativePath="..\..\wtf\unicode\Collator.h"
+ RelativePath="..\..\wtf\BumpPointerAllocator.h"
>
</File>
<File
- RelativePath="..\..\wtf\unicode\CollatorDefault.cpp"
+ RelativePath="..\..\wtf\ByteArray.cpp"
>
</File>
<File
- RelativePath="..\..\wtf\unicode\icu\CollatorICU.cpp"
+ RelativePath="..\..\wtf\ByteArray.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\Complex.h"
>
</File>
<File
@@ -297,23 +409,27 @@
>
</File>
<File
- RelativePath="..\..\wtf\Deque.h"
+ RelativePath="..\..\wtf\DecimalNumber.cpp"
>
</File>
<File
- RelativePath="..\..\wtf\dtoa.cpp"
+ RelativePath="..\..\wtf\DecimalNumber.h"
>
</File>
<File
- RelativePath="..\..\wtf\dtoa.h"
+ RelativePath="..\..\wtf\Deque.h"
>
</File>
<File
- RelativePath="..\..\wtf\DecimalNumber.cpp"
+ RelativePath="..\..\wtf\DisallowCType.h"
>
</File>
<File
- RelativePath="..\..\wtf\DecimalNumber.h"
+ RelativePath="..\..\wtf\dtoa.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\dtoa.h"
>
</File>
<File
@@ -337,7 +453,7 @@
>
</File>
<File
- RelativePath="..\..\wtf\FastMallocInternal.h"
+ RelativePath="..\..\wtf\FixedArray.h"
>
</File>
<File
@@ -357,6 +473,10 @@
>
</File>
<File
+ RelativePath="..\..\wtf\HashIterators.h"
+ >
+ </File>
+ <File
RelativePath="..\..\wtf\HashMap.h"
>
</File>
@@ -389,31 +509,31 @@
>
</File>
<File
- RelativePath="..\..\wtf\MD5.cpp"
+ RelativePath="..\..\wtf\MainThread.cpp"
>
</File>
<File
- RelativePath="..\..\wtf\MD5.h"
+ RelativePath="..\..\wtf\MainThread.h"
>
</File>
<File
- RelativePath="..\..\wtf\MainThread.cpp"
+ RelativePath="..\..\wtf\MallocZoneSupport.h"
>
</File>
<File
- RelativePath="..\..\wtf\MainThread.h"
+ RelativePath="..\..\wtf\MathExtras.h"
>
</File>
<File
- RelativePath="..\..\wtf\MathExtras.h"
+ RelativePath="..\..\wtf\MD5.cpp"
>
</File>
<File
- RelativePath="..\..\wtf\MessageQueue.h"
+ RelativePath="..\..\wtf\MD5.h"
>
</File>
<File
- RelativePath="..\..\wtf\NonCopyingSort.h"
+ RelativePath="..\..\wtf\MessageQueue.h"
>
</File>
<File
@@ -421,19 +541,23 @@
>
</File>
<File
+ RelativePath="..\..\wtf\NonCopyingSort.h"
+ >
+ </File>
+ <File
RelativePath="..\..\wtf\NotFound.h"
>
</File>
<File
- RelativePath="..\..\wtf\OwnArrayPtr.h"
+ RelativePath="..\..\wtf\NullPtr.cpp"
>
</File>
<File
- RelativePath="..\..\wtf\OwnFastMallocPtr.h"
+ RelativePath="..\..\wtf\NullPtr.h"
>
</File>
<File
- RelativePath="..\..\wtf\OwnPtr.h"
+ RelativePath="..\..\wtf\OwnArrayPtr.h"
>
</File>
<File
@@ -441,6 +565,14 @@
>
</File>
<File
+ RelativePath="..\..\wtf\OwnFastMallocPtr.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\OwnPtr.h"
+ >
+ </File>
+ <File
RelativePath="..\..\wtf\OwnPtrCommon.h"
>
</File>
@@ -473,7 +605,11 @@
>
</File>
<File
- RelativePath="..\..\wtf\PtrAndFlags.h"
+ RelativePath="..\..\wtf\PlatformRefPtr.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\PossiblyNull.h"
>
</File>
<File
@@ -497,6 +633,10 @@
>
</File>
<File
+ RelativePath="..\..\wtf\RefCountedLeakCounter.h"
+ >
+ </File>
+ <File
RelativePath="..\..\wtf\RefPtr.h"
>
</File>
@@ -513,14 +653,30 @@
>
</File>
<File
+ RelativePath="..\..\wtf\SizeLimits.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\StaticConstructors.h"
+ >
+ </File>
+ <File
RelativePath="..\..\wtf\StdLibExtras.h"
>
</File>
<File
+ RelativePath="..\..\wtf\StringExtras.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\wtf\StringExtras.h"
>
</File>
<File
+ RelativePath="..\..\wtf\StringHasher.h"
+ >
+ </File>
+ <File
RelativePath="..\..\wtf\TCPackedCache.h"
>
</File>
@@ -549,6 +705,10 @@
>
</File>
<File
+ RelativePath="..\..\wtf\ThreadingNone.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\wtf\ThreadingPrimitives.h"
>
</File>
@@ -577,103 +737,27 @@
>
</File>
<File
- RelativePath="..\..\wtf\unicode\Unicode.h"
- >
- </File>
- <File
- RelativePath="..\..\wtf\unicode\icu\UnicodeIcu.h"
+ RelativePath="..\..\wtf\UnusedParam.h"
>
</File>
<File
- RelativePath="..\..\wtf\UnusedParam.h"
+ RelativePath="..\..\wtf\ValueCheck.h"
>
</File>
<File
- RelativePath="..\..\wtf\text\AtomicString.cpp"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\AtomicString.h"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\AtomicStringHash.h"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\AtomicStringImpl.h"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\CString.cpp"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\CString.h"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\StringStatics.cpp"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\StringBuffer.h"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\StringBuilder.cpp"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\StringBuilder.h"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\StringConcatenate.h"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\StringHash.h"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\StringImpl.cpp"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\StringImpl.h"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\TextPosition.h"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\WTFString.cpp"
- >
- </File>
- <File
- RelativePath="..\..\wtf\text\WTFString.h"
- >
- </File>
- <File
- RelativePath="..\..\wtf\unicode\UTF8.cpp"
- >
- </File>
- <File
- RelativePath="..\..\wtf\unicode\UTF8.h"
+ RelativePath="..\..\wtf\Vector.h"
>
</File>
<File
- RelativePath="..\..\wtf\ValueCheck.h"
+ RelativePath="..\..\wtf\Vector3.h"
>
</File>
<File
- RelativePath="..\..\wtf\Vector.h"
+ RelativePath="..\..\wtf\VectorTraits.h"
>
</File>
<File
- RelativePath="..\..\wtf\VectorTraits.h"
+ RelativePath="..\..\wtf\VMTags.h"
>
</File>
<File
diff --git a/JavaScriptCore/bytecode/CodeBlock.h b/JavaScriptCore/bytecode/CodeBlock.h
index e4ebeb8..68acae4 100644
--- a/JavaScriptCore/bytecode/CodeBlock.h
+++ b/JavaScriptCore/bytecode/CodeBlock.h
@@ -678,7 +678,7 @@ namespace JSC {
// symbol table, so we just pass as a raw pointer with a ref count of 1. We then manually deref
// in the destructor.
FunctionCodeBlock(FunctionExecutable* ownerExecutable, CodeType codeType, JSGlobalObject* globalObject, PassRefPtr<SourceProvider> sourceProvider, unsigned sourceOffset, bool isConstructor)
- : CodeBlock(ownerExecutable, codeType, globalObject, sourceProvider, sourceOffset, SharedSymbolTable::create().releaseRef(), isConstructor)
+ : CodeBlock(ownerExecutable, codeType, globalObject, sourceProvider, sourceOffset, SharedSymbolTable::create().leakRef(), isConstructor)
{
}
~FunctionCodeBlock()
diff --git a/JavaScriptCore/bytecode/Opcode.h b/JavaScriptCore/bytecode/Opcode.h
index e1ef01e..8ee82e7 100644
--- a/JavaScriptCore/bytecode/Opcode.h
+++ b/JavaScriptCore/bytecode/Opcode.h
@@ -162,7 +162,7 @@ namespace JSC {
macro(op_call, 4) \
macro(op_call_eval, 4) \
macro(op_call_varargs, 4) \
- macro(op_load_varargs, 3) \
+ macro(op_load_varargs, 4) \
macro(op_tear_off_activation, 3) \
macro(op_tear_off_arguments, 2) \
macro(op_ret, 2) \
diff --git a/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
index 87f0beb..7538314 100644
--- a/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
+++ b/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
@@ -1674,12 +1674,13 @@ RegisterID* BytecodeGenerator::emitCall(OpcodeID opcodeID, RegisterID* dst, Regi
return dst;
}
-RegisterID* BytecodeGenerator::emitLoadVarargs(RegisterID* argCountDst, RegisterID* arguments)
+RegisterID* BytecodeGenerator::emitLoadVarargs(RegisterID* argCountDst, RegisterID* thisRegister, RegisterID* arguments)
{
ASSERT(argCountDst->index() < arguments->index());
emitOpcode(op_load_varargs);
instructions().append(argCountDst->index());
instructions().append(arguments->index());
+ instructions().append(thisRegister->index() + RegisterFile::CallFrameHeaderSize); // initial registerOffset
return argCountDst;
}
diff --git a/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/JavaScriptCore/bytecompiler/BytecodeGenerator.h
index d0e4a6b..b189565 100644
--- a/JavaScriptCore/bytecompiler/BytecodeGenerator.h
+++ b/JavaScriptCore/bytecompiler/BytecodeGenerator.h
@@ -350,7 +350,7 @@ namespace JSC {
RegisterID* emitCall(RegisterID* dst, RegisterID* func, CallArguments&, unsigned divot, unsigned startOffset, unsigned endOffset);
RegisterID* emitCallEval(RegisterID* dst, RegisterID* func, CallArguments&, unsigned divot, unsigned startOffset, unsigned endOffset);
RegisterID* emitCallVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* argCount, unsigned divot, unsigned startOffset, unsigned endOffset);
- RegisterID* emitLoadVarargs(RegisterID* argCountDst, RegisterID* args);
+ RegisterID* emitLoadVarargs(RegisterID* argCountDst, RegisterID* thisRegister, RegisterID* args);
RegisterID* emitReturn(RegisterID* src);
RegisterID* emitEnd(RegisterID* src) { return emitUnaryNoDstOp(op_end, src); }
diff --git a/JavaScriptCore/bytecompiler/NodesCodegen.cpp b/JavaScriptCore/bytecompiler/NodesCodegen.cpp
index f282542..47129d5 100644
--- a/JavaScriptCore/bytecompiler/NodesCodegen.cpp
+++ b/JavaScriptCore/bytecompiler/NodesCodegen.cpp
@@ -536,7 +536,7 @@ RegisterID* ApplyFunctionCallDotNode::emitBytecode(BytecodeGenerator& generator,
while ((args = args->m_next))
generator.emitNode(args->m_expr);
- generator.emitLoadVarargs(argsCountRegister.get(), argsRegister.get());
+ generator.emitLoadVarargs(argsCountRegister.get(), thisRegister.get(), argsRegister.get());
generator.emitCallVarargs(finalDestinationOrIgnored.get(), realFunction.get(), thisRegister.get(), argsCountRegister.get(), divot(), startOffset(), endOffset());
}
generator.emitJump(end.get());
diff --git a/JavaScriptCore/jit/JIT.cpp b/JavaScriptCore/jit/JIT.cpp
index 0eabdf5..e5be43b 100644
--- a/JavaScriptCore/jit/JIT.cpp
+++ b/JavaScriptCore/jit/JIT.cpp
@@ -477,8 +477,7 @@ JITCode JIT::privateCompile(CodePtr* functionEntryArityCheck)
emitPutImmediateToCallFrameHeader(m_codeBlock, RegisterFile::CodeBlock);
addPtr(Imm32(m_codeBlock->m_numCalleeRegisters * sizeof(Register)), callFrameRegister, regT1);
- registerFileCheck = branchPtr(Below, AbsoluteAddress(&m_globalData->interpreter->registerFile().
- m_end), regT1);
+ registerFileCheck = branchPtr(Below, AbsoluteAddress(&m_globalData->interpreter->registerFile().m_end), regT1);
}
Label functionBody = label();
diff --git a/JavaScriptCore/jit/JITOpcodes.cpp b/JavaScriptCore/jit/JITOpcodes.cpp
index 1528b76..74170c1 100644
--- a/JavaScriptCore/jit/JITOpcodes.cpp
+++ b/JavaScriptCore/jit/JITOpcodes.cpp
@@ -1266,7 +1266,7 @@ void JIT::emit_op_convert_this_strict(Instruction* currentInstruction)
notNull.link(this);
Jump isImmediate = emitJumpIfNotJSCell(regT0);
loadPtr(Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), regT1);
- Jump notAnObject = branch8(NotEqual, Address(regT3, OBJECT_OFFSETOF(Structure, m_typeInfo.m_type)), Imm32(ObjectType));
+ Jump notAnObject = branch8(NotEqual, Address(regT1, OBJECT_OFFSETOF(Structure, m_typeInfo.m_type)), Imm32(ObjectType));
addSlowCase(branchTest8(NonZero, Address(regT1, OBJECT_OFFSETOF(Structure, m_typeInfo.m_flags)), Imm32(NeedsThisConversion)));
isImmediate.link(this);
notAnObject.link(this);
@@ -1666,6 +1666,9 @@ void JIT::emit_op_load_varargs(Instruction* currentInstruction)
{
int argCountDst = currentInstruction[1].u.operand;
int argsOffset = currentInstruction[2].u.operand;
+ int registerOffset = currentInstruction[3].u.operand;
+ ASSERT(argsOffset <= registerOffset);
+
int expectedParams = m_codeBlock->m_numParameters - 1;
// Don't do inline copying if we aren't guaranteed to have a single stream
// of arguments
@@ -1695,6 +1698,7 @@ void JIT::emit_op_load_varargs(Instruction* currentInstruction)
// Bounds check the registerfile
addPtr(regT2, regT3);
+ addPtr(Imm32((registerOffset - argsOffset) * sizeof(Register)), regT3);
addSlowCase(branchPtr(Below, AbsoluteAddress(&m_globalData->interpreter->registerFile().m_end), regT3));
sub32(Imm32(1), regT0);
diff --git a/JavaScriptCore/jit/JITOpcodes32_64.cpp b/JavaScriptCore/jit/JITOpcodes32_64.cpp
index 0a3d69d..8e0226d 100644
--- a/JavaScriptCore/jit/JITOpcodes32_64.cpp
+++ b/JavaScriptCore/jit/JITOpcodes32_64.cpp
@@ -1574,7 +1574,7 @@ void JIT::emit_op_convert_this_strict(Instruction* currentInstruction)
notNull.link(this);
Jump isImmediate = branch32(NotEqual, regT1, Imm32(JSValue::CellTag));
loadPtr(Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), regT2);
- Jump notAnObject = branch8(NotEqual, Address(regT3, OBJECT_OFFSETOF(Structure, m_typeInfo.m_type)), Imm32(ObjectType));
+ Jump notAnObject = branch8(NotEqual, Address(regT2, OBJECT_OFFSETOF(Structure, m_typeInfo.m_type)), Imm32(ObjectType));
addSlowCase(branchTest8(NonZero, Address(regT2, OBJECT_OFFSETOF(Structure, m_typeInfo.m_flags)), Imm32(NeedsThisConversion)));
isImmediate.link(this);
notAnObject.link(this);
diff --git a/JavaScriptCore/jit/JITStubs.cpp b/JavaScriptCore/jit/JITStubs.cpp
index c69a828..896b93d 100644
--- a/JavaScriptCore/jit/JITStubs.cpp
+++ b/JavaScriptCore/jit/JITStubs.cpp
@@ -1304,7 +1304,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_convert_this_strict)
JSValue v1 = stackFrame.args[0].jsValue();
CallFrame* callFrame = stackFrame.callFrame;
-
+ ASSERT(v1.asCell()->structure()->typeInfo().needsThisConversion());
JSValue result = v1.toStrictThisObject(callFrame);
CHECK_FOR_EXCEPTION_AT_END();
return JSValue::encode(result);
diff --git a/JavaScriptCore/jsc.cpp b/JavaScriptCore/jsc.cpp
index 16647ec..00581e5 100644
--- a/JavaScriptCore/jsc.cpp
+++ b/JavaScriptCore/jsc.cpp
@@ -343,7 +343,7 @@ int main(int argc, char** argv)
// We can't use destructors in the following code because it uses Windows
// Structured Exception Handling
int res = 0;
- JSGlobalData* globalData = JSGlobalData::create(ThreadStackTypeLarge).releaseRef();
+ JSGlobalData* globalData = JSGlobalData::create(ThreadStackTypeLarge).leakRef();
TRY
res = jscmain(argc, argv, globalData);
EXCEPT(res = 3)
diff --git a/JavaScriptCore/runtime/Identifier.cpp b/JavaScriptCore/runtime/Identifier.cpp
index d375eff..d4069ba 100644
--- a/JavaScriptCore/runtime/Identifier.cpp
+++ b/JavaScriptCore/runtime/Identifier.cpp
@@ -101,7 +101,7 @@ struct IdentifierCStringTranslator {
{
size_t length = strlen(c);
UChar* d;
- StringImpl* r = StringImpl::createUninitialized(length, d).releaseRef();
+ StringImpl* r = StringImpl::createUninitialized(length, d).leakRef();
for (size_t i = 0; i != length; i++)
d[i] = static_cast<unsigned char>(c[i]); // use unsigned char to zero-extend instead of sign-extend
r->setHash(hash);
@@ -160,7 +160,7 @@ struct IdentifierUCharBufferTranslator {
static void translate(StringImpl*& location, const UCharBuffer& buf, unsigned hash)
{
UChar* d;
- StringImpl* r = StringImpl::createUninitialized(buf.length, d).releaseRef();
+ StringImpl* r = StringImpl::createUninitialized(buf.length, d).leakRef();
for (unsigned i = 0; i != buf.length; i++)
d[i] = buf.s[i];
r->setHash(hash);
diff --git a/JavaScriptCore/runtime/JSImmediate.h b/JavaScriptCore/runtime/JSImmediate.h
index ffa446e..68ba75c 100644
--- a/JavaScriptCore/runtime/JSImmediate.h
+++ b/JavaScriptCore/runtime/JSImmediate.h
@@ -39,7 +39,6 @@ namespace JSC {
class ExecState;
class JSCell;
- class JSFastMath;
class JSGlobalData;
class JSObject;
class UString;
@@ -133,7 +132,6 @@ namespace JSC {
private:
friend class JIT;
friend class JSValue;
- friend class JSFastMath;
friend class JSInterfaceJIT;
friend class SpecializedThunkJIT;
friend JSValue jsNumber(ExecState* exec, double d);
@@ -563,98 +561,6 @@ namespace JSC {
return JSImmediate::getTruncatedUInt32(asValue());
}
- class JSFastMath {
- public:
- static ALWAYS_INLINE bool canDoFastBitwiseOperations(JSValue v1, JSValue v2)
- {
- return JSImmediate::areBothImmediateIntegerNumbers(v1, v2);
- }
-
- static ALWAYS_INLINE JSValue equal(JSValue v1, JSValue v2)
- {
- ASSERT(canDoFastBitwiseOperations(v1, v2));
- return jsBoolean(v1 == v2);
- }
-
- static ALWAYS_INLINE JSValue notEqual(JSValue v1, JSValue v2)
- {
- ASSERT(canDoFastBitwiseOperations(v1, v2));
- return jsBoolean(v1 != v2);
- }
-
- static ALWAYS_INLINE JSValue andImmediateNumbers(JSValue v1, JSValue v2)
- {
- ASSERT(canDoFastBitwiseOperations(v1, v2));
- return JSImmediate::makeValue(JSImmediate::rawValue(v1) & JSImmediate::rawValue(v2));
- }
-
- static ALWAYS_INLINE JSValue xorImmediateNumbers(JSValue v1, JSValue v2)
- {
- ASSERT(canDoFastBitwiseOperations(v1, v2));
- return JSImmediate::makeValue((JSImmediate::rawValue(v1) ^ JSImmediate::rawValue(v2)) | JSImmediate::TagTypeNumber);
- }
-
- static ALWAYS_INLINE JSValue orImmediateNumbers(JSValue v1, JSValue v2)
- {
- ASSERT(canDoFastBitwiseOperations(v1, v2));
- return JSImmediate::makeValue(JSImmediate::rawValue(v1) | JSImmediate::rawValue(v2));
- }
-
- static ALWAYS_INLINE bool canDoFastRshift(JSValue v1, JSValue v2)
- {
- return JSImmediate::areBothImmediateIntegerNumbers(v1, v2);
- }
-
- static ALWAYS_INLINE bool canDoFastUrshift(JSValue v1, JSValue v2)
- {
- return JSImmediate::areBothImmediateIntegerNumbers(v1, v2) && !(JSImmediate::rawValue(v1) & JSImmediate::signBit);
- }
-
- static ALWAYS_INLINE JSValue rightShiftImmediateNumbers(JSValue val, JSValue shift)
- {
- ASSERT(canDoFastRshift(val, shift) || canDoFastUrshift(val, shift));
- return JSImmediate::makeValue(static_cast<intptr_t>(static_cast<uint32_t>(static_cast<int32_t>(JSImmediate::rawValue(val)) >> ((JSImmediate::rawValue(shift) >> JSImmediate::IntegerPayloadShift) & 0x1f))) | JSImmediate::TagTypeNumber);
- }
-
- static ALWAYS_INLINE bool canDoFastAdditiveOperations(JSValue v)
- {
- // Number is non-negative and an operation involving two of these can't overflow.
- // Checking for allowed negative numbers takes more time than it's worth on SunSpider.
- return (JSImmediate::rawValue(v) & (JSImmediate::TagTypeNumber + (JSImmediate::signBit | (JSImmediate::signBit >> 1)))) == JSImmediate::TagTypeNumber;
- }
-
- static ALWAYS_INLINE bool canDoFastAdditiveOperations(JSValue v1, JSValue v2)
- {
- // Number is non-negative and an operation involving two of these can't overflow.
- // Checking for allowed negative numbers takes more time than it's worth on SunSpider.
- return canDoFastAdditiveOperations(v1) && canDoFastAdditiveOperations(v2);
- }
-
- static ALWAYS_INLINE JSValue addImmediateNumbers(JSValue v1, JSValue v2)
- {
- ASSERT(canDoFastAdditiveOperations(v1, v2));
- return JSImmediate::makeValue(JSImmediate::rawValue(v1) + JSImmediate::rawValue(v2) - JSImmediate::TagTypeNumber);
- }
-
- static ALWAYS_INLINE JSValue subImmediateNumbers(JSValue v1, JSValue v2)
- {
- ASSERT(canDoFastAdditiveOperations(v1, v2));
- return JSImmediate::makeValue(JSImmediate::rawValue(v1) - JSImmediate::rawValue(v2) + JSImmediate::TagTypeNumber);
- }
-
- static ALWAYS_INLINE JSValue incImmediateNumber(JSValue v)
- {
- ASSERT(canDoFastAdditiveOperations(v));
- return JSImmediate::makeValue(JSImmediate::rawValue(v) + (1 << JSImmediate::IntegerPayloadShift));
- }
-
- static ALWAYS_INLINE JSValue decImmediateNumber(JSValue v)
- {
- ASSERT(canDoFastAdditiveOperations(v));
- return JSImmediate::makeValue(JSImmediate::rawValue(v) - (1 << JSImmediate::IntegerPayloadShift));
- }
- };
-
} // namespace JSC
#endif // USE(JSVALUE64)
diff --git a/JavaScriptCore/runtime/JSObject.h b/JavaScriptCore/runtime/JSObject.h
index 8981469..f484ce4 100644
--- a/JavaScriptCore/runtime/JSObject.h
+++ b/JavaScriptCore/runtime/JSObject.h
@@ -340,7 +340,7 @@ inline void JSObject::setPrototype(JSValue prototype)
inline void JSObject::setStructure(NonNullPassRefPtr<Structure> structure)
{
m_structure->deref();
- m_structure = structure.releaseRef(); // ~JSObject balances this ref()
+ m_structure = structure.leakRef(); // ~JSObject balances this ref()
}
inline Structure* JSObject::inheritorID()
diff --git a/JavaScriptCore/runtime/JSString.h b/JavaScriptCore/runtime/JSString.h
index 4d81a2f..51b9f2d 100644
--- a/JavaScriptCore/runtime/JSString.h
+++ b/JavaScriptCore/runtime/JSString.h
@@ -216,7 +216,7 @@ namespace JSC {
, m_length(rope->length())
, m_fiberCount(1)
{
- m_other.m_fibers[0] = rope.releaseRef();
+ m_other.m_fibers[0] = rope.leakRef();
}
// This constructor constructs a new string by concatenating s1 & s2.
// This should only be called with fiberCount <= 3.
diff --git a/JavaScriptCore/runtime/JSZombie.cpp b/JavaScriptCore/runtime/JSZombie.cpp
index 22aabb9..8a36bda 100644
--- a/JavaScriptCore/runtime/JSZombie.cpp
+++ b/JavaScriptCore/runtime/JSZombie.cpp
@@ -37,7 +37,7 @@ Structure* JSZombie::leakedZombieStructure() {
static Structure* structure = 0;
if (!structure) {
Structure::startIgnoringLeaks();
- structure = Structure::create(jsNull(), TypeInfo(UnspecifiedType), 0).releaseRef();
+ structure = Structure::create(jsNull(), TypeInfo(UnspecifiedType), 0).leakRef();
Structure::stopIgnoringLeaks();
}
return structure;
diff --git a/JavaScriptCore/runtime/Lookup.cpp b/JavaScriptCore/runtime/Lookup.cpp
index 07416af..dac1c94 100644
--- a/JavaScriptCore/runtime/Lookup.cpp
+++ b/JavaScriptCore/runtime/Lookup.cpp
@@ -34,7 +34,7 @@ void HashTable::createTable(JSGlobalData* globalData) const
for (int i = 0; i < compactSize; ++i)
entries[i].setKey(0);
for (int i = 0; values[i].key; ++i) {
- StringImpl* identifier = Identifier::add(globalData, values[i].key).releaseRef();
+ StringImpl* identifier = Identifier::add(globalData, values[i].key).leakRef();
int hashIndex = identifier->existingHash() & compactHashSizeMask;
HashEntry* entry = &entries[hashIndex];
diff --git a/JavaScriptCore/wtf/NullPtr.cpp b/JavaScriptCore/wtf/NullPtr.cpp
new file mode 100644
index 0000000..e7d94b2
--- /dev/null
+++ b/JavaScriptCore/wtf/NullPtr.cpp
@@ -0,0 +1,33 @@
+/*
+
+Copyright (C) 2010 Apple Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+#include "NullPtr.h"
+
+#if !__has_feature(cxx_nullptr)
+
+std::nullptr_t nullptr;
+
+#endif
diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h
index 1877917..cb732f3 100644
--- a/JavaScriptCore/wtf/Platform.h
+++ b/JavaScriptCore/wtf/Platform.h
@@ -526,6 +526,7 @@
#define WTF_PLATFORM_CI 1
#define WTF_USE_ATSUI 1
#define WTF_USE_CORE_TEXT 1
+#define WTF_USE_ICCJPEG 1
#else
#define WTF_PLATFORM_SKIA 1
#endif
@@ -814,7 +815,7 @@
/* ENABLE macro defaults */
#if PLATFORM(QT)
-// We must not customize the global operator new and delete for the Qt port.
+/* We must not customize the global operator new and delete for the Qt port. */
#define ENABLE_GLOBAL_FASTMALLOC_NEW 0
#endif
diff --git a/JavaScriptCore/wtf/PlatformRefPtr.h b/JavaScriptCore/wtf/PlatformRefPtr.h
index f99ec9b..8ac16cb 100644
--- a/JavaScriptCore/wtf/PlatformRefPtr.h
+++ b/JavaScriptCore/wtf/PlatformRefPtr.h
@@ -62,8 +62,7 @@ public:
~PlatformRefPtr()
{
- T* ptr = m_ptr;
- if (ptr && ptr != hashTableDeletedValue())
+ if (T* ptr = m_ptr)
derefPlatformPtr(ptr);
}
@@ -71,7 +70,7 @@ public:
{
T* ptr = m_ptr;
m_ptr = 0;
- if (ptr && ptr != hashTableDeletedValue())
+ if (ptr)
derefPlatformPtr(ptr);
}
@@ -111,7 +110,7 @@ template <typename T> inline PlatformRefPtr<T>& PlatformRefPtr<T>::operator=(con
refPlatformPtr(optr);
T* ptr = m_ptr;
m_ptr = optr;
- if (ptr && ptr != hashTableDeletedValue())
+ if (ptr)
derefPlatformPtr(ptr);
return *this;
}
@@ -122,7 +121,7 @@ template <typename T> inline PlatformRefPtr<T>& PlatformRefPtr<T>::operator=(T*
if (optr)
refPlatformPtr(optr);
m_ptr = optr;
- if (ptr && ptr != hashTableDeletedValue())
+ if (ptr)
derefPlatformPtr(ptr);
return *this;
}
diff --git a/JavaScriptCore/wtf/RandomNumberSeed.h b/JavaScriptCore/wtf/RandomNumberSeed.h
index 1f1c00e..b53b506 100644
--- a/JavaScriptCore/wtf/RandomNumberSeed.h
+++ b/JavaScriptCore/wtf/RandomNumberSeed.h
@@ -76,15 +76,6 @@ inline void initializeRandomNumberGenerator()
#endif
}
-inline void initializeWeakRandomNumberGenerator()
-{
-#if COMPILER(MSVC) && defined(_CRT_RAND_S)
- // We need to initialise windows rand() explicitly for Math.random
- unsigned seed = 0;
- rand_s(&seed);
- srand(seed);
-#endif
-}
}
#endif
diff --git a/JavaScriptCore/wtf/text/AtomicString.cpp b/JavaScriptCore/wtf/text/AtomicString.cpp
index c8140d6..c49a837 100644
--- a/JavaScriptCore/wtf/text/AtomicString.cpp
+++ b/JavaScriptCore/wtf/text/AtomicString.cpp
@@ -90,7 +90,7 @@ struct CStringTranslator {
static void translate(StringImpl*& location, const char* const& c, unsigned hash)
{
- location = StringImpl::create(c).releaseRef();
+ location = StringImpl::create(c).leakRef();
location->setHash(hash);
location->setIsAtomic(true);
}
@@ -174,7 +174,7 @@ struct UCharBufferTranslator {
static void translate(StringImpl*& location, const UCharBuffer& buf, unsigned hash)
{
- location = StringImpl::create(buf.s, buf.length).releaseRef();
+ location = StringImpl::create(buf.s, buf.length).leakRef();
location->setHash(hash);
location->setIsAtomic(true);
}
@@ -200,7 +200,7 @@ struct HashAndCharactersTranslator {
static void translate(StringImpl*& location, const HashAndCharacters& buffer, unsigned hash)
{
- location = StringImpl::create(buffer.characters, buffer.length).releaseRef();
+ location = StringImpl::create(buffer.characters, buffer.length).leakRef();
location->setHash(hash);
location->setIsAtomic(true);
}
@@ -295,6 +295,8 @@ AtomicString AtomicString::lower() const
{
// Note: This is a hot function in the Dromaeo benchmark.
StringImpl* impl = this->impl();
+ if (UNLIKELY(!impl))
+ return *this;
RefPtr<StringImpl> newImpl = impl->lower();
if (LIKELY(newImpl == impl))
return *this;
diff --git a/JavaScriptCore/wtf/text/StringImpl.cpp b/JavaScriptCore/wtf/text/StringImpl.cpp
index e1e08ee..f4b2f05 100644
--- a/JavaScriptCore/wtf/text/StringImpl.cpp
+++ b/JavaScriptCore/wtf/text/StringImpl.cpp
@@ -144,7 +144,7 @@ SharedUChar* StringImpl::sharedBuffer()
return m_substringBuffer->sharedBuffer();
if (ownership == BufferOwned) {
ASSERT(!m_sharedBuffer);
- m_sharedBuffer = SharedUChar::create(new SharableUChar(m_data)).releaseRef();
+ m_sharedBuffer = SharedUChar::create(new SharableUChar(m_data)).leakRef();
m_refCountAndFlags = (m_refCountAndFlags & ~s_refCountMaskBufferOwnership) | BufferShared;
}
diff --git a/JavaScriptCore/wtf/text/StringImpl.h b/JavaScriptCore/wtf/text/StringImpl.h
index 897751d..8f0af52 100644
--- a/JavaScriptCore/wtf/text/StringImpl.h
+++ b/JavaScriptCore/wtf/text/StringImpl.h
@@ -110,7 +110,7 @@ private:
StringImpl(const UChar* characters, unsigned length, PassRefPtr<StringImpl> base)
: StringImplBase(length, BufferSubstring)
, m_data(characters)
- , m_substringBuffer(base.releaseRef())
+ , m_substringBuffer(base.leakRef())
, m_hash(0)
{
ASSERT(m_data);
@@ -122,7 +122,7 @@ private:
StringImpl(const UChar* characters, unsigned length, PassRefPtr<SharedUChar> sharedBuffer)
: StringImplBase(length, BufferShared)
, m_data(characters)
- , m_sharedBuffer(sharedBuffer.releaseRef())
+ , m_sharedBuffer(sharedBuffer.leakRef())
, m_hash(0)
{
ASSERT(m_data);