summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore')
-rw-r--r--Source/JavaScriptCore/CMakeLists.txt3
-rw-r--r--Source/JavaScriptCore/ChangeLog566
-rw-r--r--Source/JavaScriptCore/Configurations/JSC.xcconfig2
-rw-r--r--Source/JavaScriptCore/GNUmakefile.list.am14
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.exp2
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.gypi1
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def3
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj52
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj4
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj498
-rw-r--r--Source/JavaScriptCore/Target.pri3
-rw-r--r--Source/JavaScriptCore/assembler/RepatchBuffer.h1
-rw-r--r--Source/JavaScriptCore/bytecode/CallLinkInfo.cpp57
-rw-r--r--Source/JavaScriptCore/bytecode/CallLinkInfo.h105
-rw-r--r--Source/JavaScriptCore/bytecode/CallReturnOffsetToBytecodeOffset.h60
-rw-r--r--Source/JavaScriptCore/bytecode/CodeBlock.cpp54
-rw-r--r--Source/JavaScriptCore/bytecode/CodeBlock.h207
-rw-r--r--Source/JavaScriptCore/bytecode/CodeType.h36
-rw-r--r--Source/JavaScriptCore/bytecode/ExpressionRangeInfo.h47
-rw-r--r--Source/JavaScriptCore/bytecode/GlobalResolveInfo.h48
-rw-r--r--Source/JavaScriptCore/bytecode/HandlerInfo.h47
-rw-r--r--Source/JavaScriptCore/bytecode/LineInfo.h41
-rw-r--r--Source/JavaScriptCore/bytecode/MethodCallLinkInfo.cpp50
-rw-r--r--Source/JavaScriptCore/bytecode/MethodCallLinkInfo.h83
-rw-r--r--Source/JavaScriptCore/bytecode/StructureStubInfo.h12
-rw-r--r--Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp10
-rw-r--r--Source/JavaScriptCore/dfg/DFGAbstractState.cpp2
-rw-r--r--Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp8
-rw-r--r--Source/JavaScriptCore/dfg/DFGGraph.cpp4
-rw-r--r--Source/JavaScriptCore/dfg/DFGJITCompiler.cpp2
-rw-r--r--Source/JavaScriptCore/dfg/DFGOperations.cpp6
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp2
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h2
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp2
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp2
-rw-r--r--Source/JavaScriptCore/interpreter/Interpreter.cpp27
-rw-r--r--Source/JavaScriptCore/interpreter/Interpreter.h8
-rw-r--r--Source/JavaScriptCore/jit/JIT.cpp3
-rw-r--r--Source/JavaScriptCore/jit/JITExceptions.cpp72
-rw-r--r--Source/JavaScriptCore/jit/JITExceptions.h56
-rw-r--r--Source/JavaScriptCore/jit/JITStubs.cpp179
-rw-r--r--Source/JavaScriptCore/jit/JITStubs.h2
-rw-r--r--Source/JavaScriptCore/parser/Parser.cpp1
-rw-r--r--Source/JavaScriptCore/parser/SourceProviderCache.cpp5
-rw-r--r--Source/JavaScriptCore/parser/SourceProviderCache.h6
-rw-r--r--Source/JavaScriptCore/runtime/ArrayPrototype.cpp6
-rw-r--r--Source/JavaScriptCore/runtime/CommonSlowPaths.h204
-rw-r--r--Source/JavaScriptCore/runtime/Executable.cpp4
-rw-r--r--Source/JavaScriptCore/runtime/JSArray.cpp580
-rw-r--r--Source/JavaScriptCore/runtime/JSArray.h52
-rw-r--r--Source/JavaScriptCore/runtime/JSByteArray.cpp2
-rw-r--r--Source/JavaScriptCore/runtime/JSGlobalData.h3
-rw-r--r--Source/JavaScriptCore/runtime/JSObject.cpp4
-rw-r--r--Source/JavaScriptCore/runtime/JSString.h2
-rw-r--r--Source/JavaScriptCore/runtime/PropertyDescriptor.cpp36
-rw-r--r--Source/JavaScriptCore/runtime/PropertyDescriptor.h5
-rw-r--r--Source/JavaScriptCore/wtf/Assertions.cpp46
-rw-r--r--Source/JavaScriptCore/wtf/ByteArray.h2
-rw-r--r--Source/JavaScriptCore/wtf/CMakeLists.txt10
-rw-r--r--Source/JavaScriptCore/wtf/DateMath.cpp1
-rw-r--r--Source/JavaScriptCore/wtf/Functional.h20
-rw-r--r--Source/JavaScriptCore/wtf/ListHashSet.h2
-rw-r--r--Source/JavaScriptCore/wtf/OwnFastMallocPtr.h53
-rw-r--r--Source/JavaScriptCore/wtf/TypeTraits.cpp13
-rw-r--r--Source/JavaScriptCore/wtf/TypeTraits.h46
-rw-r--r--Source/JavaScriptCore/wtf/text/StringImpl.h1
-rw-r--r--Source/JavaScriptCore/wtf/wtf.pro1
67 files changed, 2644 insertions, 844 deletions
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
index c263b2885..00e0296c0 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
@@ -34,9 +34,11 @@ SET(JavaScriptCore_SOURCES
API/JSWeakObjectMapRefPrivate.cpp
API/OpaqueJSString.cpp
+ bytecode/CallLinkInfo.cpp
bytecode/CodeBlock.cpp
bytecode/DFGExitProfile.cpp
bytecode/JumpTable.cpp
+ bytecode/MethodCallLinkInfo.cpp
bytecode/Opcode.cpp
bytecode/PredictedType.cpp
bytecode/SamplingTool.cpp
@@ -92,6 +94,7 @@ SET(JavaScriptCore_SOURCES
jit/JITCall32_64.cpp
jit/JITCall.cpp
jit/JIT.cpp
+ jit/JITExceptions.cpp
jit/JITOpcodes32_64.cpp
jit/JITOpcodes.cpp
jit/JITPropertyAccess32_64.cpp
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 441521586..c8b43b41c 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,569 @@
+2012-01-10 Mark Rowe <mrowe@apple.com>
+
+ <rdar://problem/10673792> jsc should install directly in to versioned Resources subfolder
+
+ This ensures that jsc ends up in a consistent location whether built in to the same DSTROOT
+ as JavaScriptCore.framework or in to a different one.
+
+ Rubber-stamped by Dan Bernstein.
+
+ * Configurations/JSC.xcconfig: Update INSTALL_PATH.
+
+2012-01-10 Filip Pizlo <fpizlo@apple.com>
+
+ DFG inlining block linking compares BlockIndex against bytecode index
+ https://bugs.webkit.org/show_bug.cgi?id=76018
+ <rdar://problem/10671979>
+
+ Reviewed by Gavin Barraclough.
+
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::parseCodeBlock):
+
+2012-01-10 Filip Pizlo <fpizlo@apple.com>
+
+ CodeBlock.h declares too many things
+ https://bugs.webkit.org/show_bug.cgi?id=76001
+
+ Rubber stamped by Gavin Barraclough.
+
+ Removed all non-CodeBlock type declarations from CodeBlock.h, and put them
+ into separate header files. Also removed all non-CodeBlock method implementations
+ from CodeBlock.cpp and put them into corresponding cpp files.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * Target.pri:
+ * assembler/RepatchBuffer.h:
+ * bytecode/CallLinkInfo.cpp: Added.
+ (JSC::CallLinkInfo::unlink):
+ * bytecode/CallLinkInfo.h: Added.
+ (JSC::CallLinkInfo::callTypeFor):
+ (JSC::CallLinkInfo::CallLinkInfo):
+ (JSC::CallLinkInfo::~CallLinkInfo):
+ (JSC::CallLinkInfo::isLinked):
+ (JSC::CallLinkInfo::seenOnce):
+ (JSC::CallLinkInfo::setSeen):
+ (JSC::getCallLinkInfoReturnLocation):
+ (JSC::getCallLinkInfoBytecodeIndex):
+ * bytecode/CallReturnOffsetToBytecodeOffset.h: Added.
+ (JSC::CallReturnOffsetToBytecodeOffset::CallReturnOffsetToBytecodeOffset):
+ (JSC::getCallReturnOffset):
+ * bytecode/CodeBlock.cpp:
+ * bytecode/CodeBlock.h:
+ * bytecode/CodeType.h: Added.
+ * bytecode/ExpressionRangeInfo.h: Added.
+ * bytecode/GlobalResolveInfo.h: Added.
+ (JSC::GlobalResolveInfo::GlobalResolveInfo):
+ * bytecode/HandlerInfo.h: Added.
+ * bytecode/LineInfo.h: Added.
+ * bytecode/MethodCallLinkInfo.cpp: Added.
+ (JSC::MethodCallLinkInfo::reset):
+ * bytecode/MethodCallLinkInfo.h: Added.
+ (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
+ (JSC::MethodCallLinkInfo::seenOnce):
+ (JSC::MethodCallLinkInfo::setSeen):
+ (JSC::getMethodCallLinkInfoReturnLocation):
+ (JSC::getMethodCallLinkInfoBytecodeIndex):
+ * bytecode/StructureStubInfo.h:
+ (JSC::getStructureStubInfoReturnLocation):
+ (JSC::getStructureStubInfoBytecodeIndex):
+
+2012-01-10 Anders Carlsson <andersca@apple.com>
+
+ Hang opening movie that requires authentication
+ https://bugs.webkit.org/show_bug.cgi?id=75989
+ <rdar://problem/9601915>
+
+ Reviewed by Sam Weinig.
+
+ * wtf/Functional.h:
+ Add function wrapper for a function that takes three parameters.
+
+2012-01-10 Filip Pizlo <fpizlo@apple.com>
+
+ CodeBlock::m_numParameters should be encapsulated
+ https://bugs.webkit.org/show_bug.cgi?id=75985
+ <rdar://problem/10671020>
+
+ Reviewed by Oliver Hunt.
+
+ Encapsulated CodeBlock::m_numParameters and hooked argument profile creation
+ into it. This appears to be performance neutral.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::CodeBlock):
+ (JSC::CodeBlock::setNumParameters):
+ (JSC::CodeBlock::addParameter):
+ * bytecode/CodeBlock.h:
+ (JSC::CodeBlock::numParameters):
+ (JSC::CodeBlock::addressOfNumParameters):
+ (JSC::CodeBlock::offsetOfNumParameters):
+ (JSC::CodeBlock::numberOfArgumentValueProfiles):
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ (JSC::BytecodeGenerator::addParameter):
+ (JSC::BytecodeGenerator::emitReturn):
+ * dfg/DFGAbstractState.cpp:
+ (JSC::DFG::AbstractState::AbstractState):
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::ByteCodeParser):
+ (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
+ * dfg/DFGGraph.cpp:
+ (JSC::DFG::Graph::predictArgumentTypes):
+ * dfg/DFGJITCompiler.cpp:
+ (JSC::DFG::JITCompiler::compileFunction):
+ * dfg/DFGOperations.cpp:
+ * dfg/DFGSpeculativeJIT.cpp:
+ (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
+ * dfg/DFGSpeculativeJIT.h:
+ (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::slideRegisterWindowForCall):
+ (JSC::Interpreter::dumpRegisters):
+ (JSC::Interpreter::execute):
+ (JSC::Interpreter::prepareForRepeatCall):
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompile):
+ * jit/JITStubs.cpp:
+ (JSC::arityCheckFor):
+ (JSC::lazyLinkFor):
+ * runtime/Executable.cpp:
+ (JSC::FunctionExecutable::compileForCallInternal):
+ (JSC::FunctionExecutable::compileForConstructInternal):
+
+2012-01-10 Gavin Barraclough <barraclough@apple.com>
+
+ Build fix following https://bugs.webkit.org/show_bug.cgi?id=75935
+
+ Fix 32-bit builds.
+
+ * runtime/JSArray.cpp:
+ (JSC::JSArray::getOwnPropertyNames):
+ (JSC::JSArray::setLength):
+
+2012-01-10 Gavin Barraclough <barraclough@apple.com>
+
+ Windows build fix.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2012-01-10 Gavin Barraclough <barraclough@apple.com>
+
+ Do not allow Array length to be set if it is non-configurable
+ https://bugs.webkit.org/show_bug.cgi?id=75935
+
+ Reviewed by Sam Weinig.
+
+ Do not allow Array length to be set if it is non-configurable, and if the new
+ length is less than the old length then intervening properties should removed
+ in reverse order. Removal of properties should cease if an intervening indexed
+ property being removed is non-configurable.
+
+ * JavaScriptCore.exp:
+ - Removed export for setLength.
+ * runtime/ArrayPrototype.cpp:
+ (JSC::arrayProtoFuncConcat):
+ - JSArray::setLength now takes an ExecState*
+ (JSC::arrayProtoFuncSlice):
+ - JSArray::setLength now takes an ExecState*
+ * runtime/JSArray.cpp:
+ (JSC::JSArray::defineOwnProperty):
+ - JSArray::setLength now takes an ExecState*
+ (JSC::JSArray::put):
+ - JSArray::setLength now takes an ExecState*
+ (JSC::compareKeysForQSort):
+ - Keys extracted from the map can be stored as unsigneds.
+ (JSC::JSArray::getOwnPropertyNames):
+ - Keys extracted from the map can be stored as unsigneds.
+ (JSC::JSArray::setLength):
+ - Check lengthIsReadOnly(), rather than copying the entire map to iterate
+ over to determine which keys to remove, instead just copy the keys from
+ the map to a Vector. When inSparseMode sort the keys in the Vector so
+ that we can remove properties in reverse order.
+ * runtime/JSArray.h:
+ - JSArray::setLength now takes an ExecState*
+
+2012-01-10 Gavin Barraclough <barraclough@apple.com>
+
+ Use SameValue to compare property descriptor values
+ https://bugs.webkit.org/show_bug.cgi?id=75975
+
+ Reviewed by Sam Weinig.
+
+ Rather than strictEqual.
+
+ * runtime/JSArray.cpp:
+ (JSC::JSArray::defineOwnNumericProperty):
+ - Missing configurablePresent() check.
+ * runtime/JSObject.cpp:
+ (JSC::JSObject::defineOwnProperty):
+ - call sameValue.
+ * runtime/PropertyDescriptor.cpp:
+ (JSC::sameValue):
+ - Moved from JSArray.cpp, fix NaN comparison.
+ (JSC::PropertyDescriptor::equalTo):
+ - call sameValue.
+ * runtime/PropertyDescriptor.h:
+ - Added declaration for sameValue.
+2012-01-09 Gavin Barraclough <barraclough@apple.com>
+
+ Error handling : in ISO8601 timezone
+ https://bugs.webkit.org/show_bug.cgi?id=75919
+
+ Reviewed by Sam Weinig.
+
+ * wtf/DateMath.cpp:
+ (WTF::parseDateFromNullTerminatedCharacters):
+ - need to increment the string position.
+
+2012-01-09 Mark Rowe <mrowe@apple.com>
+
+ JavaScriptCore executable targets shouldn't explicitly depend on the JavaScriptCore framework target
+ <http://webkit.org/b/75907> / <rdar://problem/10659862>
+
+ We'd like for it to be possible to build jsc without building JavaScriptCore.framework and the explicit
+ dependencies prevent this.
+
+ Reviewed by Dan Bernstein.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+
+2012-01-09 Adam Treat <atreat@rim.com>
+
+ Log is a little to verbose for blackberry port
+ https://bugs.webkit.org/show_bug.cgi?id=75728
+
+ The BlackBerry::Platform::Log* functions take care of the call to vfprintf
+ which is resulting in unintentional noise in our logs. Add a conditional
+ directive to fix.
+
+ Change to using BlackBerry::Platform::logStreamV which does not insert
+ threading info and newlines unlike BlackBerry::Platform::log.
+
+ Finally, add log locking and unlocking which the BlackBerry platform
+ uses to ensure that N threads do not trample on each other's logs.
+
+ Reviewed by Rob Buis.
+
+ * wtf/Assertions.cpp:
+ (WTFLogLocker::WTFReportAssertionFailure):
+ (WTFLogLocker::WTFReportAssertionFailureWithMessage):
+ (WTFLogLocker::WTFReportArgumentAssertionFailure):
+ (WTFLogLocker::WTFReportFatalError):
+ (WTFLogLocker::WTFReportError):
+ (WTFLogLocker::WTFLog):
+ (WTFLogLocker::WTFLogVerbose):
+
+2012-01-09 Gavin Barraclough <barraclough@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=75789
+ defineOwnProperty not implemented for Array objects
+
+ Reviewed by Sam Weinig.
+
+ Implements support for getter/setter & non-default attribute properties on arrays,
+ by forcing them into a dictionary-like 'SparseMode'. This fixes ~300 test-262
+ test failures.
+
+ * JavaScriptCore.exp:
+ - Updated exports.
+ * dfg/DFGOperations.cpp:
+ - JSArray::pop now requires an exec state.
+ * runtime/ArrayPrototype.cpp:
+ (JSC::arrayProtoFuncPop):
+ - JSArray::pop now requires an exec state.
+ * runtime/JSArray.cpp:
+ (JSC::SparseArrayValueMap::add):
+ - Add a potentially empty entry into the map.
+ (JSC::SparseArrayValueMap::put):
+ - Changed to call setter.
+ (JSC::SparseArrayEntry::get):
+ - calls getters.
+ (JSC::SparseArrayEntry::getNonSparseMode):
+ - does not call getters.
+ (JSC::JSArray::enterSparseMode):
+ - Convert into 'SparseMode' - removes the vectors, don't allow it to be recreated.
+ (JSC::JSArray::putDescriptor):
+ - Create a numeric property based on a descriptor.
+ (JSC::sameValue):
+ - See ES5.1 9.12.
+ (JSC::reject):
+ - Helper for the [[DefineOwnProperty]] algorithm.
+ (JSC::JSArray::defineOwnNumericProperty):
+ - Define an indexed property on an array object.
+ (JSC::JSArray::setLengthWritable):
+ - Marks the length read-only, enters SparseMode as necessary.
+ (JSC::JSArray::defineOwnProperty):
+ - Defines either an indexed property or 'length' on an array object.
+ (JSC::JSArray::getOwnPropertySlotByIndex):
+ - Updated to correctly handle accessor descriptors & attributes.
+ (JSC::JSArray::getOwnPropertyDescriptor):
+ - Updated to correctly handle accessor descriptors & attributes.
+ (JSC::JSArray::put):
+ - Pass strict mode flag to setLength.
+ (JSC::JSArray::putByIndex):
+ - putByIndexBeyondVectorLength requires an ExecState* rather than a JSGloablData&.
+ (JSC::JSArray::putByIndexBeyondVectorLength):
+ - Pass exec to SparseArrayValueMap::put.
+ (JSC::JSArray::deletePropertyByIndex):
+ - Do not allow deletion of non-configurable properties.
+ (JSC::compareKeysForQSort):
+ - used in implementation of getOwnPropertyNames.
+ (JSC::JSArray::getOwnPropertyNames):
+ - Properties in the sparse map should be iterated in order.
+ (JSC::JSArray::setLength):
+ - Updated to take a 'shouldThrow' flag, return a result indicating error.
+ (JSC::JSArray::pop):
+ - pop should throw an error if length is not writable, even if the array is empty.
+ (JSC::JSArray::push):
+ - putByIndexBeyondVectorLength requires an ExecState* rather than a JSGloablData&.
+ (JSC::JSArray::sort):
+ - Changed 'get' to 'getNonSparseMode' (can't be getters to call).
+ (JSC::JSArray::compactForSorting):
+ - Changed 'get' to 'getNonSparseMode' (can't be getters to call).
+ * runtime/JSArray.h:
+ (JSC::SparseArrayValueMap::lengthIsReadOnly):
+ - Check if the length is read only.
+ (JSC::SparseArrayValueMap::setLengthIsReadOnly):
+ - Mark the length as read only.
+ (JSC::SparseArrayValueMap::find):
+ - Moved into header.
+ (JSC::JSArray::isLengthWritable):
+ - Wraps SparseArrayValueMap::lengthIsReadOnly.
+ * runtime/JSObject.cpp:
+ (JSC::JSObject::defineOwnProperty):
+ - Should be returning the result of putDescriptor.
+ * runtime/PropertyDescriptor.cpp:
+ (JSC::PropertyDescriptor::attributesOverridingCurrent):
+ - Added attributesOverridingCurrent - this should probably be merged with attributesWithOverride.
+ * runtime/PropertyDescriptor.h:
+ - Added attributesOverridingCurrent.
+
+2012-01-09 Pavel Heimlich <tropikhajma@gmail.com>
+
+ There is no support for fastcall in Solaris Studio.
+ Fixes build on Solaris.
+ https://bugs.webkit.org/show_bug.cgi?id=75736
+
+ Reviewed by Gavin Barraclough.
+
+ * jit/JITStubs.h:
+
+2012-01-09 Pavel Heimlich <tropikhajma@gmail.com>
+
+ Fix build failure on Solaris
+ https://bugs.webkit.org/show_bug.cgi?id=75733
+
+ Reviewed by Gavin Barraclough.
+
+ * wtf/ByteArray.h:
+
+2012-01-01 Raphael Kubo da Costa <kubo@profusion.mobi>
+
+ [CMake] Clean up some cruft from WTF's CMakeLists.txt
+ https://bugs.webkit.org/show_bug.cgi?id=75420
+
+ Reviewed by Daniel Bates.
+
+ * wtf/CMakeLists.txt: Remove the unused WTF_PORT_FLAGS variable; add
+ all needed paths to WTF_INCLUDE_DIRECTORIES in a single place.
+
+2012-01-08 Xianzhu Wang <wangxianzhu@chromium.org>
+
+ Fix compilation error about ListHashSetReverseIterator
+ https://bugs.webkit.org/show_bug.cgi?id=75372
+
+ Reviewed by Darin Adler.
+
+ There is a typo in class ListHashSetReverseIterator:
+ typedef ListHashSetConstIterator<ValueArg, inlineCapacity, HashArg> const_reverse_iterator;
+ Should be
+ typedef ListHashSetConstReverseIterator<ValueArg, inlineCapacity, HashArg> const_reverse_iterator;
+
+ * wtf/ListHashSet.h:
+
+2012-01-08 Ryosuke Niwa <rniwa@webkit.org>
+
+ WinCE build fix after r104415.
+
+ * jit/JITExceptions.cpp:
+ * jit/JITExceptions.h:
+
+2012-01-08 Filip Pizlo <fpizlo@apple.com>
+
+ The JIT's protocol for exception handling should be available to other parts of the system
+ https://bugs.webkit.org/show_bug.cgi?id=75808
+ <rdar://problem/10661025>
+
+ Reviewed by Oliver Hunt.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * Target.pri:
+ * jit/JITExceptions.cpp: Added.
+ (JSC::genericThrow):
+ (JSC::jitThrow):
+ * jit/JITExceptions.h: Added.
+ * jit/JITStubs.cpp:
+ * runtime/JSGlobalData.h:
+
+2012-01-06 Hajime Morrita <morrita@chromium.org>
+
+ https://bugs.webkit.org/show_bug.cgi?id=75296
+ JSString should not have JS_EXPORTCLASS annotation
+
+ Reviewed by Kevin Ollivier.
+
+ * runtime/JSString.h: Removed JS_EXPORTCLASS annotation.
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ Added missing symbols which were hidden by JS_EXPORTCLASS.
+
+2012-01-06 Michael Saboff <msaboff@apple.com>
+
+ JSArray::pop() should compare SparseArrayValueMap::find() to SparseArrayValueMap::notFound()
+ https://bugs.webkit.org/show_bug.cgi?id=75757
+
+ Reviewed by Gavin Barraclough.
+
+ * runtime/JSArray.cpp:
+ (JSC::JSArray::pop): Changed map->end() to map->notFound().
+
+2012-01-06 Filip Pizlo <fpizlo@apple.com>
+
+ JIT stub slow paths that would be identical to that of an interpreter should be factored out
+ https://bugs.webkit.org/show_bug.cgi?id=75743
+ <rdar://problem/10657024>
+
+ Reviewed by Geoff Garen.
+
+ * GNUmakefile.list.am:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ * runtime/CommonSlowPaths.h: Added.
+ (JSC::CommonSlowPaths::opInstanceOfSlow):
+ (JSC::CommonSlowPaths::opIn):
+ (JSC::CommonSlowPaths::opResolve):
+ (JSC::CommonSlowPaths::opResolveSkip):
+ (JSC::CommonSlowPaths::opResolveWithBase):
+ (JSC::CommonSlowPaths::opResolveWithThis):
+
+2012-01-06 Sam Weinig <sam@webkit.org>
+
+ Fix windows build.
+
+ * wtf/TypeTraits.cpp:
+
+2012-01-05 Michael Saboff <msaboff@apple.com>
+
+ Default HashTraits for Opcode don't work for Opcode = 0
+ https://bugs.webkit.org/show_bug.cgi?id=75595
+
+ Reviewed by Oliver Hunt.
+
+ Removed the populating of the m_opcodeIDTable table in the
+ case where the OpcodeID and Opcode are the same (m_enabled is false).
+ Instead we just cast the one type to the other.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::initialize):
+ (JSC::Interpreter::isOpcode):
+ * interpreter/Interpreter.h:
+ (JSC::Interpreter::getOpcodeID):
+
+2012-01-06 Sam Weinig <sam@webkit.org>
+
+ Add a DecayArray type trait as a first step towards merging OwnPtr and OwnArrayPtr
+ https://bugs.webkit.org/show_bug.cgi?id=75737
+
+ Reviewed by Anders Carlsson.
+
+ * wtf/TypeTraits.cpp:
+ * wtf/TypeTraits.h:
+ Added a DecayArray trait, that can convert T[] and T[3] -> T*. DecayArray
+ is composed of some helpers which are also exposed, Conditional<>, which
+ can provide one type or another based on a boolean predicate, IsArray<>
+ which can deduce array types, and RemoveExtent<>, which removes the extent
+ from an array type.
+
+2012-01-06 Oliver Hunt <oliver@apple.com>
+
+ GetByteArrayLength is incorrect
+ https://bugs.webkit.org/show_bug.cgi?id=75735
+
+ Reviewed by Filip Pizlo.
+
+ Load the byte array length from the correct location.
+ This stops an existing test from hanging.
+
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+
+2012-01-06 Filip Pizlo <fpizlo@apple.com>
+
+ Fix build.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+
+2012-01-06 Oliver Hunt <oliver@apple.com>
+
+ DFG no longer optimises CanvasPixelArray
+ https://bugs.webkit.org/show_bug.cgi?id=75729
+
+ Reviewed by Gavin Barraclough.
+
+ Rename ByteArray (in its ClassInfo) to Uint8ClampedArray to match
+ the future name when we switch over to the new typed-array based
+ ImageData specification.
+
+ * runtime/JSByteArray.cpp:
+
+2012-01-06 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Use HashMap<OwnPtr> for SourceProviderCache items
+ https://bugs.webkit.org/show_bug.cgi?id=75346
+
+ Reviewed by Daniel Bates.
+
+ * parser/Parser.cpp:
+ * parser/SourceProviderCache.cpp:
+ (JSC::SourceProviderCache::clear):
+ (JSC::SourceProviderCache::add):
+ * parser/SourceProviderCache.h:
+
+2012-01-06 Sam Weinig <sam@webkit.org>
+
+ Remove unused OwnFastMallocPtr class.
+ https://bugs.webkit.org/show_bug.cgi?id=75722
+
+ Reviewed by Geoffrey Garen.
+
+ * GNUmakefile.list.am:
+ * JavaScriptCore.gypi:
+ * JavaScriptCore.vcproj/WTF/WTF.vcproj:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * wtf/CMakeLists.txt:
+ * wtf/OwnFastMallocPtr.h: Removed.
+ * wtf/text/StringImpl.h:
+ * wtf/wtf.pro:
+
+2012-01-06 Benjamin Poulain <bpoulain@webkit.org>
+
+ [Mac] Sort the resources of JavaScriptCore.xcodeproj and remove duplicates
+ https://bugs.webkit.org/show_bug.cgi?id=75631
+
+ Reviewed by Andreas Kling.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+
2012-01-06 Eric Seidel <eric@webkit.org> and Gustavo Noronha Silva <gustavo.noronha@collabora.com>
Make the new WTF module build on Gtk
diff --git a/Source/JavaScriptCore/Configurations/JSC.xcconfig b/Source/JavaScriptCore/Configurations/JSC.xcconfig
index c6b527059..8330d3f27 100644
--- a/Source/JavaScriptCore/Configurations/JSC.xcconfig
+++ b/Source/JavaScriptCore/Configurations/JSC.xcconfig
@@ -21,7 +21,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Resources
+INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Versions/A/Resources
PRODUCT_NAME = jsc;
CODE_SIGN_ENTITLEMENTS = $(CODE_SIGN_ENTITLEMENTS_$(REAL_PLATFORM_NAME));
CODE_SIGN_ENTITLEMENTS_iphoneos = entitlements.plist;
diff --git a/Source/JavaScriptCore/GNUmakefile.list.am b/Source/JavaScriptCore/GNUmakefile.list.am
index 23c7fdd1c..4fb218199 100644
--- a/Source/JavaScriptCore/GNUmakefile.list.am
+++ b/Source/JavaScriptCore/GNUmakefile.list.am
@@ -81,6 +81,10 @@ javascriptcore_sources += \
Source/JavaScriptCore/assembler/RepatchBuffer.h \
Source/JavaScriptCore/assembler/SH4Assembler.h \
Source/JavaScriptCore/assembler/X86Assembler.h \
+ Source/JavaScriptCore/bytecode/CallLinkInfo.cpp \
+ Source/JavaScriptCore/bytecode/CallLinkInfo.h \
+ Source/JavaScriptCore/bytecode/CallReturnOffsetToBytecodeOffset.h \
+ Source/JavaScriptCore/bytecode/CodeType.h \
Source/JavaScriptCore/bytecode/CodeBlock.cpp \
Source/JavaScriptCore/bytecode/CodeBlock.h \
Source/JavaScriptCore/bytecode/CodeOrigin.h \
@@ -88,9 +92,15 @@ javascriptcore_sources += \
Source/JavaScriptCore/bytecode/DFGExitProfile.cpp \
Source/JavaScriptCore/bytecode/DFGExitProfile.h \
Source/JavaScriptCore/bytecode/EvalCodeCache.h \
+ Source/JavaScriptCore/bytecode/ExpressionRangeInfo.h \
+ Source/JavaScriptCore/bytecode/GlobalResolveInfo.h \
+ Source/JavaScriptCore/bytecode/HandelerInfo.h \
Source/JavaScriptCore/bytecode/Instruction.h \
Source/JavaScriptCore/bytecode/JumpTable.cpp \
Source/JavaScriptCore/bytecode/JumpTable.h \
+ Source/JavaScriptCore/bytecode/LineInfo.h \
+ Source/JavaScriptCore/bytecode/MethodCallLinkInfo.cpp \
+ Source/JavaScriptCore/bytecode/MethodCallLinkInfo.h \
Source/JavaScriptCore/bytecode/Opcode.cpp \
Source/JavaScriptCore/bytecode/Opcode.h \
Source/JavaScriptCore/bytecode/PredictedType.cpp \
@@ -260,6 +270,8 @@ javascriptcore_sources += \
Source/JavaScriptCore/jit/JITCode.h \
Source/JavaScriptCore/jit/JIT.cpp \
Source/JavaScriptCore/jit/JIT.h \
+ Source/JavaScriptCore/jit/JITExceptions.cpp \
+ Source/JavaScriptCore/jit/JITExceptions.h \
Source/JavaScriptCore/jit/JITInlineMethods.h \
Source/JavaScriptCore/jit/JITOpcodes32_64.cpp \
Source/JavaScriptCore/jit/JITOpcodes.cpp \
@@ -325,6 +337,7 @@ javascriptcore_sources += \
Source/JavaScriptCore/runtime/ClassInfo.h \
Source/JavaScriptCore/runtime/CommonIdentifiers.cpp \
Source/JavaScriptCore/runtime/CommonIdentifiers.h \
+ Source/JavaScriptCore/runtime/CommonSlowPaths.h \
Source/JavaScriptCore/runtime/Completion.cpp \
Source/JavaScriptCore/runtime/Completion.h \
Source/JavaScriptCore/runtime/ConstructData.cpp \
@@ -607,7 +620,6 @@ javascriptcore_sources += \
Source/JavaScriptCore/wtf/OSRandomSource.cpp \
Source/JavaScriptCore/wtf/OSRandomSource.h \
Source/JavaScriptCore/wtf/OwnArrayPtr.h \
- Source/JavaScriptCore/wtf/OwnFastMallocPtr.h \
Source/JavaScriptCore/wtf/OwnPtr.h \
Source/JavaScriptCore/wtf/OwnPtrCommon.h \
Source/JavaScriptCore/wtf/PackedIntVector.h \
diff --git a/Source/JavaScriptCore/JavaScriptCore.exp b/Source/JavaScriptCore/JavaScriptCore.exp
index c5ce181f1..c79c146e9 100644
--- a/Source/JavaScriptCore/JavaScriptCore.exp
+++ b/Source/JavaScriptCore/JavaScriptCore.exp
@@ -281,11 +281,11 @@ __ZN3JSC6RegExp6createERNS_12JSGlobalDataERKNS_7UStringENS_11RegExpFlagsE
__ZN3JSC7JSArray13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
__ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataEj
__ZN3JSC7JSArray15setSubclassDataEPv
+__ZN3JSC7JSArray17defineOwnPropertyEPNS_8JSObjectEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorEb
__ZN3JSC7JSArray25getOwnPropertySlotByIndexEPNS_6JSCellEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC7JSArray30tryFinishCreationUninitializedERNS_12JSGlobalDataEj
__ZN3JSC7JSArray6s_infoE
__ZN3JSC7JSArray7destroyEPNS_6JSCellE
-__ZN3JSC7JSArray9setLengthEj
__ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEPNS_9StructureE
__ZN3JSC7JSArrayC2ERNS_12JSGlobalDataEPNS_9StructureE
__ZN3JSC7JSArrayD2Ev
diff --git a/Source/JavaScriptCore/JavaScriptCore.gypi b/Source/JavaScriptCore/JavaScriptCore.gypi
index 09b2680f5..c9367911b 100644
--- a/Source/JavaScriptCore/JavaScriptCore.gypi
+++ b/Source/JavaScriptCore/JavaScriptCore.gypi
@@ -182,7 +182,6 @@
'wtf/NullPtr.h',
'wtf/OSAllocator.h',
'wtf/OwnArrayPtr.h',
- 'wtf/OwnFastMallocPtr.h',
'wtf/OwnPtr.h',
'wtf/OwnPtrCommon.h',
'wtf/PageAllocation.h',
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
index 9ee61eaab..577329e94 100644
--- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
+++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
@@ -296,12 +296,12 @@ EXPORTS
?retrieveLastCaller@Interpreter@JSC@@QBEXPAVExecState@2@AAH1AAVUString@2@AAVJSValue@2@@Z
?s_globalObjectMethodTable@JSGlobalObject@JSC@@1UGlobalObjectMethodTable@2@B
?s_info@ExecutableBase@JSC@@2UClassInfo@2@B
+ ?s_info@JSString@JSC@@2UClassInfo@2@B
?setConfigurable@PropertyDescriptor@JSC@@QAEX_N@Z
?setDescriptor@PropertyDescriptor@JSC@@QAEXVJSValue@2@I@Z
?setDumpsGeneratedCode@BytecodeGenerator@JSC@@SAX_N@Z
?setEnumerable@PropertyDescriptor@JSC@@QAEX_N@Z
?setGetter@PropertyDescriptor@JSC@@QAEXVJSValue@2@@Z
- ?setLength@JSArray@JSC@@QAEXI@Z
?setLoc@StatementNode@JSC@@QAEXHH@Z
?setMainThreadCallbacksPaused@WTF@@YAX_N@Z
?setOrderLowerFirst@Collator@WTF@@QAEX_N@Z
@@ -336,6 +336,7 @@ EXPORTS
?timedWait@ThreadCondition@WTF@@QAE_NAAVMutex@2@N@Z
?tlsKeyCount@WTF@@YAAAJXZ
?tlsKeys@WTF@@YAPAKXZ
+ ?toBoolean@JSString@JSC@@QBE_NPAVExecState@2@@Z
?toInt32@JSC@@YAHN@Z
?toInteger@JSValue@JSC@@QBENPAVExecState@2@@Z
?toNumberSlowCase@JSValue@JSC@@ABENPAVExecState@2@@Z
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
index 888269623..8fd3c8ab0 100644
--- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
+++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
@@ -594,6 +594,10 @@
>
</File>
<File
+ RelativePath="..\..\runtime\CommonSlowPaths.h"
+ >
+ </File>
+ <File
RelativePath="..\..\runtime\Completion.cpp"
>
</File>
@@ -1446,6 +1450,46 @@
Name="bytecode"
>
<File
+ RelativePath="..\..\bytecode\HandlerInfo.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\bytecode\CallLinkInfo.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\bytecode\LineInfo.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\bytecode\MethodCallLinkInfo.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\bytecode\CallReturnOffsetToBytecodeOffset.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\bytecode\CodeType.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\bytecode\ExpressionRangeInfo.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\bytecode\MethodCallLinkInfo.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\bytecode\CallLinkInfo.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\bytecode\GlobalResolveInfo.h"
+ >
+ </File>
+ <File
RelativePath="..\..\bytecode\CodeBlock.cpp"
>
</File>
@@ -1706,6 +1750,14 @@
>
</File>
<File
+ RelativePath="..\..\jit\JITExceptions.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\jit\JITExceptions.h"
+ >
+ </File>
+ <File
RelativePath="..\..\jit\JITStubs.cpp"
>
</File>
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
index 6491d00e1..6e89b0167 100644
--- a/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
+++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
@@ -965,10 +965,6 @@
>
</File>
<File
- RelativePath="..\..\wtf\OwnFastMallocPtr.h"
- >
- </File>
- <File
RelativePath="..\..\wtf\OwnPtr.h"
>
</File>
diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
index e095e5ddc..8685f097f 100644
--- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
+++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
@@ -47,8 +47,18 @@
0B4D7E630F319AC800AD7E58 /* TypeTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B4D7E620F319AC800AD7E58 /* TypeTraits.h */; settings = {ATTRIBUTES = (Private, ); }; };
0BAC94A01338728400CF135B /* ThreadRestrictionVerifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BAC949E1338728400CF135B /* ThreadRestrictionVerifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
0BCD83571485845200EA2003 /* TemporaryChange.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BCD83541485841200EA2003 /* TemporaryChange.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 0BDFFAE10FC6193100D69EF4 /* OwnFastMallocPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BDFFAD10FC616EC00D69EF4 /* OwnFastMallocPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
0BF28A2911A33DC300638F84 /* SizeLimits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF28A2811A33DC300638F84 /* SizeLimits.cpp */; };
+ 0F0B83A714BCF50700885B4F /* CodeType.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83A514BCF50400885B4F /* CodeType.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F0B83A914BCF56200885B4F /* HandlerInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83A814BCF55E00885B4F /* HandlerInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F0B83AB14BCF5BB00885B4F /* ExpressionRangeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83AA14BCF5B900885B4F /* ExpressionRangeInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F0B83AD14BCF60400885B4F /* LineInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83AC14BCF60200885B4F /* LineInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F0B83B014BCF71600885B4F /* CallLinkInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F0B83AE14BCF71400885B4F /* CallLinkInfo.cpp */; };
+ 0F0B83B114BCF71800885B4F /* CallLinkInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83AF14BCF71400885B4F /* CallLinkInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F0B83B414BCF86000885B4F /* MethodCallLinkInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F0B83B214BCF85E00885B4F /* MethodCallLinkInfo.cpp */; };
+ 0F0B83B514BCF86200885B4F /* MethodCallLinkInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83B314BCF85E00885B4F /* MethodCallLinkInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F0B83B714BCF8E100885B4F /* GlobalResolveInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83B614BCF8DF00885B4F /* GlobalResolveInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F15F15F14B7A73E005DE37D /* CommonSlowPaths.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F15F15D14B7A73A005DE37D /* CommonSlowPaths.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F16D726142C39C000CF784A /* BitVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F16D724142C39A200CF784A /* BitVector.cpp */; };
0F242DA713F3B1E8007ADD4C /* WeakReferenceHarvester.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F242DA513F3B1BB007ADD4C /* WeakReferenceHarvester.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F2C556F14738F3100121E4F /* DFGCodeBlocks.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2C556E14738F2E00121E4F /* DFGCodeBlocks.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -58,6 +68,8 @@
0F426A491460CBB700131F8F /* VirtualRegister.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F426A461460CBAB00131F8F /* VirtualRegister.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F426A4B1460CD6E00131F8F /* DataFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F426A4A1460CD6B00131F8F /* DataFormat.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F431738146BAC69007E3890 /* ListableHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F431736146BAC65007E3890 /* ListableHandler.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F46808214BA572D00BFE272 /* JITExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F46808014BA572700BFE272 /* JITExceptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F46808314BA573100BFE272 /* JITExceptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F46807F14BA572700BFE272 /* JITExceptions.cpp */; };
0F5F08CF146C7633000472A9 /* UnconditionalFinalizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F620174143FCD330068B77C /* DFGVariableAccessData.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F620172143FCD2F0068B77C /* DFGVariableAccessData.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F620175143FCD370068B77C /* DFGOperands.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F620171143FCD2F0068B77C /* DFGOperands.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -289,7 +301,7 @@
651122FE14046A4C002B101D /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */; };
6511230714046B0A002B101D /* testRegExp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 651122E5140469BA002B101D /* testRegExp.cpp */; };
651DCA04136A6FEF00F74194 /* PassTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = 651DCA02136A6FAB00F74194 /* PassTraits.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 65303D641447B9E100D3F904 /* ParserTokens.h in Headers */ = {isa = PBXBuildFile; fileRef = 65303D631447B9E100D3F904 /* ParserTokens.h */; };
+ 65303D641447B9E100D3F904 /* ParserTokens.h in Headers */ = {isa = PBXBuildFile; fileRef = 65303D631447B9E100D3F904 /* ParserTokens.h */; settings = {ATTRIBUTES = (Private, ); }; };
655EB29B10CE2581001A990E /* NodesCodegen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 655EB29A10CE2581001A990E /* NodesCodegen.cpp */; };
65DFC93308EA173A00F7300B /* HashTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65DFC92D08EA173A00F7300B /* HashTable.cpp */; };
65E1A3DF122B894500B26097 /* NonCopyingSort.h in Headers */ = {isa = PBXBuildFile; fileRef = 65E1A2F4122B880D00B26097 /* NonCopyingSort.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -710,7 +722,7 @@
E48E0F2D0F82151700A8CA37 /* FastAllocBase.h in Headers */ = {isa = PBXBuildFile; fileRef = E48E0F2C0F82151700A8CA37 /* FastAllocBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
E49DC16B12EF293E00184A1F /* SourceProviderCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E49DC15512EF277200184A1F /* SourceProviderCache.cpp */; };
E49DC16C12EF294E00184A1F /* SourceProviderCache.h in Headers */ = {isa = PBXBuildFile; fileRef = E49DC15112EF272200184A1F /* SourceProviderCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
- E49DC16D12EF295300184A1F /* SourceProviderCacheItem.h in Headers */ = {isa = PBXBuildFile; fileRef = E49DC14912EF261A00184A1F /* SourceProviderCacheItem.h */; };
+ E49DC16D12EF295300184A1F /* SourceProviderCacheItem.h in Headers */ = {isa = PBXBuildFile; fileRef = E49DC14912EF261A00184A1F /* SourceProviderCacheItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
E4D8CEFB12FC439600BC9F5A /* BloomFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E4D8CE9B12FC42E100BC9F5A /* BloomFilter.h */; settings = {ATTRIBUTES = (Private, ); }; };
F3BD31ED126735770065467F /* TextPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = F3BD31D0126730180065467F /* TextPosition.h */; settings = {ATTRIBUTES = (Private, ); }; };
FDA15C1E12B0305C003A583A /* Complex.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15C1612B03028003A583A /* Complex.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -718,13 +730,6 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
- 141211350A48796100480255 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 932F5B3E0822A1C700736975;
- remoteInfo = JavaScriptCore;
- };
141214BE0A49190E00480255 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
@@ -732,20 +737,6 @@
remoteGlobalIDString = 1412111F0A48793C00480255;
remoteInfo = minidom;
};
- 14270B070A451DA10080EEEA /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 932F5B3E0822A1C700736975;
- remoteInfo = JavaScriptCore;
- };
- 14270B0B0A451DA40080EEEA /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 932F5B3E0822A1C700736975;
- remoteInfo = JavaScriptCore;
- };
14BD59C60A3E8FA400BAF59C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
@@ -753,13 +744,6 @@
remoteGlobalIDString = 14BD59BE0A3E8F9000BAF59C;
remoteInfo = testapi;
};
- 651122F914046A4C002B101D /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 932F5B3E0822A1C700736975;
- remoteInfo = JavaScriptCore;
- };
651123081404768B002B101D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
@@ -830,8 +814,18 @@
0B4D7E620F319AC800AD7E58 /* TypeTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeTraits.h; sourceTree = "<group>"; };
0BAC949E1338728400CF135B /* ThreadRestrictionVerifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadRestrictionVerifier.h; sourceTree = "<group>"; };
0BCD83541485841200EA2003 /* TemporaryChange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TemporaryChange.h; sourceTree = "<group>"; };
- 0BDFFAD10FC616EC00D69EF4 /* OwnFastMallocPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OwnFastMallocPtr.h; sourceTree = "<group>"; };
0BF28A2811A33DC300638F84 /* SizeLimits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SizeLimits.cpp; sourceTree = "<group>"; };
+ 0F0B83A514BCF50400885B4F /* CodeType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeType.h; sourceTree = "<group>"; };
+ 0F0B83A814BCF55E00885B4F /* HandlerInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HandlerInfo.h; sourceTree = "<group>"; };
+ 0F0B83AA14BCF5B900885B4F /* ExpressionRangeInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExpressionRangeInfo.h; sourceTree = "<group>"; };
+ 0F0B83AC14BCF60200885B4F /* LineInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineInfo.h; sourceTree = "<group>"; };
+ 0F0B83AE14BCF71400885B4F /* CallLinkInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallLinkInfo.cpp; sourceTree = "<group>"; };
+ 0F0B83AF14BCF71400885B4F /* CallLinkInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallLinkInfo.h; sourceTree = "<group>"; };
+ 0F0B83B214BCF85E00885B4F /* MethodCallLinkInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MethodCallLinkInfo.cpp; sourceTree = "<group>"; };
+ 0F0B83B314BCF85E00885B4F /* MethodCallLinkInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MethodCallLinkInfo.h; sourceTree = "<group>"; };
+ 0F0B83B614BCF8DF00885B4F /* GlobalResolveInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalResolveInfo.h; sourceTree = "<group>"; };
+ 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallReturnOffsetToBytecodeOffset.h; sourceTree = "<group>"; };
+ 0F15F15D14B7A73A005DE37D /* CommonSlowPaths.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonSlowPaths.h; sourceTree = "<group>"; };
0F16D724142C39A200CF784A /* BitVector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BitVector.cpp; sourceTree = "<group>"; };
0F242DA513F3B1BB007ADD4C /* WeakReferenceHarvester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakReferenceHarvester.h; sourceTree = "<group>"; };
0F2C556D14738F2E00121E4F /* DFGCodeBlocks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DFGCodeBlocks.cpp; sourceTree = "<group>"; };
@@ -841,6 +835,8 @@
0F426A461460CBAB00131F8F /* VirtualRegister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VirtualRegister.h; sourceTree = "<group>"; };
0F426A4A1460CD6B00131F8F /* DataFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataFormat.h; sourceTree = "<group>"; };
0F431736146BAC65007E3890 /* ListableHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListableHandler.h; sourceTree = "<group>"; };
+ 0F46807F14BA572700BFE272 /* JITExceptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITExceptions.cpp; sourceTree = "<group>"; };
+ 0F46808014BA572700BFE272 /* JITExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITExceptions.h; sourceTree = "<group>"; };
0F5F08CC146BE602000472A9 /* DFGByteCodeCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGByteCodeCache.h; path = dfg/DFGByteCodeCache.h; sourceTree = "<group>"; };
0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnconditionalFinalizer.h; sourceTree = "<group>"; };
0F62016D143FCD2F0068B77C /* DFGAbstractState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGAbstractState.cpp; path = dfg/DFGAbstractState.cpp; sourceTree = "<group>"; };
@@ -1574,9 +1570,9 @@
buildActionMask = 2147483647;
files = (
932F5BD30822A1C700736975 /* CoreFoundation.framework in Frameworks */,
+ A731B25A130093880040A7FA /* Foundation.framework in Frameworks */,
932F5BD70822A1C700736975 /* libicucore.dylib in Frameworks */,
932F5BD60822A1C700736975 /* libobjc.dylib in Frameworks */,
- A731B25A130093880040A7FA /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1698,6 +1694,8 @@
1429D92C0ED22D7000B89619 /* jit */ = {
isa = PBXGroup;
children = (
+ 0F46807F14BA572700BFE272 /* JITExceptions.cpp */,
+ 0F46808014BA572700BFE272 /* JITExceptions.h */,
0FD82E37141AB14200179C94 /* CompactJITCodeMap.h */,
A7B48DB60EE74CFC00DCBDB6 /* ExecutableAllocator.cpp */,
A7B48DB50EE74CFC00DCBDB6 /* ExecutableAllocator.h */,
@@ -1717,11 +1715,11 @@
960626950FB8EC02009798AB /* JITStubCall.h */,
14A23D6C0F4E19CE0023CDAD /* JITStubs.cpp */,
14A6581A0F4E36F4000150FD /* JITStubs.h */,
+ A76F54A213B28AAB00EF2BCE /* JITWriteBarrier.h */,
A76C51741182748D00715B05 /* JSInterfaceJIT.h */,
A7386551118697B400540279 /* SpecializedThunkJIT.h */,
A7386552118697B400540279 /* ThunkGenerators.cpp */,
A7386553118697B400540279 /* ThunkGenerators.h */,
- A76F54A213B28AAB00EF2BCE /* JITWriteBarrier.h */,
);
path = jit;
sourceTree = "<group>";
@@ -1729,15 +1727,13 @@
142E312A134FF0A600AFADB5 /* heap */ = {
isa = PBXGroup;
children = (
- 0F2C556D14738F2E00121E4F /* DFGCodeBlocks.cpp */,
- 0F2C556E14738F2E00121E4F /* DFGCodeBlocks.h */,
- 0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */,
- 0F431736146BAC65007E3890 /* ListableHandler.h */,
A70456AE1427FB030037DA68 /* AllocationSpace.cpp */,
A70456AF1427FB150037DA68 /* AllocationSpace.h */,
A7521E121429169A003C8D0C /* CardSet.h */,
146B14DB12EB5B12001BEC1B /* ConservativeRoots.cpp */,
149DAAF212EB559D0083B12B /* ConservativeRoots.h */,
+ 0F2C556D14738F2E00121E4F /* DFGCodeBlocks.cpp */,
+ 0F2C556E14738F2E00121E4F /* DFGCodeBlocks.h */,
142E312B134FF0A600AFADB5 /* Handle.h */,
142E312C134FF0A600AFADB5 /* HandleHeap.cpp */,
142E312D134FF0A600AFADB5 /* HandleHeap.h */,
@@ -1747,6 +1743,7 @@
14BA7A9513AADFF8005B7C2C /* Heap.cpp */,
14BA7A9613AADFF8005B7C2C /* Heap.h */,
14F97446138C853E00DA1C67 /* HeapRootVisitor.h */,
+ 0F431736146BAC65007E3890 /* ListableHandler.h */,
142E3130134FF0A600AFADB5 /* Local.h */,
142E3131134FF0A600AFADB5 /* LocalScope.h */,
14B7233F12D7D0DA003BD5ED /* MachineStackMarker.cpp */,
@@ -1754,20 +1751,21 @@
142D6F0613539A2800B02E86 /* MarkedBlock.cpp */,
142D6F0713539A2800B02E86 /* MarkedBlock.h */,
141448CA13A176EC00F5BA1A /* MarkedBlockSet.h */,
- 142D6F0E13539A4100B02E86 /* MarkStack.cpp */,
- 142D6F0F13539A4100B02E86 /* MarkStack.h */,
14D2F3D8139F4BE200491031 /* MarkedSpace.cpp */,
14D2F3D9139F4BE200491031 /* MarkedSpace.h */,
+ 142D6F0E13539A4100B02E86 /* MarkStack.cpp */,
+ 142D6F0F13539A4100B02E86 /* MarkStack.h */,
14BA78F013AAB88F005B7C2C /* SlotVisitor.h */,
142E3132134FF0A600AFADB5 /* Strong.h */,
+ 145722851437E140005FDE26 /* StrongInlines.h */,
141448CC13A1783700F5BA1A /* TinyBloomFilter.h */,
+ 0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */,
0FC815121405118600CFA603 /* VTableSpectrum.cpp */,
0FC815141405118D00CFA603 /* VTableSpectrum.h */,
142E3133134FF0A600AFADB5 /* Weak.h */,
0F242DA513F3B1BB007ADD4C /* WeakReferenceHarvester.h */,
0FC8150814043BCA00CFA603 /* WriteBarrierSupport.cpp */,
0FC8150914043BD200CFA603 /* WriteBarrierSupport.h */,
- 145722851437E140005FDE26 /* StrongInlines.h */,
);
path = heap;
sourceTree = "<group>";
@@ -1775,11 +1773,11 @@
1432EBD70A34CAD400717B9F /* API */ = {
isa = PBXGroup;
children = (
- 1C9051430BA9E8A70081E9D0 /* JavaScriptCore.xcconfig */,
1482B78A0A4305AB00517CFC /* APICast.h */,
865F408710E7D56300947361 /* APIShims.h */,
1CAA8B4A0D32C39A0041BCFF /* JavaScript.h */,
1CAA8B4B0D32C39A0041BCFF /* JavaScriptCore.h */,
+ 1C9051430BA9E8A70081E9D0 /* JavaScriptCore.xcconfig */,
BC0894D50FAFBA2D00001865 /* JSAPIValueWrapper.cpp */,
BC0894D60FAFBA2D00001865 /* JSAPIValueWrapper.h */,
1421359A0A677F4F00A8195E /* JSBase.cpp */,
@@ -1993,7 +1991,6 @@
97941A3F130299DB004A3447 /* OSRandomSource.cpp */,
97941A40130299DB004A3447 /* OSRandomSource.h */,
9303F5A409911A5800AD71B8 /* OwnArrayPtr.h */,
- 0BDFFAD10FC616EC00D69EF4 /* OwnFastMallocPtr.h */,
9303F567099118FA00AD71B8 /* OwnPtr.h */,
440B7AED0FAF7FCB0073323E /* OwnPtrCommon.h */,
0F636D9F142D27D200B2E66A /* PackedIntVector.h */,
@@ -2091,7 +2088,6 @@
7E39D8370EC3A388003AF11A /* parser */ = {
isa = PBXGroup;
children = (
- 65303D631447B9E100D3F904 /* ParserTokens.h */,
A7A7EE7411B98B8D0065A14F /* ASTBuilder.h */,
93F1981A08245AAE001E9ABC /* Keywords.table */,
F692A8650255597D01FF60F7 /* Lexer.cpp */,
@@ -2104,12 +2100,13 @@
93F0B3AA09BB4DC00068FCE3 /* Parser.h */,
93052C320FB792190048FDC3 /* ParserArena.cpp */,
93052C330FB792190048FDC3 /* ParserArena.h */,
+ 65303D631447B9E100D3F904 /* ParserTokens.h */,
869EBCB60E8C6D4A008722CC /* ResultType.h */,
65E866EE0DD59AFA00A2B2A1 /* SourceCode.h */,
+ 65E866ED0DD59AFA00A2B2A1 /* SourceProvider.h */,
E49DC15512EF277200184A1F /* SourceProviderCache.cpp */,
E49DC15112EF272200184A1F /* SourceProviderCache.h */,
E49DC14912EF261A00184A1F /* SourceProviderCacheItem.h */,
- 65E866ED0DD59AFA00A2B2A1 /* SourceProvider.h */,
A7A7EE7711B98B8D0065A14F /* SyntaxChecker.h */,
);
path = parser;
@@ -2118,8 +2115,7 @@
7EF6E0BB0EB7A1EC0079AFAF /* runtime */ = {
isa = PBXGroup;
children = (
- 0F7700911402FF280078EB39 /* SamplingCounter.cpp */,
- 0F77008E1402FDD60078EB39 /* SamplingCounter.h */,
+ 0F15F15D14B7A73A005DE37D /* CommonSlowPaths.h */,
BCF605110E203EF800B9A64D /* ArgList.cpp */,
BCF605120E203EF800B9A64D /* ArgList.h */,
BC257DE50E1F51C50016B6C9 /* Arguments.cpp */,
@@ -2203,8 +2199,8 @@
A8E894330CD0603F00367179 /* JSGlobalObject.h */,
BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */,
BC756FC70E2031B200DE7D12 /* JSGlobalObjectFunctions.h */,
- 8604F503143CE1C100B295F5 /* JSGlobalThis.h */,
BC3C4C9F1458F5450025FB62 /* JSGlobalThis.cpp */,
+ 8604F503143CE1C100B295F5 /* JSGlobalThis.h */,
65EA4C99092AF9E20093D800 /* JSLock.cpp */,
65EA4C9A092AF9E20093D800 /* JSLock.h */,
A72700780DAC605600E548D7 /* JSNotAnObject.cpp */,
@@ -2378,8 +2374,8 @@
0FC0977E1469EBC400CF2442 /* DFGCommon.h */,
0FC0979D146B271E00CF2442 /* DFGCorrectableJumpPoint.cpp */,
0FC0979A146A772000CF2442 /* DFGCorrectableJumpPoint.h */,
- 0FD3C82214115D0E00FD81CB /* DFGDriver.h */,
0FD3C82014115CF800FD81CB /* DFGDriver.cpp */,
+ 0FD3C82214115D0E00FD81CB /* DFGDriver.h */,
86AE6C4B136A11E400963012 /* DFGFPRInfo.h */,
86EC9DB61328DF82002B2AD7 /* DFGGenerationInfo.h */,
86AE6C4C136A11E400963012 /* DFGGPRInfo.h */,
@@ -2389,6 +2385,8 @@
86EC9DBC1328DF82002B2AD7 /* DFGJITCompiler.h */,
86ECA3E9132DEF1C002B2AD7 /* DFGNode.h */,
0F620171143FCD2F0068B77C /* DFGOperands.h */,
+ 86EC9DBF1328DF82002B2AD7 /* DFGOperations.cpp */,
+ 86EC9DC01328DF82002B2AD7 /* DFGOperations.h */,
0FD82E52141DAEDE00179C94 /* DFGOSREntry.cpp */,
0FD82E53141DAEDE00179C94 /* DFGOSREntry.h */,
0FC0978E146A6F6300CF2442 /* DFGOSRExit.cpp */,
@@ -2397,10 +2395,8 @@
0FC0976F14693AEF00CF2442 /* DFGOSRExitCompiler.h */,
0FC09775146943AD00CF2442 /* DFGOSRExitCompiler32_64.cpp */,
0FC0977014693AEF00CF2442 /* DFGOSRExitCompiler64.cpp */,
- 86EC9DBF1328DF82002B2AD7 /* DFGOperations.cpp */,
- 86EC9DC01328DF82002B2AD7 /* DFGOperations.h */,
- 0FD3C82414115D2200FD81CB /* DFGPropagator.h */,
0FD3C82314115D1A00FD81CB /* DFGPropagator.cpp */,
+ 0FD3C82414115D2200FD81CB /* DFGPropagator.h */,
86EC9DC11328DF82002B2AD7 /* DFGRegisterBank.h */,
86BB09BE138E381B0056702F /* DFGRepatch.cpp */,
86BB09BF138E381B0056702F /* DFGRepatch.h */,
@@ -2450,8 +2446,8 @@
860161DF0F3A83C100F84710 /* AbstractMacroAssembler.h */,
86D3B2BF10156BDE002865E7 /* ARMAssembler.cpp */,
86D3B2C010156BDE002865E7 /* ARMAssembler.h */,
- 86ADD1430FDDEA980006EEC2 /* ARMv7Assembler.h */,
A74DE1CB120B86D600D40D5B /* ARMv7Assembler.cpp */,
+ 86ADD1430FDDEA980006EEC2 /* ARMv7Assembler.h */,
9688CB130ED12B4E001D649F /* AssemblerBuffer.h */,
86D3B2C110156BDE002865E7 /* AssemblerBufferWithConstantPool.h */,
86E116B00FE75AC800B512BC /* CodeLocation.h */,
@@ -2478,29 +2474,39 @@
969A078F0ED1D3AE00F1F681 /* bytecode */ = {
isa = PBXGroup;
children = (
- 0FBC0AE41496C7C100D4FBDD /* DFGExitProfile.cpp */,
- 0FBC0AE51496C7C100D4FBDD /* DFGExitProfile.h */,
- 0F426A4A1460CD6B00131F8F /* DataFormat.h */,
- 0F426A451460CBAB00131F8F /* ValueRecovery.h */,
- 0F426A461460CBAB00131F8F /* VirtualRegister.h */,
- 0FBD7E671447998F00481315 /* CodeOrigin.h */,
- 0FD82E8E14207A5100179C94 /* ValueProfile.cpp */,
- 0FD82E84141F3FDA00179C94 /* PredictedType.cpp */,
- 0FD82E4F141DAEA100179C94 /* PredictedType.h */,
- 0FD82E50141DAEA100179C94 /* PredictionTracker.h */,
- 0F963B3613FC6FDE0002D9B2 /* ValueProfile.h */,
+ 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */,
+ 0F0B83B614BCF8DF00885B4F /* GlobalResolveInfo.h */,
+ 0F0B83B214BCF85E00885B4F /* MethodCallLinkInfo.cpp */,
+ 0F0B83B314BCF85E00885B4F /* MethodCallLinkInfo.h */,
+ 0F0B83AE14BCF71400885B4F /* CallLinkInfo.cpp */,
+ 0F0B83AF14BCF71400885B4F /* CallLinkInfo.h */,
+ 0F0B83AC14BCF60200885B4F /* LineInfo.h */,
+ 0F0B83AA14BCF5B900885B4F /* ExpressionRangeInfo.h */,
+ 0F0B83A814BCF55E00885B4F /* HandlerInfo.h */,
+ 0F0B83A514BCF50400885B4F /* CodeType.h */,
969A07900ED1D3AE00F1F681 /* CodeBlock.cpp */,
969A07910ED1D3AE00F1F681 /* CodeBlock.h */,
+ 0FBD7E671447998F00481315 /* CodeOrigin.h */,
+ 0F426A4A1460CD6B00131F8F /* DataFormat.h */,
+ 0FBC0AE41496C7C100D4FBDD /* DFGExitProfile.cpp */,
+ 0FBC0AE51496C7C100D4FBDD /* DFGExitProfile.h */,
969A07920ED1D3AE00F1F681 /* EvalCodeCache.h */,
969A07930ED1D3AE00F1F681 /* Instruction.h */,
BCFD8C900EEB2EE700283848 /* JumpTable.cpp */,
BCFD8C910EEB2EE700283848 /* JumpTable.h */,
969A07940ED1D3AE00F1F681 /* Opcode.cpp */,
969A07950ED1D3AE00F1F681 /* Opcode.h */,
+ 0FD82E84141F3FDA00179C94 /* PredictedType.cpp */,
+ 0FD82E4F141DAEA100179C94 /* PredictedType.h */,
+ 0FD82E50141DAEA100179C94 /* PredictionTracker.h */,
1429D8830ED21C3D00B89619 /* SamplingTool.cpp */,
1429D8840ED21C3D00B89619 /* SamplingTool.h */,
BCCF0D0B0EF0B8A500413C8F /* StructureStubInfo.cpp */,
BCCF0D070EF0AAB900413C8F /* StructureStubInfo.h */,
+ 0FD82E8E14207A5100179C94 /* ValueProfile.cpp */,
+ 0F963B3613FC6FDE0002D9B2 /* ValueProfile.h */,
+ 0F426A451460CBAB00131F8F /* ValueRecovery.h */,
+ 0F426A461460CBAB00131F8F /* VirtualRegister.h */,
);
path = bytecode;
sourceTree = "<group>";
@@ -2508,13 +2514,18 @@
C22C524813FAF6EF00B7DC0D /* dtoa */ = {
isa = PBXGroup;
children = (
+ C22C529613FAF6EF00B7DC0D /* COPYING */,
+ C22C52A013FAF6EF00B7DC0D /* LICENSE */,
+ C22C52A113FAF6EF00B7DC0D /* Makefile */,
+ C22C52A213FAF6EF00B7DC0D /* README */,
+ C22C52A313FAF6EF00B7DC0D /* SConscript */,
+ C22C52A413FAF6EF00B7DC0D /* SConstruct */,
C22C529013FAF6EF00B7DC0D /* bignum-dtoa.cc */,
C22C529113FAF6EF00B7DC0D /* bignum-dtoa.h */,
C22C529213FAF6EF00B7DC0D /* bignum.cc */,
C22C529313FAF6EF00B7DC0D /* bignum.h */,
C22C529413FAF6EF00B7DC0D /* cached-powers.cc */,
C22C529513FAF6EF00B7DC0D /* cached-powers.h */,
- C22C529613FAF6EF00B7DC0D /* COPYING */,
C22C529713FAF6EF00B7DC0D /* diy-fp.cc */,
C22C529813FAF6EF00B7DC0D /* diy-fp.h */,
C22C529913FAF6EF00B7DC0D /* double-conversion.cc */,
@@ -2524,11 +2535,6 @@
C22C529D13FAF6EF00B7DC0D /* fast-dtoa.h */,
C22C529E13FAF6EF00B7DC0D /* fixed-dtoa.cc */,
C22C529F13FAF6EF00B7DC0D /* fixed-dtoa.h */,
- C22C52A013FAF6EF00B7DC0D /* LICENSE */,
- C22C52A113FAF6EF00B7DC0D /* Makefile */,
- C22C52A213FAF6EF00B7DC0D /* README */,
- C22C52A313FAF6EF00B7DC0D /* SConscript */,
- C22C52A413FAF6EF00B7DC0D /* SConstruct */,
C22C52B913FAF6EF00B7DC0D /* strtod.cc */,
C22C52BA13FAF6EF00B7DC0D /* strtod.h */,
C22C52BB13FAF6EF00B7DC0D /* utils.h */,
@@ -2578,9 +2584,9 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
- 0F242DA713F3B1E8007ADD4C /* WeakReferenceHarvester.h in Headers */,
- 434A8E7114956A50009126F7 /* ASCIIFastPath.h in Headers */,
860161E30F3A83C100F84710 /* AbstractMacroAssembler.h in Headers */,
+ A1D764521354448B00C5C7C0 /* Alignment.h in Headers */,
+ A70456B01427FB910037DA68 /* AllocationSpace.h in Headers */,
BC18C3E40E16F5CD00B34460 /* AlwaysInline.h in Headers */,
BC18C3E50E16F5CD00B34460 /* APICast.h in Headers */,
865F408810E7D56300947361 /* APIShims.h in Headers */,
@@ -2588,31 +2594,13 @@
BC257DE80E1F51C50016B6C9 /* Arguments.h in Headers */,
86D3B2C410156BDE002865E7 /* ARMAssembler.h in Headers */,
86ADD1450FDDEA980006EEC2 /* ARMv7Assembler.h in Headers */,
- 1429D8860ED21C3D00B89619 /* SamplingTool.h in Headers */,
- 969A072C0ED1CE6900F1F681 /* SegmentedVector.h in Headers */,
- 93052C350FB792190048FDC3 /* ParserArena.h in Headers */,
- BC18C43F0E16F5CD00B34460 /* Nodes.h in Headers */,
- 86CAFEE31035DDE60028A609 /* Executable.h in Headers */,
- 145722861437E140005FDE26 /* StrongInlines.h in Headers */,
- 0FD82F4B142806A100179C94 /* BitVector.h in Headers */,
- 0FD82E85141F3FE300179C94 /* BoundsCheckedPointer.h in Headers */,
- 0FD82E57141DAF1000179C94 /* DFGOSREntry.h in Headers */,
- 0FD82E55141DAEEE00179C94 /* PredictionTracker.h in Headers */,
- 0FD82E54141DAEEE00179C94 /* PredictedType.h in Headers */,
- 0FD82E39141AB14D00179C94 /* CompactJITCodeMap.h in Headers */,
+ A73BE169148420520091204B /* ArrayBuffer.h in Headers */,
+ A73BE16B148420520091204B /* ArrayBufferView.h in Headers */,
BC18C3E60E16F5CD00B34460 /* ArrayConstructor.h in Headers */,
- BC18C46E0E16F5CD00B34460 /* TCSpinLock.h in Headers */,
- 0F963B2F13FC66BB0002D9B2 /* MetaAllocatorHandle.h in Headers */,
- 0F963B2D13F854020002D9B2 /* MetaAllocator.h in Headers */,
- 0F963B2713F753BB0002D9B2 /* RedBlackTree.h in Headers */,
- 0FC815151405119B00CFA603 /* VTableSpectrum.h in Headers */,
- C22B31B9140577D700DB475A /* SamplingCounter.h in Headers */,
- 0FC8150A14043BF500CFA603 /* WriteBarrierSupport.h in Headers */,
- 0F963B3813FC6FE90002D9B2 /* ValueProfile.h in Headers */,
- C2EE59A013FC973F009CEAFE /* DecimalNumber.h in Headers */,
BC18C3E70E16F5CD00B34460 /* ArrayPrototype.h in Headers */,
BC18C5240E16FC8A00B34460 /* ArrayPrototype.lut.h in Headers */,
BC18C3E90E16F5CD00B34460 /* ASCIICType.h in Headers */,
+ 434A8E7114956A50009126F7 /* ASCIIFastPath.h in Headers */,
9688CB150ED12B4E001D649F /* AssemblerBuffer.h in Headers */,
86D3B2C510156BDE002865E7 /* AssemblerBufferWithConstantPool.h in Headers */,
BC18C3EA0E16F5CD00B34460 /* Assertions.h in Headers */,
@@ -2623,31 +2611,45 @@
868BFA0A117CEFD100B908B1 /* AtomicStringImpl.h in Headers */,
BC18C3EB0E16F5CD00B34460 /* AVLTree.h in Headers */,
147B83AC0E6DB8C9004775A4 /* BatchedTransitionOptimizer.h in Headers */,
+ 866739D213BFDE710023D87C /* BigInteger.h in Headers */,
+ C22C52F213FAF6EF00B7DC0D /* bignum-dtoa.h in Headers */,
+ C22C52F413FAF6EF00B7DC0D /* bignum.h in Headers */,
+ 1A08277A142168D70090CCAC /* BinarySemaphore.h in Headers */,
DD377CBC12072C18006A2517 /* Bitmap.h in Headers */,
+ 0FD82F4B142806A100179C94 /* BitVector.h in Headers */,
A7C40C0A130B057D00D002A1 /* BlockStack.h in Headers */,
E4D8CEFB12FC439600BC9F5A /* BloomFilter.h in Headers */,
BC18C3EC0E16F5CD00B34460 /* BooleanObject.h in Headers */,
+ 0FD82E85141F3FE300179C94 /* BoundsCheckedPointer.h in Headers */,
86676D5211FED9BC004B6863 /* BumpPointerAllocator.h in Headers */,
A7A1F7AD0F252B3C00E184E2 /* ByteArray.h in Headers */,
969A07230ED1CE3300F1F681 /* BytecodeGenerator.h in Headers */,
+ C22C52F613FAF6EF00B7DC0D /* cached-powers.h in Headers */,
869D04AF1193B54D00803475 /* CachedTranscendentalFunction.h in Headers */,
BC18C3ED0E16F5CD00B34460 /* CallData.h in Headers */,
1429D8DE0ED2205B00B89619 /* CallFrame.h in Headers */,
95E3BC050E1AE68200B2D1C1 /* CallIdentifier.h in Headers */,
+ A7521E131429169A003C8D0C /* CardSet.h in Headers */,
2CFC5D1E12F45B48004914E2 /* CharacterNames.h in Headers */,
+ A7BC0C82140608B000B1BB71 /* CheckedArithmetic.h in Headers */,
BC6AAAE50E1F426500AD87D8 /* ClassInfo.h in Headers */,
969A07970ED1D3AE00F1F681 /* CodeBlock.h in Headers */,
86E116B10FE75AC800B512BC /* CodeLocation.h in Headers */,
+ 0FBD7E691447999600481315 /* CodeOrigin.h in Headers */,
BC18C3F00E16F5CD00B34460 /* Collator.h in Headers */,
BC18C3F30E16F5CD00B34460 /* CommonIdentifiers.h in Headers */,
+ 0FD82E39141AB14D00179C94 /* CompactJITCodeMap.h in Headers */,
+ BC66BAE413F492CC00C23FAE /* Compiler.h in Headers */,
BC18C3F40E16F5CD00B34460 /* Completion.h in Headers */,
FDA15C1E12B0305C003A583A /* Complex.h in Headers */,
BC18C3F50E16F5CD00B34460 /* config.h in Headers */,
144836E7132DA7BE005BE785 /* ConservativeRoots.h in Headers */,
BC18C3F60E16F5CD00B34460 /* ConstructData.h in Headers */,
+ 5DE6E5B30E1728EC00180407 /* create_hash_table in Headers */,
97941A7F1302A098004A3447 /* CryptographicallyRandomNumber.h in Headers */,
86565743115BE3DA00291F40 /* CString.h in Headers */,
180B9B080F16D94F009BDBC5 /* CurrentTime.h in Headers */,
+ 0F426A4B1460CD6E00131F8F /* DataFormat.h in Headers */,
BCD2034A0E17135E002C7E82 /* DateConstructor.h in Headers */,
41359CF30FDD89AD00206180 /* DateConversion.h in Headers */,
BC1166020E1997B4008066DD /* DateInstance.h in Headers */,
@@ -2658,20 +2660,41 @@
BC18C3FA0E16F5CD00B34460 /* Debugger.h in Headers */,
BC3135640F302FA3003DFD3A /* DebuggerActivation.h in Headers */,
BC18C3FB0E16F5CD00B34460 /* DebuggerCallFrame.h in Headers */,
+ C2EE59A013FC973F009CEAFE /* DecimalNumber.h in Headers */,
5135FAF212D26ACE003C083B /* Decoder.h in Headers */,
BC18C3FC0E16F5CD00B34460 /* Deque.h in Headers */,
+ 0F620178143FCD440068B77C /* DFGAbstractState.h in Headers */,
+ 0F620177143FCD3F0068B77C /* DFGAbstractValue.h in Headers */,
+ 0FC0976D1468AB4E00CF2442 /* DFGAssemblyHelpers.h in Headers */,
+ 0F620176143FCD3B0068B77C /* DFGBasicBlock.h in Headers */,
86EC9DC51328DF82002B2AD7 /* DFGByteCodeParser.h in Headers */,
+ 0F2C556F14738F3100121E4F /* DFGCodeBlocks.h in Headers */,
+ 0FC0979C146A772500CF2442 /* DFGCorrectableJumpPoint.h in Headers */,
+ 0FD3C82814115D4F00FD81CB /* DFGDriver.h in Headers */,
+ 0FBC0AE81496C7C700D4FBDD /* DFGExitProfile.h in Headers */,
+ 86AE6C4D136A11E400963012 /* DFGFPRInfo.h in Headers */,
86EC9DC61328DF82002B2AD7 /* DFGGenerationInfo.h in Headers */,
+ 86AE6C4E136A11E400963012 /* DFGGPRInfo.h in Headers */,
86EC9DC81328DF82002B2AD7 /* DFGGraph.h in Headers */,
86EC9DCC1328DF82002B2AD7 /* DFGJITCompiler.h in Headers */,
86ECA3EA132DEF1C002B2AD7 /* DFGNode.h in Headers */,
- 142E3136134FF0A600AFADB5 /* HandleHeap.h in Headers */,
- 142E3138134FF0A600AFADB5 /* HandleStack.h in Headers */,
+ 0F620175143FCD370068B77C /* DFGOperands.h in Headers */,
86EC9DD01328DF82002B2AD7 /* DFGOperations.h in Headers */,
+ 0FD82E57141DAF1000179C94 /* DFGOSREntry.h in Headers */,
+ 0FC0976A1468A6F700CF2442 /* DFGOSRExit.h in Headers */,
+ 0FC0977114693AF500CF2442 /* DFGOSRExitCompiler.h in Headers */,
+ 0FD3C82714115D4F00FD81CB /* DFGPropagator.h in Headers */,
86EC9DD11328DF82002B2AD7 /* DFGRegisterBank.h in Headers */,
+ 86BB09C1138E381B0056702F /* DFGRepatch.h in Headers */,
86ECA3FA132DF25A002B2AD7 /* DFGScoreBoard.h in Headers */,
86EC9DD31328DF82002B2AD7 /* DFGSpeculativeJIT.h in Headers */,
+ 0FFF4BB4143955E900655BC0 /* DFGStructureSet.h in Headers */,
+ 0FC097A2146B28CC00CF2442 /* DFGThunks.h in Headers */,
+ 0F620174143FCD330068B77C /* DFGVariableAccessData.h in Headers */,
BC18C3FD0E16F5CD00B34460 /* DisallowCType.h in Headers */,
+ C22C52F813FAF6EF00B7DC0D /* diy-fp.h in Headers */,
+ C22C52FA13FAF6EF00B7DC0D /* double-conversion.h in Headers */,
+ C22C52FB13FAF6EF00B7DC0D /* double.h in Headers */,
14456A321314657800212CA3 /* DoublyLinkedList.h in Headers */,
BC18C3FE0E16F5CD00B34460 /* dtoa.h in Headers */,
D7A46A4F1338FFEA00ED695C /* DynamicAnnotations.h in Headers */,
@@ -2682,17 +2705,25 @@
BC02E90F0E1839DB000F9297 /* ErrorPrototype.h in Headers */,
969A07980ED1D3AE00F1F681 /* EvalCodeCache.h in Headers */,
BC18C4000E16F5CD00B34460 /* ExceptionHelpers.h in Headers */,
+ 86CAFEE31035DDE60028A609 /* Executable.h in Headers */,
A766B44F0EE8DCD1009518CA /* ExecutableAllocator.h in Headers */,
A7FEE67614837B32005DC1A6 /* ExportMacros.h in Headers */,
+ C22C52FD13FAF6EF00B7DC0D /* fast-dtoa.h in Headers */,
E48E0F2D0F82151700A8CA37 /* FastAllocBase.h in Headers */,
BC18C4020E16F5CD00B34460 /* FastMalloc.h in Headers */,
+ C22C52FF13FAF6EF00B7DC0D /* fixed-dtoa.h in Headers */,
A7F19ECE11DD490900931E70 /* FixedArray.h in Headers */,
+ A73BE16D148420520091204B /* Float32Array.h in Headers */,
+ A73BE16F148420520091204B /* Float64Array.h in Headers */,
BC18C4030E16F5CD00B34460 /* Forward.h in Headers */,
+ 1AA9E5511498093500001A8A /* Functional.h in Headers */,
BC18C4040E16F5CD00B34460 /* FunctionConstructor.h in Headers */,
BC18C4050E16F5CD00B34460 /* FunctionPrototype.h in Headers */,
DDF7ABD411F60ED200108E36 /* GCActivityCallback.h in Headers */,
BC18C4060E16F5CD00B34460 /* GetPtr.h in Headers */,
142E3134134FF0A600AFADB5 /* Handle.h in Headers */,
+ 142E3136134FF0A600AFADB5 /* HandleHeap.h in Headers */,
+ 142E3138134FF0A600AFADB5 /* HandleStack.h in Headers */,
1478297B1379E8A800A7C2A3 /* HandleTypes.h in Headers */,
BC18C4080E16F5CD00B34460 /* HashCountedSet.h in Headers */,
BC18C4090E16F5CD00B34460 /* HashFunctions.h in Headers */,
@@ -2701,12 +2732,19 @@
BC18C40C0E16F5CD00B34460 /* HashSet.h in Headers */,
BC18C40D0E16F5CD00B34460 /* HashTable.h in Headers */,
BC18C40E0E16F5CD00B34460 /* HashTraits.h in Headers */,
+ 14BA7A9813AADFF8005B7C2C /* Heap.h in Headers */,
+ 14F97447138C853E00DA1C67 /* HeapRootVisitor.h in Headers */,
7186A6EC13100BA5004479E1 /* HexNumber.h in Headers */,
BC18C40F0E16F5CD00B34460 /* Identifier.h in Headers */,
BC18C4100E16F5CD00B34460 /* InitializeThreading.h in Headers */,
969A07990ED1D3AE00F1F681 /* Instruction.h in Headers */,
+ A73BE173148420520091204B /* Int16Array.h in Headers */,
+ A73BE175148420520091204B /* Int32Array.h in Headers */,
+ A73BE171148420520091204B /* Int8Array.h in Headers */,
+ A73BE180148420A80091204B /* IntegralTypedArrayBase.h in Headers */,
BC11667B0E199C05008066DD /* InternalFunction.h in Headers */,
1429D77C0ED20D7300B89619 /* Interpreter.h in Headers */,
+ 860BD801148EA6F200112B2F /* Intrinsic.h in Headers */,
BC18C4130E16F5CD00B34460 /* JavaScript.h in Headers */,
BC18C4140E16F5CD00B34460 /* JavaScriptCore.h in Headers */,
BC18C4150E16F5CD00B34460 /* JavaScriptCorePrefix.h in Headers */,
@@ -2715,11 +2753,13 @@
86CC85A10EE79A4700288682 /* JITInlineMethods.h in Headers */,
960626960FB8EC02009798AB /* JITStubCall.h in Headers */,
14C5242B0F5355E900BA3D04 /* JITStubs.h in Headers */,
+ A76F54A313B28AAB00EF2BCE /* JITWriteBarrier.h in Headers */,
BC18C4160E16F5CD00B34460 /* JSActivation.h in Headers */,
840480131021A1D9008E7F01 /* JSAPIValueWrapper.h in Headers */,
BC18C4170E16F5CD00B34460 /* JSArray.h in Headers */,
BC18C4180E16F5CD00B34460 /* JSBase.h in Headers */,
140D17D70E8AD4A9000CD17D /* JSBasePrivate.h in Headers */,
+ 86FA9E92142BBB2E001773B7 /* JSBoundFunction.h in Headers */,
A791EF280F11E07900AE1F68 /* JSByteArray.h in Headers */,
BC18C4190E16F5CD00B34460 /* JSCallbackConstructor.h in Headers */,
BC18C41A0E16F5CD00B34460 /* JSCallbackFunction.h in Headers */,
@@ -2729,11 +2769,13 @@
BC18C41D0E16F5CD00B34460 /* JSClassRef.h in Headers */,
BC18C41E0E16F5CD00B34460 /* JSContextRef.h in Headers */,
148CD1D8108CF902008163C6 /* JSContextRefPrivate.h in Headers */,
+ 978801411471AD920041B016 /* JSDateMath.h in Headers */,
A7B4ACAF1484C9CE00B38A36 /* JSExportMacros.h in Headers */,
BC18C41F0E16F5CD00B34460 /* JSFunction.h in Headers */,
BC18C4200E16F5CD00B34460 /* JSGlobalData.h in Headers */,
BC18C4210E16F5CD00B34460 /* JSGlobalObject.h in Headers */,
BC756FC90E2031B200DE7D12 /* JSGlobalObjectFunctions.h in Headers */,
+ 8604F505143CE1C200B295F5 /* JSGlobalThis.h in Headers */,
A76C51761182748D00715B05 /* JSInterfaceJIT.h in Headers */,
BC18C4230E16F5CD00B34460 /* JSLock.h in Headers */,
BC18C4240E16F5CD00B34460 /* JSObject.h in Headers */,
@@ -2750,17 +2792,20 @@
BC18C42A0E16F5CD00B34460 /* JSType.h in Headers */,
6507D29E0E871E5E00D7D896 /* JSTypeInfo.h in Headers */,
BC18C42B0E16F5CD00B34460 /* JSValue.h in Headers */,
+ 865A30F1135007E100CDB49E /* JSValueInlineMethods.h in Headers */,
BC18C42C0E16F5CD00B34460 /* JSValueRef.h in Headers */,
BC18C42D0E16F5CD00B34460 /* JSVariableObject.h in Headers */,
A7482E93116A7CAD003B0712 /* JSWeakObjectMapRefInternal.h in Headers */,
A7482B9311671147003B0712 /* JSWeakObjectMapRefPrivate.h in Headers */,
BC18C42E0E16F5CD00B34460 /* JSWrapperObject.h in Headers */,
BCFD8C930EEB2EE700283848 /* JumpTable.h in Headers */,
+ A72FFD64139985A800E5365A /* KeywordLookup.h in Headers */,
969A072A0ED1CE6900F1F681 /* Label.h in Headers */,
960097A60EBABB58007A7297 /* LabelScope.h in Headers */,
BC18C4310E16F5CD00B34460 /* Lexer.h in Headers */,
BC18C52E0E16FCE100B34460 /* Lexer.lut.h in Headers */,
86D3B3C310159D7F002865E7 /* LinkBuffer.h in Headers */,
+ 0F431738146BAC69007E3890 /* ListableHandler.h in Headers */,
BC18C4340E16F5CD00B34460 /* ListHashSet.h in Headers */,
BC18C4350E16F5CD00B34460 /* ListRefPtr.h in Headers */,
A7E2EA6B0FB460CF00601F06 /* LiteralParser.h in Headers */,
@@ -2774,21 +2819,29 @@
86ADD1460FDDEA980006EEC2 /* MacroAssemblerARMv7.h in Headers */,
863B23E00FC6118900703AA4 /* MacroAssemblerCodeRef.h in Headers */,
86C568E111A213EE0007F7F0 /* MacroAssemblerMIPS.h in Headers */,
+ 86AE64A9135E5E1C00963012 /* MacroAssemblerSH4.h in Headers */,
860161E40F3A83C100F84710 /* MacroAssemblerX86.h in Headers */,
860161E50F3A83C100F84710 /* MacroAssemblerX86_64.h in Headers */,
860161E60F3A83C100F84710 /* MacroAssemblerX86Common.h in Headers */,
BC18C4390E16F5CD00B34460 /* MainThread.h in Headers */,
BC18C43A0E16F5CD00B34460 /* MallocZoneSupport.h in Headers */,
+ 142D6F0913539A2800B02E86 /* MarkedBlock.h in Headers */,
+ 141448CB13A176EC00F5BA1A /* MarkedBlockSet.h in Headers */,
+ 14D2F3DB139F4BE200491031 /* MarkedSpace.h in Headers */,
+ 142D6F1213539A4100B02E86 /* MarkStack.h in Headers */,
BC18C43B0E16F5CD00B34460 /* MathExtras.h in Headers */,
BC18C43C0E16F5CD00B34460 /* MathObject.h in Headers */,
BC18C52A0E16FCC200B34460 /* MathObject.lut.h in Headers */,
511FC4CB117EE2A800425272 /* MD5.h in Headers */,
90213E3E123A40C200D422F3 /* MemoryStatistics.h in Headers */,
BC18C43E0E16F5CD00B34460 /* MessageQueue.h in Headers */,
+ 0F963B2D13F854020002D9B2 /* MetaAllocator.h in Headers */,
+ 0F963B2F13FC66BB0002D9B2 /* MetaAllocatorHandle.h in Headers */,
86C568E211A213EE0007F7F0 /* MIPSAssembler.h in Headers */,
BC02E9110E1839DB000F9297 /* NativeErrorConstructor.h in Headers */,
BC02E9130E1839DB000F9297 /* NativeErrorPrototype.h in Headers */,
7EFF00640EC05A9A00AA7C93 /* NodeInfo.h in Headers */,
+ BC18C43F0E16F5CD00B34460 /* Nodes.h in Headers */,
BC18C4400E16F5CD00B34460 /* Noncopyable.h in Headers */,
65E1A3DF122B894500B26097 /* NonCopyingSort.h in Headers */,
C0A272630E50A06300E96E15 /* NotFound.h in Headers */,
@@ -2803,22 +2856,32 @@
E124A8F70E555775003091F1 /* OpaqueJSString.h in Headers */,
969A079B0ED1D3AE00F1F681 /* Opcode.h in Headers */,
BC18C4480E16F5CD00B34460 /* Operations.h in Headers */,
+ 0FE228ED1436AB2700196C48 /* Options.h in Headers */,
1400067712A6F7830064D123 /* OSAllocator.h in Headers */,
97941A5A13029ACC004A3447 /* OSRandomSource.h in Headers */,
BC18C4490E16F5CD00B34460 /* OwnArrayPtr.h in Headers */,
- 0BDFFAE10FC6193100D69EF4 /* OwnFastMallocPtr.h in Headers */,
BC18C44A0E16F5CD00B34460 /* OwnPtr.h in Headers */,
4409D8470FAF80A200523B87 /* OwnPtrCommon.h in Headers */,
+ 0F636DA0142D27D700B2E66A /* PackedIntVector.h in Headers */,
8627E5EC11F1281900A313B5 /* PageAllocation.h in Headers */,
14FFF98D12BFFF7500795BB8 /* PageAllocationAligned.h in Headers */,
14B3EF0512BC24DD00D29EFF /* PageBlock.h in Headers */,
8690231512092D5C00630AF9 /* PageReservation.h in Headers */,
+ 7934BB7B1361979300CB99A1 /* ParallelJobs.h in Headers */,
+ 7934BB7D1361979400CB99A1 /* ParallelJobsGeneric.h in Headers */,
+ 7934BB7E1361979400CB99A1 /* ParallelJobsLibdispatch.h in Headers */,
+ 7934BB7F1361979400CB99A1 /* ParallelJobsOpenMP.h in Headers */,
BC18C44B0E16F5CD00B34460 /* Parser.h in Headers */,
+ 93052C350FB792190048FDC3 /* ParserArena.h in Headers */,
+ 65303D641447B9E100D3F904 /* ParserTokens.h in Headers */,
BCFBE696122560E800309E9D /* PassOwnArrayPtr.h in Headers */,
44DD48530FAEA85000D6B4EB /* PassOwnPtr.h in Headers */,
BC18C44C0E16F5CD00B34460 /* PassRefPtr.h in Headers */,
+ 651DCA04136A6FEF00F74194 /* PassTraits.h in Headers */,
BC18C44F0E16F5CD00B34460 /* Platform.h in Headers */,
A7D649AA1015224E009B2E1B /* PossiblyNull.h in Headers */,
+ 0FD82E54141DAEEE00179C94 /* PredictedType.h in Headers */,
+ 0FD82E55141DAEEE00179C94 /* PredictionTracker.h in Headers */,
BC18C4500E16F5CD00B34460 /* Profile.h in Headers */,
95CD45770E1C4FDD0085358E /* ProfileGenerator.h in Headers */,
BC18C4510E16F5CD00B34460 /* ProfileNode.h in Headers */,
@@ -2831,22 +2894,11 @@
147B84630E6DE6B1004775A4 /* PutPropertySlot.h in Headers */,
088FA5BC0EF76D4300578E6F /* RandomNumber.h in Headers */,
08E279E90EF83B10007DB523 /* RandomNumberSeed.h in Headers */,
+ 0F963B2713F753BB0002D9B2 /* RedBlackTree.h in Headers */,
BC18C4570E16F5CD00B34460 /* RefCounted.h in Headers */,
90D3469C0E285280009492EE /* RefCountedLeakCounter.h in Headers */,
BC18C4580E16F5CD00B34460 /* RefPtr.h in Headers */,
BC18C4590E16F5CD00B34460 /* RefPtrHashMap.h in Headers */,
- C22C52F213FAF6EF00B7DC0D /* bignum-dtoa.h in Headers */,
- C22C52F413FAF6EF00B7DC0D /* bignum.h in Headers */,
- C22C52F613FAF6EF00B7DC0D /* cached-powers.h in Headers */,
- C22C52F813FAF6EF00B7DC0D /* diy-fp.h in Headers */,
- C22C52FA13FAF6EF00B7DC0D /* double-conversion.h in Headers */,
- C22C52FB13FAF6EF00B7DC0D /* double.h in Headers */,
- C22C52FD13FAF6EF00B7DC0D /* fast-dtoa.h in Headers */,
- C22C52FF13FAF6EF00B7DC0D /* fixed-dtoa.h in Headers */,
- C22C531413FAF6EF00B7DC0D /* strtod.h in Headers */,
- C22C531513FAF6EF00B7DC0D /* utils.h in Headers */,
- 0FD3C82714115D4F00FD81CB /* DFGPropagator.h in Headers */,
- 0FD3C82814115D4F00FD81CB /* DFGDriver.h in Headers */,
BC18C45A0E16F5CD00B34460 /* RegExp.h in Headers */,
A1712B3F11C7B228007A5315 /* RegExpCache.h in Headers */,
BCD202C20E1706A7002C7E82 /* RegExpConstructor.h in Headers */,
@@ -2861,19 +2913,26 @@
86D3B3C410159D7F002865E7 /* RepatchBuffer.h in Headers */,
869EBCB70E8C6D4A008722CC /* ResultType.h in Headers */,
BC18C4600E16F5CD00B34460 /* RetainPtr.h in Headers */,
+ C22B31B9140577D700DB475A /* SamplingCounter.h in Headers */,
+ 1429D8860ED21C3D00B89619 /* SamplingTool.h in Headers */,
BC18C4610E16F5CD00B34460 /* ScopeChain.h in Headers */,
+ 969A072C0ED1CE6900F1F681 /* SegmentedVector.h in Headers */,
A7C40C0B130B057D00D002A1 /* SentinelLinkedList.h in Headers */,
+ 86AE64AA135E5E1C00963012 /* SH4Assembler.h in Headers */,
76FB9F0F12E851860051A2EB /* SHA1.h in Headers */,
A7C40C0C130B057D00D002A1 /* SinglyLinkedList.h in Headers */,
+ 14BA78F113AAB88F005B7C2C /* SlotVisitor.h in Headers */,
933040040E6A749400786E6A /* SmallStrings.h in Headers */,
BC18C4640E16F5CD00B34460 /* SourceCode.h in Headers */,
BC18C4630E16F5CD00B34460 /* SourceProvider.h in Headers */,
E49DC16C12EF294E00184A1F /* SourceProviderCache.h in Headers */,
E49DC16D12EF295300184A1F /* SourceProviderCacheItem.h in Headers */,
A7386554118697B400540279 /* SpecializedThunkJIT.h in Headers */,
+ 0F2E5BF7146357D5003EB2EB /* Spectrum.h in Headers */,
86D87DDB12BCAF94008E73A1 /* StackBounds.h in Headers */,
868BFA60117D048200B908B1 /* StaticConstructors.h in Headers */,
FE1B447A0ECCD73B004F4DD1 /* StdLibExtras.h in Headers */,
+ A781E359141970C700094D90 /* StorageBarrier.h in Headers */,
A730B6121250068F009D25B1 /* StrictEvalActivation.h in Headers */,
86B99AE3117E578100DF5A90 /* StringBuffer.h in Headers */,
081469491264378500DFF935 /* StringBuilder.h in Headers */,
@@ -2883,11 +2942,13 @@
868BFA0D117CEFD100B908B1 /* StringHash.h in Headers */,
5D63E9AD10F2BD6E00FC8AE9 /* StringHasher.h in Headers */,
868BFA0F117CEFD100B908B1 /* StringImpl.h in Headers */,
- 71DA9D82134F3F3D00B767E7 /* StringOperators.h in Headers */,
BC18C4680E16F5CD00B34460 /* StringObject.h in Headers */,
+ 71DA9D82134F3F3D00B767E7 /* StringOperators.h in Headers */,
BC18C46A0E16F5CD00B34460 /* StringPrototype.h in Headers */,
BC18C5260E16FCA700B34460 /* StringPrototype.lut.h in Headers */,
142E313B134FF0A600AFADB5 /* Strong.h in Headers */,
+ 145722861437E140005FDE26 /* StrongInlines.h in Headers */,
+ C22C531413FAF6EF00B7DC0D /* strtod.h in Headers */,
BCDE3AB80E6C82F5001453A7 /* Structure.h in Headers */,
7E4EE7090EBB7963005934AA /* StructureChain.h in Headers */,
BCCF0D080EF0AAB900413C8F /* StructureStubInfo.h in Headers */,
@@ -2896,6 +2957,7 @@
A784A26411D16622005776AC /* SyntaxChecker.h in Headers */,
BC18C46C0E16F5CD00B34460 /* TCPackedCache.h in Headers */,
BC18C46D0E16F5CD00B34460 /* TCPageMap.h in Headers */,
+ BC18C46E0E16F5CD00B34460 /* TCSpinLock.h in Headers */,
BC18C46F0E16F5CD00B34460 /* TCSystemAlloc.h in Headers */,
0BCD83571485845200EA2003 /* TemporaryChange.h in Headers */,
971EDEA61169E0D3005E4262 /* Terminator.h in Headers */,
@@ -2908,23 +2970,38 @@
BC18C4710E16F5CD00B34460 /* ThreadSpecific.h in Headers */,
A7386556118697B400540279 /* ThunkGenerators.h in Headers */,
14A42E400F4F60EE00599099 /* TimeoutChecker.h in Headers */,
+ 141448CD13A1783700F5BA1A /* TinyBloomFilter.h in Headers */,
5D53726F0E1C54880021E549 /* Tracing.h in Headers */,
+ A73BE17E148420840091204B /* TypedArrayBase.h in Headers */,
0B4D7E630F319AC800AD7E58 /* TypeTraits.h in Headers */,
+ A73BE179148420520091204B /* Uint16Array.h in Headers */,
+ 866739D313BFDE710023D87C /* Uint16WithFraction.h in Headers */,
+ A73BE17B148420520091204B /* Uint32Array.h in Headers */,
+ A73BE177148420520091204B /* Uint8Array.h in Headers */,
+ 0F5F08CF146C7633000472A9 /* UnconditionalFinalizer.h in Headers */,
BC18C4730E16F5CD00B34460 /* Unicode.h in Headers */,
BC18C4740E16F5CD00B34460 /* UnicodeIcu.h in Headers */,
+ 0FD52AAE143035A00026DC9F /* UnionFind.h in Headers */,
BC18C4750E16F5CD00B34460 /* UnusedParam.h in Headers */,
BC18C4760E16F5CD00B34460 /* UString.h in Headers */,
08DDA5C11264631700751732 /* UStringBuilder.h in Headers */,
BC18C4770E16F5CD00B34460 /* UTF8.h in Headers */,
+ C22C531513FAF6EF00B7DC0D /* utils.h in Headers */,
E17FF771112131D200076A19 /* ValueCheck.h in Headers */,
+ 0F963B3813FC6FE90002D9B2 /* ValueProfile.h in Headers */,
+ 0F426A481460CBB300131F8F /* ValueRecovery.h in Headers */,
BC18C4780E16F5CD00B34460 /* Vector.h in Headers */,
BC18C4790E16F5CD00B34460 /* VectorTraits.h in Headers */,
+ 0F426A491460CBB700131F8F /* VirtualRegister.h in Headers */,
96DD73790F9DA3100027FBCC /* VMTags.h in Headers */,
+ 0FC815151405119B00CFA603 /* VTableSpectrum.h in Headers */,
142E313C134FF0A600AFADB5 /* Weak.h in Headers */,
14BFCE6910CDB1FC00364CCE /* WeakGCMap.h in Headers */,
1420BE7B10AA6DDB00F455D2 /* WeakRandom.h in Headers */,
+ 0F242DA713F3B1E8007ADD4C /* WeakReferenceHarvester.h in Headers */,
BC18C47A0E16F5CD00B34460 /* WebKitAvailability.h in Headers */,
A7DCB97312E5193F00911940 /* WriteBarrier.h in Headers */,
+ 0FC8150A14043BF500CFA603 /* WriteBarrierSupport.h in Headers */,
868BFA18117CF19900B908B1 /* WTFString.h in Headers */,
86D08D5411793613006E5ED0 /* WTFThreadData.h in Headers */,
9688CB160ED12B4E001D649F /* X86Assembler.h in Headers */,
@@ -2934,78 +3011,16 @@
86704B8812DBA33700A9FE7B /* YarrParser.h in Headers */,
86704B8A12DBA33700A9FE7B /* YarrPattern.h in Headers */,
86704B4312DB8A8100A9FE7B /* YarrSyntaxChecker.h in Headers */,
- 5DE6E5B30E1728EC00180407 /* create_hash_table in Headers */,
- 865A30F1135007E100CDB49E /* JSValueInlineMethods.h in Headers */,
- 142D6F0913539A2800B02E86 /* MarkedBlock.h in Headers */,
- 142D6F1213539A4100B02E86 /* MarkStack.h in Headers */,
- A1D764521354448B00C5C7C0 /* Alignment.h in Headers */,
- 86AE64A9135E5E1C00963012 /* MacroAssemblerSH4.h in Headers */,
- 86AE64AA135E5E1C00963012 /* SH4Assembler.h in Headers */,
- 86AE6C4D136A11E400963012 /* DFGFPRInfo.h in Headers */,
- 86AE6C4E136A11E400963012 /* DFGGPRInfo.h in Headers */,
- 7934BB7B1361979300CB99A1 /* ParallelJobs.h in Headers */,
- 7934BB7D1361979400CB99A1 /* ParallelJobsGeneric.h in Headers */,
- 7934BB7E1361979400CB99A1 /* ParallelJobsLibdispatch.h in Headers */,
- 7934BB7F1361979400CB99A1 /* ParallelJobsOpenMP.h in Headers */,
- 651DCA04136A6FEF00F74194 /* PassTraits.h in Headers */,
- 14F97447138C853E00DA1C67 /* HeapRootVisitor.h in Headers */,
- 86BB09C1138E381B0056702F /* DFGRepatch.h in Headers */,
- A72FFD64139985A800E5365A /* KeywordLookup.h in Headers */,
- 14D2F3DB139F4BE200491031 /* MarkedSpace.h in Headers */,
- 141448CB13A176EC00F5BA1A /* MarkedBlockSet.h in Headers */,
- 141448CD13A1783700F5BA1A /* TinyBloomFilter.h in Headers */,
- 14BA78F113AAB88F005B7C2C /* SlotVisitor.h in Headers */,
- 14BA7A9813AADFF8005B7C2C /* Heap.h in Headers */,
- A76F54A313B28AAB00EF2BCE /* JITWriteBarrier.h in Headers */,
- 866739D213BFDE710023D87C /* BigInteger.h in Headers */,
- 866739D313BFDE710023D87C /* Uint16WithFraction.h in Headers */,
- BC66BAE413F492CC00C23FAE /* Compiler.h in Headers */,
- A7BC0C82140608B000B1BB71 /* CheckedArithmetic.h in Headers */,
- A781E359141970C700094D90 /* StorageBarrier.h in Headers */,
- 1A08277A142168D70090CCAC /* BinarySemaphore.h in Headers */,
- A70456B01427FB910037DA68 /* AllocationSpace.h in Headers */,
- 86FA9E92142BBB2E001773B7 /* JSBoundFunction.h in Headers */,
- 0F636DA0142D27D700B2E66A /* PackedIntVector.h in Headers */,
- A7521E131429169A003C8D0C /* CardSet.h in Headers */,
- 0FD52AAE143035A00026DC9F /* UnionFind.h in Headers */,
- 0FE228ED1436AB2700196C48 /* Options.h in Headers */,
- 0FFF4BB4143955E900655BC0 /* DFGStructureSet.h in Headers */,
- 8604F505143CE1C200B295F5 /* JSGlobalThis.h in Headers */,
- 0F620174143FCD330068B77C /* DFGVariableAccessData.h in Headers */,
- 0F620175143FCD370068B77C /* DFGOperands.h in Headers */,
- 0F620176143FCD3B0068B77C /* DFGBasicBlock.h in Headers */,
- 0F620177143FCD3F0068B77C /* DFGAbstractValue.h in Headers */,
- 0F620178143FCD440068B77C /* DFGAbstractState.h in Headers */,
- 0FBD7E691447999600481315 /* CodeOrigin.h in Headers */,
- 65303D641447B9E100D3F904 /* ParserTokens.h in Headers */,
- 0F426A481460CBB300131F8F /* ValueRecovery.h in Headers */,
- 0F426A491460CBB700131F8F /* VirtualRegister.h in Headers */,
- 0F426A4B1460CD6E00131F8F /* DataFormat.h in Headers */,
- 0F2E5BF7146357D5003EB2EB /* Spectrum.h in Headers */,
- 0FC0976A1468A6F700CF2442 /* DFGOSRExit.h in Headers */,
- 0FC0976D1468AB4E00CF2442 /* DFGAssemblyHelpers.h in Headers */,
- 0FC0977114693AF500CF2442 /* DFGOSRExitCompiler.h in Headers */,
- 0FC0979C146A772500CF2442 /* DFGCorrectableJumpPoint.h in Headers */,
- 0FC097A2146B28CC00CF2442 /* DFGThunks.h in Headers */,
- 0F431738146BAC69007E3890 /* ListableHandler.h in Headers */,
- 0F5F08CF146C7633000472A9 /* UnconditionalFinalizer.h in Headers */,
- 978801411471AD920041B016 /* JSDateMath.h in Headers */,
- 0F2C556F14738F3100121E4F /* DFGCodeBlocks.h in Headers */,
- A73BE169148420520091204B /* ArrayBuffer.h in Headers */,
- A73BE16B148420520091204B /* ArrayBufferView.h in Headers */,
- A73BE16D148420520091204B /* Float32Array.h in Headers */,
- A73BE16F148420520091204B /* Float64Array.h in Headers */,
- A73BE171148420520091204B /* Int8Array.h in Headers */,
- A73BE173148420520091204B /* Int16Array.h in Headers */,
- A73BE175148420520091204B /* Int32Array.h in Headers */,
- A73BE177148420520091204B /* Uint8Array.h in Headers */,
- A73BE179148420520091204B /* Uint16Array.h in Headers */,
- A73BE17B148420520091204B /* Uint32Array.h in Headers */,
- A73BE17E148420840091204B /* TypedArrayBase.h in Headers */,
- A73BE180148420A80091204B /* IntegralTypedArrayBase.h in Headers */,
- 860BD801148EA6F200112B2F /* Intrinsic.h in Headers */,
- 0FBC0AE81496C7C700D4FBDD /* DFGExitProfile.h in Headers */,
- 1AA9E5511498093500001A8A /* Functional.h in Headers */,
+ 0F15F15F14B7A73E005DE37D /* CommonSlowPaths.h in Headers */,
+ 0F46808214BA572D00BFE272 /* JITExceptions.h in Headers */,
+ 0F0B83A714BCF50700885B4F /* CodeType.h in Headers */,
+ 0F0B83A914BCF56200885B4F /* HandlerInfo.h in Headers */,
+ 0F0B83AB14BCF5BB00885B4F /* ExpressionRangeInfo.h in Headers */,
+ 0F0B83AD14BCF60400885B4F /* LineInfo.h in Headers */,
+ 0F0B83B114BCF71800885B4F /* CallLinkInfo.h in Headers */,
+ 0F0B83B514BCF86200885B4F /* MethodCallLinkInfo.h in Headers */,
+ 0F0B83B714BCF8E100885B4F /* GlobalResolveInfo.h in Headers */,
+ 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3024,7 +3039,6 @@
buildRules = (
);
dependencies = (
- 141211360A48796100480255 /* PBXTargetDependency */,
);
name = minidom;
productName = minidom;
@@ -3043,7 +3057,6 @@
buildRules = (
);
dependencies = (
- 14270B080A451DA10080EEEA /* PBXTargetDependency */,
);
name = testapi;
productName = testapi;
@@ -3060,7 +3073,6 @@
buildRules = (
);
dependencies = (
- 651122F814046A4C002B101D /* PBXTargetDependency */,
);
name = testRegExp;
productInstallPath = /usr/local/bin;
@@ -3103,7 +3115,6 @@
buildRules = (
);
dependencies = (
- 14270B0C0A451DA40080EEEA /* PBXTargetDependency */,
);
name = jsc;
productInstallPath = /usr/local/bin;
@@ -3319,31 +3330,27 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 0F16D726142C39C000CF784A /* BitVector.cpp in Sources */,
- 0FD82E9014207A5F00179C94 /* ValueProfile.cpp in Sources */,
- 0FD82E86141F3FF100179C94 /* PredictedType.cpp in Sources */,
- 0FD82E56141DAF0800179C94 /* DFGOSREntry.cpp in Sources */,
- 0F963B2C13F853EC0002D9B2 /* MetaAllocator.cpp in Sources */,
- 0FD82E2114172CE300179C94 /* DFGCapabilities.cpp in Sources */,
- 0FD3C82514115D4000FD81CB /* DFGPropagator.cpp in Sources */,
- 0FD3C82614115D4000FD81CB /* DFGDriver.cpp in Sources */,
- 0FC81516140511B500CFA603 /* VTableSpectrum.cpp in Sources */,
- 0FC8150B14043C0E00CFA603 /* WriteBarrierSupport.cpp in Sources */,
- 0F7700921402FF3C0078EB39 /* SamplingCounter.cpp in Sources */,
- C2EE59A113FC9768009CEAFE /* DecimalNumber.cpp in Sources */,
+ A70456B11427FB950037DA68 /* AllocationSpace.cpp in Sources */,
147F39BD107EC37600427A48 /* ArgList.cpp in Sources */,
147F39BE107EC37600427A48 /* Arguments.cpp in Sources */,
86D3B2C310156BDE002865E7 /* ARMAssembler.cpp in Sources */,
A74DE1D0120B875600D40D5B /* ARMv7Assembler.cpp in Sources */,
+ A73BE168148420520091204B /* ArrayBuffer.cpp in Sources */,
+ A73BE16A148420520091204B /* ArrayBufferView.cpp in Sources */,
147F39BF107EC37600427A48 /* ArrayConstructor.cpp in Sources */,
147F39C0107EC37600427A48 /* ArrayPrototype.cpp in Sources */,
65FDE49C0BDD1D4A00E80111 /* Assertions.cpp in Sources */,
868BFA08117CEFD100B908B1 /* AtomicString.cpp in Sources */,
+ C22C52F113FAF6EF00B7DC0D /* bignum-dtoa.cc in Sources */,
+ C22C52F313FAF6EF00B7DC0D /* bignum.cc in Sources */,
+ 1A082779142168D70090CCAC /* BinarySemaphore.cpp in Sources */,
+ 0F16D726142C39C000CF784A /* BitVector.cpp in Sources */,
14280863107EC11A0013E7B2 /* BooleanConstructor.cpp in Sources */,
14280864107EC11A0013E7B2 /* BooleanObject.cpp in Sources */,
14280865107EC11A0013E7B2 /* BooleanPrototype.cpp in Sources */,
A7A1F7AC0F252B3C00E184E2 /* ByteArray.cpp in Sources */,
148F21AA107EC53A0042EC2C /* BytecodeGenerator.cpp in Sources */,
+ C22C52F513FAF6EF00B7DC0D /* cached-powers.cc in Sources */,
1428082D107EC0570013E7B2 /* CallData.cpp in Sources */,
1429D8DD0ED2205B00B89619 /* CallFrame.cpp in Sources */,
969A07960ED1D3AE00F1F681 /* CodeBlock.cpp in Sources */,
@@ -3364,11 +3371,31 @@
14280823107EC02C0013E7B2 /* Debugger.cpp in Sources */,
BC3135650F302FA3003DFD3A /* DebuggerActivation.cpp in Sources */,
149559EE0DDCDDF700648087 /* DebuggerCallFrame.cpp in Sources */,
+ C2EE59A113FC9768009CEAFE /* DecimalNumber.cpp in Sources */,
+ 0F620179143FCD480068B77C /* DFGAbstractState.cpp in Sources */,
+ 0FC0976E1468AB5100CF2442 /* DFGAssemblyHelpers.cpp in Sources */,
86EC9DC41328DF82002B2AD7 /* DFGByteCodeParser.cpp in Sources */,
+ 0FD82E2114172CE300179C94 /* DFGCapabilities.cpp in Sources */,
+ 0F2C557014738F3500121E4F /* DFGCodeBlocks.cpp in Sources */,
+ 0FC0979E146B272100CF2442 /* DFGCorrectableJumpPoint.cpp in Sources */,
+ 0FD3C82614115D4000FD81CB /* DFGDriver.cpp in Sources */,
+ 0FBC0AE71496C7C400D4FBDD /* DFGExitProfile.cpp in Sources */,
86EC9DC71328DF82002B2AD7 /* DFGGraph.cpp in Sources */,
86EC9DCB1328DF82002B2AD7 /* DFGJITCompiler.cpp in Sources */,
86EC9DCF1328DF82002B2AD7 /* DFGOperations.cpp in Sources */,
+ 0FD82E56141DAF0800179C94 /* DFGOSREntry.cpp in Sources */,
+ 0FC09791146A6F7100CF2442 /* DFGOSRExit.cpp in Sources */,
+ 0FC09792146A6F7300CF2442 /* DFGOSRExitCompiler.cpp in Sources */,
+ 0FC09776146943B000CF2442 /* DFGOSRExitCompiler32_64.cpp in Sources */,
+ 0FC0977214693AF900CF2442 /* DFGOSRExitCompiler64.cpp in Sources */,
+ 0FD3C82514115D4000FD81CB /* DFGPropagator.cpp in Sources */,
+ 86BB09C0138E381B0056702F /* DFGRepatch.cpp in Sources */,
86EC9DD21328DF82002B2AD7 /* DFGSpeculativeJIT.cpp in Sources */,
+ 86880F1F14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp in Sources */,
+ 86880F4D14353B2100B08D42 /* DFGSpeculativeJIT64.cpp in Sources */,
+ 0FC097A1146B28CA00CF2442 /* DFGThunks.cpp in Sources */,
+ C22C52F713FAF6EF00B7DC0D /* diy-fp.cc in Sources */,
+ C22C52F913FAF6EF00B7DC0D /* double-conversion.cc in Sources */,
14469DD7107EC79E00650446 /* dtoa.cpp in Sources */,
147F39C7107EC37600427A48 /* Error.cpp in Sources */,
147F39C8107EC37600427A48 /* ErrorConstructor.cpp in Sources */,
@@ -3378,7 +3405,9 @@
86CA032E1038E8440028A609 /* Executable.cpp in Sources */,
A7B48F490EE8936F00DCBDB6 /* ExecutableAllocator.cpp in Sources */,
86DB64640F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp in Sources */,
+ C22C52FC13FAF6EF00B7DC0D /* fast-dtoa.cc in Sources */,
14F8BA3E107EC886009892DC /* FastMalloc.cpp in Sources */,
+ C22C52FE13FAF6EF00B7DC0D /* fixed-dtoa.cc in Sources */,
147F39CB107EC37600427A48 /* FunctionConstructor.cpp in Sources */,
147F39CC107EC37600427A48 /* FunctionPrototype.cpp in Sources */,
DDF7ABD511F60ED200108E36 /* GCActivityCallbackCF.cpp in Sources */,
@@ -3386,6 +3415,7 @@
142E3135134FF0A600AFADB5 /* HandleHeap.cpp in Sources */,
142E3137134FF0A600AFADB5 /* HandleStack.cpp in Sources */,
65DFC93308EA173A00F7300B /* HashTable.cpp in Sources */,
+ 14BA7A9713AADFF8005B7C2C /* Heap.cpp in Sources */,
147F39CE107EC37600427A48 /* Identifier.cpp in Sources */,
E178636D0D9BEEC300D74E75 /* InitializeThreading.cpp in Sources */,
147F39CF107EC37600427A48 /* InternalFunction.cpp in Sources */,
@@ -3404,6 +3434,7 @@
140566C4107EC255005DBC8D /* JSAPIValueWrapper.cpp in Sources */,
147F39D0107EC37600427A48 /* JSArray.cpp in Sources */,
1421359B0A677F4F00A8195E /* JSBase.cpp in Sources */,
+ 86FA9E91142BBB2E001773B7 /* JSBoundFunction.cpp in Sources */,
A791EF290F11E07900AE1F68 /* JSByteArray.cpp in Sources */,
1440F8AF0A508D200005F061 /* JSCallbackConstructor.cpp in Sources */,
1440F8920A508B100005F061 /* JSCallbackFunction.cpp in Sources */,
@@ -3411,10 +3442,12 @@
147F39D1107EC37600427A48 /* JSCell.cpp in Sources */,
1440FCE40A51E46B0005F061 /* JSClassRef.cpp in Sources */,
14BD5A300A3E91F600BAF59C /* JSContextRef.cpp in Sources */,
+ 978801401471AD920041B016 /* JSDateMath.cpp in Sources */,
140566D6107EC271005DBC8D /* JSFunction.cpp in Sources */,
E18E3A590DF9278C00D90B34 /* JSGlobalData.cpp in Sources */,
147F39D2107EC37600427A48 /* JSGlobalObject.cpp in Sources */,
14E9D17B107EC469004DDA21 /* JSGlobalObjectFunctions.cpp in Sources */,
+ BC3C4CA01458F5450025FB62 /* JSGlobalThis.cpp in Sources */,
14280875107EC13E0013E7B2 /* JSLock.cpp in Sources */,
A72700900DAC6BBC00E548D7 /* JSNotAnObject.cpp in Sources */,
147F39D4107EC37600427A48 /* JSObject.cpp in Sources */,
@@ -3437,11 +3470,16 @@
14469DDE107EC7E700650446 /* Lookup.cpp in Sources */,
14B723B212D7DA46003BD5ED /* MachineStackMarker.cpp in Sources */,
86C568E011A213EE0007F7F0 /* MacroAssemblerARM.cpp in Sources */,
+ 86AE64A8135E5E1C00963012 /* MacroAssemblerSH4.cpp in Sources */,
06D358B30DAADAA4003B174E /* MainThread.cpp in Sources */,
06D358B40DAADAAA003B174E /* MainThreadMac.mm in Sources */,
+ 142D6F0813539A2800B02E86 /* MarkedBlock.cpp in Sources */,
+ 14D2F3DA139F4BE200491031 /* MarkedSpace.cpp in Sources */,
+ 142D6F1113539A4100B02E86 /* MarkStack.cpp in Sources */,
14469DDF107EC7E700650446 /* MathObject.cpp in Sources */,
511FC4C9117EE28700425272 /* MD5.cpp in Sources */,
90213E3D123A40C200D422F3 /* MemoryStatistics.cpp in Sources */,
+ 0F963B2C13F853EC0002D9B2 /* MetaAllocator.cpp in Sources */,
14469DE0107EC7E700650446 /* NativeErrorConstructor.cpp in Sources */,
14469DE1107EC7E700650446 /* NativeErrorPrototype.cpp in Sources */,
148F21B7107EC5470042EC2C /* Nodes.cpp in Sources */,
@@ -3455,12 +3493,15 @@
E124A8F80E555775003091F1 /* OpaqueJSString.cpp in Sources */,
969A079A0ED1D3AE00F1F681 /* Opcode.cpp in Sources */,
14280850107EC0D70013E7B2 /* Operations.cpp in Sources */,
+ 0FE228EE1436AB2C00196C48 /* Options.cpp in Sources */,
1400069312A6F9E10064D123 /* OSAllocatorPosix.cpp in Sources */,
97941A5713029AAB004A3447 /* OSRandomSource.cpp in Sources */,
14FFF98C12BFFF7500795BB8 /* PageAllocationAligned.cpp in Sources */,
14B3EF0612BC24DD00D29EFF /* PageBlock.cpp in Sources */,
+ 7934BB7C1361979400CB99A1 /* ParallelJobsGeneric.cpp in Sources */,
148F21BC107EC54D0042EC2C /* Parser.cpp in Sources */,
93052C340FB792190048FDC3 /* ParserArena.cpp in Sources */,
+ 0FD82E86141F3FF100179C94 /* PredictedType.cpp in Sources */,
95742F650DD11F5A000917FB /* Profile.cpp in Sources */,
95CD45760E1C4FDD0085358E /* ProfileGenerator.cpp in Sources */,
95AB83560DA43C3000BC83F3 /* ProfileNode.cpp in Sources */,
@@ -3476,6 +3517,7 @@
14280843107EC0930013E7B2 /* RegExpObject.cpp in Sources */,
14280844107EC0930013E7B2 /* RegExpPrototype.cpp in Sources */,
1428083A107EC0750013E7B2 /* RegisterFile.cpp in Sources */,
+ 0F7700921402FF3C0078EB39 /* SamplingCounter.cpp in Sources */,
1429D8850ED21C3D00B89619 /* SamplingTool.cpp in Sources */,
14469DEA107EC7E700650446 /* ScopeChain.cpp in Sources */,
76FB9F1112E851960051A2EB /* SHA1.cpp in Sources */,
@@ -3491,6 +3533,7 @@
14469DED107EC7E700650446 /* StringPrototype.cpp in Sources */,
9335F24D12E6765B002B5553 /* StringRecursionChecker.cpp in Sources */,
8626BECF11928E3900782FAB /* StringStatics.cpp in Sources */,
+ C22C531313FAF6EF00B7DC0D /* strtod.cc in Sources */,
BCDE3B430E6C832D001453A7 /* Structure.cpp in Sources */,
7E4EE70F0EBB7A5B005934AA /* StructureChain.cpp in Sources */,
BCCF0D0C0EF0B8A500413C8F /* StructureStubInfo.cpp in Sources */,
@@ -3503,47 +3546,18 @@
0B330C270F38C62300692DE3 /* TypeTraits.cpp in Sources */,
14469DEE107EC7E700650446 /* UString.cpp in Sources */,
E1EF79AA0CE97BA60088D500 /* UTF8.cpp in Sources */,
+ 0FD82E9014207A5F00179C94 /* ValueProfile.cpp in Sources */,
+ 0FC81516140511B500CFA603 /* VTableSpectrum.cpp in Sources */,
+ 0FC8150B14043C0E00CFA603 /* WriteBarrierSupport.cpp in Sources */,
868BFA17117CF19900B908B1 /* WTFString.cpp in Sources */,
86D08D5311793613006E5ED0 /* WTFThreadData.cpp in Sources */,
86704B8412DBA33700A9FE7B /* YarrInterpreter.cpp in Sources */,
86704B8612DBA33700A9FE7B /* YarrJIT.cpp in Sources */,
86704B8912DBA33700A9FE7B /* YarrPattern.cpp in Sources */,
86704B4212DB8A8100A9FE7B /* YarrSyntaxChecker.cpp in Sources */,
- 142D6F0813539A2800B02E86 /* MarkedBlock.cpp in Sources */,
- 142D6F1113539A4100B02E86 /* MarkStack.cpp in Sources */,
- 86AE64A8135E5E1C00963012 /* MacroAssemblerSH4.cpp in Sources */,
- 7934BB7C1361979400CB99A1 /* ParallelJobsGeneric.cpp in Sources */,
- 86BB09C0138E381B0056702F /* DFGRepatch.cpp in Sources */,
- 14D2F3DA139F4BE200491031 /* MarkedSpace.cpp in Sources */,
- 14BA7A9713AADFF8005B7C2C /* Heap.cpp in Sources */,
- C22C52F113FAF6EF00B7DC0D /* bignum-dtoa.cc in Sources */,
- C22C52F313FAF6EF00B7DC0D /* bignum.cc in Sources */,
- C22C52F513FAF6EF00B7DC0D /* cached-powers.cc in Sources */,
- C22C52F713FAF6EF00B7DC0D /* diy-fp.cc in Sources */,
- C22C52F913FAF6EF00B7DC0D /* double-conversion.cc in Sources */,
- C22C52FC13FAF6EF00B7DC0D /* fast-dtoa.cc in Sources */,
- C22C52FE13FAF6EF00B7DC0D /* fixed-dtoa.cc in Sources */,
- C22C531313FAF6EF00B7DC0D /* strtod.cc in Sources */,
- 1A082779142168D70090CCAC /* BinarySemaphore.cpp in Sources */,
- A70456B11427FB950037DA68 /* AllocationSpace.cpp in Sources */,
- 86FA9E91142BBB2E001773B7 /* JSBoundFunction.cpp in Sources */,
- 86880F1F14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp in Sources */,
- 86880F4D14353B2100B08D42 /* DFGSpeculativeJIT64.cpp in Sources */,
- 0FE228EE1436AB2C00196C48 /* Options.cpp in Sources */,
- 0F620179143FCD480068B77C /* DFGAbstractState.cpp in Sources */,
- BC3C4CA01458F5450025FB62 /* JSGlobalThis.cpp in Sources */,
- 0FC0976E1468AB5100CF2442 /* DFGAssemblyHelpers.cpp in Sources */,
- 0FC0977214693AF900CF2442 /* DFGOSRExitCompiler64.cpp in Sources */,
- 0FC09776146943B000CF2442 /* DFGOSRExitCompiler32_64.cpp in Sources */,
- 0FC09791146A6F7100CF2442 /* DFGOSRExit.cpp in Sources */,
- 0FC09792146A6F7300CF2442 /* DFGOSRExitCompiler.cpp in Sources */,
- 0FC0979E146B272100CF2442 /* DFGCorrectableJumpPoint.cpp in Sources */,
- 0FC097A1146B28CA00CF2442 /* DFGThunks.cpp in Sources */,
- 978801401471AD920041B016 /* JSDateMath.cpp in Sources */,
- 0F2C557014738F3500121E4F /* DFGCodeBlocks.cpp in Sources */,
- A73BE168148420520091204B /* ArrayBuffer.cpp in Sources */,
- A73BE16A148420520091204B /* ArrayBufferView.cpp in Sources */,
- 0FBC0AE71496C7C400D4FBDD /* DFGExitProfile.cpp in Sources */,
+ 0F46808314BA573100BFE272 /* JITExceptions.cpp in Sources */,
+ 0F0B83B014BCF71600885B4F /* CallLinkInfo.cpp in Sources */,
+ 0F0B83B414BCF86000885B4F /* MethodCallLinkInfo.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3558,36 +3572,16 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
- 141211360A48796100480255 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 932F5B3E0822A1C700736975 /* JavaScriptCore */;
- targetProxy = 141211350A48796100480255 /* PBXContainerItemProxy */;
- };
141214BF0A49190E00480255 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 1412111F0A48793C00480255 /* minidom */;
targetProxy = 141214BE0A49190E00480255 /* PBXContainerItemProxy */;
};
- 14270B080A451DA10080EEEA /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 932F5B3E0822A1C700736975 /* JavaScriptCore */;
- targetProxy = 14270B070A451DA10080EEEA /* PBXContainerItemProxy */;
- };
- 14270B0C0A451DA40080EEEA /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 932F5B3E0822A1C700736975 /* JavaScriptCore */;
- targetProxy = 14270B0B0A451DA40080EEEA /* PBXContainerItemProxy */;
- };
14BD59C70A3E8FA400BAF59C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 14BD59BE0A3E8F9000BAF59C /* testapi */;
targetProxy = 14BD59C60A3E8FA400BAF59C /* PBXContainerItemProxy */;
};
- 651122F814046A4C002B101D /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 932F5B3E0822A1C700736975 /* JavaScriptCore */;
- targetProxy = 651122F914046A4C002B101D /* PBXContainerItemProxy */;
- };
651123091404768B002B101D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 651122F714046A4C002B101D /* testRegExp */;
diff --git a/Source/JavaScriptCore/Target.pri b/Source/JavaScriptCore/Target.pri
index 8b3e77d42..6ea82d102 100644
--- a/Source/JavaScriptCore/Target.pri
+++ b/Source/JavaScriptCore/Target.pri
@@ -49,9 +49,11 @@ SOURCES += \
assembler/ARMv7Assembler.cpp \
assembler/MacroAssemblerARM.cpp \
assembler/MacroAssemblerSH4.cpp \
+ bytecode/CallLinkInfo.cpp \
bytecode/CodeBlock.cpp \
bytecode/DFGExitProfile.cpp \
bytecode/JumpTable.cpp \
+ bytecode/MethodCallLinkInfo.cpp \
bytecode/Opcode.cpp \
bytecode/PredictedType.cpp \
bytecode/SamplingTool.cpp \
@@ -104,6 +106,7 @@ SOURCES += \
jit/JITCall.cpp \
jit/JITCall32_64.cpp \
jit/JIT.cpp \
+ jit/JITExceptions.cpp \
jit/JITOpcodes.cpp \
jit/JITOpcodes32_64.cpp \
jit/JITPropertyAccess.cpp \
diff --git a/Source/JavaScriptCore/assembler/RepatchBuffer.h b/Source/JavaScriptCore/assembler/RepatchBuffer.h
index 6ea6d8df3..e56185fdb 100644
--- a/Source/JavaScriptCore/assembler/RepatchBuffer.h
+++ b/Source/JavaScriptCore/assembler/RepatchBuffer.h
@@ -28,6 +28,7 @@
#if ENABLE(ASSEMBLER)
+#include "CodeBlock.h"
#include <MacroAssembler.h>
#include <wtf/Noncopyable.h>
diff --git a/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp b/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp
new file mode 100644
index 000000000..4c108ecf1
--- /dev/null
+++ b/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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 "config.h"
+#include "CallLinkInfo.h"
+
+#include "DFGOperations.h"
+#include "RepatchBuffer.h"
+
+#if ENABLE(JIT)
+namespace JSC {
+
+void CallLinkInfo::unlink(JSGlobalData& globalData, RepatchBuffer& repatchBuffer)
+{
+ ASSERT(isLinked());
+
+ if (isDFG) {
+#if ENABLE(DFG_JIT)
+ repatchBuffer.relink(CodeLocationCall(callReturnLocation), callType == Construct ? DFG::operationLinkConstruct : DFG::operationLinkCall);
+#else
+ ASSERT_NOT_REACHED();
+#endif
+ } else
+ repatchBuffer.relink(CodeLocationNearCall(callReturnLocation), callType == Construct ? globalData.jitStubs->ctiVirtualConstructLink() : globalData.jitStubs->ctiVirtualCallLink());
+ hasSeenShouldRepatch = false;
+ callee.clear();
+
+ // It will be on a list if the callee has a code block.
+ if (isOnList())
+ remove();
+}
+
+} // namespace JSC
+#endif // ENABLE(JIT)
+
diff --git a/Source/JavaScriptCore/bytecode/CallLinkInfo.h b/Source/JavaScriptCore/bytecode/CallLinkInfo.h
new file mode 100644
index 000000000..8ec48e4e1
--- /dev/null
+++ b/Source/JavaScriptCore/bytecode/CallLinkInfo.h
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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.
+ */
+
+#ifndef CallLinkInfo_h
+#define CallLinkInfo_h
+
+#include "CodeLocation.h"
+#include "JITWriteBarrier.h"
+#include "JSFunction.h"
+#include "Opcode.h"
+#include "WriteBarrier.h"
+#include <wtf/Platform.h>
+#include <wtf/SentinelLinkedList.h>
+
+namespace JSC {
+
+#if ENABLE(JIT)
+
+class RepatchBuffer;
+
+struct CallLinkInfo : public BasicRawSentinelNode<CallLinkInfo> {
+ enum CallType { None, Call, CallVarargs, Construct };
+ static CallType callTypeFor(OpcodeID opcodeID)
+ {
+ if (opcodeID == op_call || opcodeID == op_call_eval)
+ return Call;
+ if (opcodeID == op_construct)
+ return Construct;
+ ASSERT(opcodeID == op_call_varargs);
+ return CallVarargs;
+ }
+
+ CallLinkInfo()
+ : hasSeenShouldRepatch(false)
+ , isDFG(false)
+ , callType(None)
+ {
+ }
+
+ ~CallLinkInfo()
+ {
+ if (isOnList())
+ remove();
+ }
+
+ CodeLocationLabel callReturnLocation; // it's a near call in the old JIT, or a normal call in DFG
+ CodeLocationDataLabelPtr hotPathBegin;
+ CodeLocationNearCall hotPathOther;
+ JITWriteBarrier<JSFunction> callee;
+ WriteBarrier<JSFunction> lastSeenCallee;
+ bool hasSeenShouldRepatch : 1;
+ bool isDFG : 1;
+ CallType callType : 2;
+ unsigned bytecodeIndex;
+
+ bool isLinked() { return callee; }
+ void unlink(JSGlobalData&, RepatchBuffer&);
+
+ bool seenOnce()
+ {
+ return hasSeenShouldRepatch;
+ }
+
+ void setSeen()
+ {
+ hasSeenShouldRepatch = true;
+ }
+};
+
+inline void* getCallLinkInfoReturnLocation(CallLinkInfo* callLinkInfo)
+{
+ return callLinkInfo->callReturnLocation.executableAddress();
+}
+
+inline unsigned getCallLinkInfoBytecodeIndex(CallLinkInfo* callLinkInfo)
+{
+ return callLinkInfo->bytecodeIndex;
+}
+#endif // ENABLE(JIT)
+
+} // namespace JSC
+
+#endif // CallLinkInfo_h
diff --git a/Source/JavaScriptCore/bytecode/CallReturnOffsetToBytecodeOffset.h b/Source/JavaScriptCore/bytecode/CallReturnOffsetToBytecodeOffset.h
new file mode 100644
index 000000000..3a7448efd
--- /dev/null
+++ b/Source/JavaScriptCore/bytecode/CallReturnOffsetToBytecodeOffset.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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.
+ */
+
+#ifndef CallReturnOffsetToBytecodeOffset_h
+#define CallReturnOffsetToBytecodeOffset_h
+
+#include <wtf/Platform.h>
+
+namespace JSC {
+
+#if ENABLE(JIT)
+// This structure is used to map from a call return location
+// (given as an offset in bytes into the JIT code) back to
+// the bytecode index of the corresponding bytecode operation.
+// This is then used to look up the corresponding handler.
+// FIXME: This should be made inlining aware! Currently it isn't
+// because we never inline code that has exception handlers.
+struct CallReturnOffsetToBytecodeOffset {
+ CallReturnOffsetToBytecodeOffset(unsigned callReturnOffset, unsigned bytecodeOffset)
+ : callReturnOffset(callReturnOffset)
+ , bytecodeOffset(bytecodeOffset)
+ {
+ }
+
+ unsigned callReturnOffset;
+ unsigned bytecodeOffset;
+};
+
+inline unsigned getCallReturnOffset(CallReturnOffsetToBytecodeOffset* pc)
+{
+ return pc->callReturnOffset;
+}
+#endif
+
+} // namespace JSC
+
+#endif // CallReturnOffsetToBytecodeOffset_h
+
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.cpp b/Source/JavaScriptCore/bytecode/CodeBlock.cpp
index a14ce64a1..47745268c 100644
--- a/Source/JavaScriptCore/bytecode/CodeBlock.cpp
+++ b/Source/JavaScriptCore/bytecode/CodeBlock.cpp
@@ -1413,7 +1413,6 @@ CodeBlock::CodeBlock(CopyParsedBlockTag, CodeBlock& other, SymbolTable* symTab)
, m_numCalleeRegisters(other.m_numCalleeRegisters)
, m_numVars(other.m_numVars)
, m_numCapturedVars(other.m_numCapturedVars)
- , m_numParameters(other.m_numParameters)
, m_isConstructor(other.m_isConstructor)
, m_shouldDiscardBytecode(false)
, m_ownerExecutable(*other.m_globalData, other.m_ownerExecutable.get(), other.m_ownerExecutable.get())
@@ -1448,6 +1447,7 @@ CodeBlock::CodeBlock(CopyParsedBlockTag, CodeBlock& other, SymbolTable* symTab)
, m_optimizationDelayCounter(0)
, m_reoptimizationRetryCounter(0)
{
+ setNumParameters(other.numParameters());
optimizeAfterWarmUp();
if (other.m_rareData) {
@@ -1469,9 +1469,9 @@ CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, JSGlo
, m_heap(&m_globalObject->globalData().heap)
, m_numCalleeRegisters(0)
, m_numVars(0)
- , m_numParameters(0)
, m_isConstructor(isConstructor)
, m_shouldDiscardBytecode(false)
+ , m_numParameters(0)
, m_ownerExecutable(globalObject->globalData(), ownerExecutable, ownerExecutable)
, m_globalData(0)
, m_instructions(adoptRef(new Instructions))
@@ -1538,6 +1538,24 @@ CodeBlock::~CodeBlock()
#endif
}
+void CodeBlock::setNumParameters(int newValue)
+{
+ m_numParameters = newValue;
+
+#if ENABLE(VALUE_PROFILER)
+ m_argumentValueProfiles.resize(newValue);
+#endif
+}
+
+void CodeBlock::addParameter()
+{
+ m_numParameters++;
+
+#if ENABLE(VALUE_PROFILER)
+ m_argumentValueProfiles.append(ValueProfile());
+#endif
+}
+
void CodeBlock::visitStructures(SlotVisitor& visitor, Instruction* vPC) const
{
Interpreter* interpreter = m_globalData->interpreter;
@@ -2038,38 +2056,6 @@ void CodeBlock::createActivation(CallFrame* callFrame)
}
#if ENABLE(JIT)
-void CallLinkInfo::unlink(JSGlobalData& globalData, RepatchBuffer& repatchBuffer)
-{
- ASSERT(isLinked());
-
- if (isDFG) {
-#if ENABLE(DFG_JIT)
- repatchBuffer.relink(CodeLocationCall(callReturnLocation), callType == Construct ? operationLinkConstruct : operationLinkCall);
-#else
- ASSERT_NOT_REACHED();
-#endif
- } else
- repatchBuffer.relink(CodeLocationNearCall(callReturnLocation), callType == Construct ? globalData.jitStubs->ctiVirtualConstructLink() : globalData.jitStubs->ctiVirtualCallLink());
- hasSeenShouldRepatch = false;
- callee.clear();
-
- // It will be on a list if the callee has a code block.
- if (isOnList())
- remove();
-}
-
-void MethodCallLinkInfo::reset(RepatchBuffer& repatchBuffer, JITCode::JITType jitType)
-{
- cachedStructure.clearToMaxUnsigned();
- cachedPrototype.clear();
- cachedPrototypeStructure.clearToMaxUnsigned();
- cachedFunction.clear();
-
- ASSERT_UNUSED(jitType, jitType == JITCode::BaselineJIT);
-
- repatchBuffer.relink(callReturnLocation, cti_op_get_by_id_method_check);
-}
-
void CodeBlock::unlinkCalls()
{
if (!!m_alternative)
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.h b/Source/JavaScriptCore/bytecode/CodeBlock.h
index 159cb65de..c440c72e1 100644
--- a/Source/JavaScriptCore/bytecode/CodeBlock.h
+++ b/Source/JavaScriptCore/bytecode/CodeBlock.h
@@ -30,22 +30,31 @@
#ifndef CodeBlock_h
#define CodeBlock_h
+#include "CallLinkInfo.h"
+#include "CallReturnOffsetToBytecodeOffset.h"
#include "CodeOrigin.h"
+#include "CodeType.h"
#include "CompactJITCodeMap.h"
#include "DFGCodeBlocks.h"
#include "DFGExitProfile.h"
#include "DFGOSREntry.h"
#include "DFGOSRExit.h"
#include "EvalCodeCache.h"
+#include "ExpressionRangeInfo.h"
+#include "GlobalResolveInfo.h"
+#include "HandlerInfo.h"
+#include "MethodCallLinkInfo.h"
#include "Options.h"
#include "Instruction.h"
#include "JITCode.h"
#include "JITWriteBarrier.h"
#include "JSGlobalObject.h"
#include "JumpTable.h"
+#include "LineInfo.h"
#include "Nodes.h"
#include "PredictionTracker.h"
#include "RegExpObject.h"
+#include "StructureStubInfo.h"
#include "UString.h"
#include "UnconditionalFinalizer.h"
#include "ValueProfile.h"
@@ -53,12 +62,8 @@
#include <wtf/PassOwnPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/SegmentedVector.h>
-#include <wtf/SentinelLinkedList.h>
#include <wtf/Vector.h>
-
-#if ENABLE(JIT)
#include "StructureStubInfo.h"
-#endif
// Register numbers used in bytecode operations have different meaning according to their ranges:
// 0x80000000-0xFFFFFFFF Negative indices from the CallFrame pointer are entries in the call frame, see RegisterFile.h.
@@ -68,191 +73,13 @@ static const int FirstConstantRegisterIndex = 0x40000000;
namespace JSC {
- enum HasSeenShouldRepatch {
- hasSeenShouldRepatch
- };
-
class ExecState;
class DFGCodeBlocks;
- enum CodeType { GlobalCode, EvalCode, FunctionCode };
-
inline int unmodifiedArgumentsRegister(int argumentsRegister) { return argumentsRegister - 1; }
static ALWAYS_INLINE int missingThisObjectMarker() { return std::numeric_limits<int>::max(); }
- struct HandlerInfo {
- uint32_t start;
- uint32_t end;
- uint32_t target;
- uint32_t scopeDepth;
-#if ENABLE(JIT)
- CodeLocationLabel nativeCode;
-#endif
- };
-
- struct ExpressionRangeInfo {
- enum {
- MaxOffset = (1 << 7) - 1,
- MaxDivot = (1 << 25) - 1
- };
- uint32_t instructionOffset : 25;
- uint32_t divotPoint : 25;
- uint32_t startOffset : 7;
- uint32_t endOffset : 7;
- };
-
- struct LineInfo {
- uint32_t instructionOffset;
- int32_t lineNumber;
- };
-
-#if ENABLE(JIT)
- struct CallLinkInfo : public BasicRawSentinelNode<CallLinkInfo> {
- enum CallType { None, Call, CallVarargs, Construct };
- static CallType callTypeFor(OpcodeID opcodeID)
- {
- if (opcodeID == op_call || opcodeID == op_call_eval)
- return Call;
- if (opcodeID == op_construct)
- return Construct;
- ASSERT(opcodeID == op_call_varargs);
- return CallVarargs;
- }
-
- CallLinkInfo()
- : hasSeenShouldRepatch(false)
- , isDFG(false)
- , callType(None)
- {
- }
-
- ~CallLinkInfo()
- {
- if (isOnList())
- remove();
- }
-
- CodeLocationLabel callReturnLocation; // it's a near call in the old JIT, or a normal call in DFG
- CodeLocationDataLabelPtr hotPathBegin;
- CodeLocationNearCall hotPathOther;
- JITWriteBarrier<JSFunction> callee;
- WriteBarrier<JSFunction> lastSeenCallee;
- bool hasSeenShouldRepatch : 1;
- bool isDFG : 1;
- CallType callType : 2;
- unsigned bytecodeIndex;
-
- bool isLinked() { return callee; }
- void unlink(JSGlobalData&, RepatchBuffer&);
-
- bool seenOnce()
- {
- return hasSeenShouldRepatch;
- }
-
- void setSeen()
- {
- hasSeenShouldRepatch = true;
- }
- };
-
- struct MethodCallLinkInfo {
- MethodCallLinkInfo()
- : seen(false)
- {
- }
-
- bool seenOnce()
- {
- return seen;
- }
-
- void setSeen()
- {
- seen = true;
- }
-
- void reset(RepatchBuffer&, JITCode::JITType);
-
- unsigned bytecodeIndex;
- CodeLocationCall callReturnLocation;
- JITWriteBarrier<Structure> cachedStructure;
- JITWriteBarrier<Structure> cachedPrototypeStructure;
- // We'd like this to actually be JSFunction, but InternalFunction and JSFunction
- // don't have a common parent class and we allow specialisation on both
- JITWriteBarrier<JSObject> cachedFunction;
- JITWriteBarrier<JSObject> cachedPrototype;
- bool seen;
- };
-
- struct GlobalResolveInfo {
- GlobalResolveInfo(unsigned bytecodeOffset)
- : offset(0)
- , bytecodeOffset(bytecodeOffset)
- {
- }
-
- WriteBarrier<Structure> structure;
- unsigned offset;
- unsigned bytecodeOffset;
- };
-
- // This structure is used to map from a call return location
- // (given as an offset in bytes into the JIT code) back to
- // the bytecode index of the corresponding bytecode operation.
- // This is then used to look up the corresponding handler.
- // FIXME: This should be made inlining aware! Currently it isn't
- // because we never inline code that has exception handlers.
- struct CallReturnOffsetToBytecodeOffset {
- CallReturnOffsetToBytecodeOffset(unsigned callReturnOffset, unsigned bytecodeOffset)
- : callReturnOffset(callReturnOffset)
- , bytecodeOffset(bytecodeOffset)
- {
- }
-
- unsigned callReturnOffset;
- unsigned bytecodeOffset;
- };
-
- // valueAtPosition helpers for the binarySearch algorithm.
-
- inline void* getStructureStubInfoReturnLocation(StructureStubInfo* structureStubInfo)
- {
- return structureStubInfo->callReturnLocation.executableAddress();
- }
-
- inline unsigned getStructureStubInfoBytecodeIndex(StructureStubInfo* structureStubInfo)
- {
- return structureStubInfo->bytecodeIndex;
- }
-
- inline void* getCallLinkInfoReturnLocation(CallLinkInfo* callLinkInfo)
- {
- return callLinkInfo->callReturnLocation.executableAddress();
- }
-
- inline unsigned getCallLinkInfoBytecodeIndex(CallLinkInfo* callLinkInfo)
- {
- return callLinkInfo->bytecodeIndex;
- }
-
- inline void* getMethodCallLinkInfoReturnLocation(MethodCallLinkInfo* methodCallLinkInfo)
- {
- return methodCallLinkInfo->callReturnLocation.executableAddress();
- }
-
- inline unsigned getMethodCallLinkInfoBytecodeIndex(MethodCallLinkInfo* methodCallLinkInfo)
- {
- return methodCallLinkInfo->bytecodeIndex;
- }
-
- inline unsigned getCallReturnOffset(CallReturnOffsetToBytecodeOffset* pc)
- {
- return pc->callReturnOffset;
- }
-#endif
-
class CodeBlock : public UnconditionalFinalizer, public WeakReferenceHarvester {
WTF_MAKE_FAST_ALLOCATED;
friend class JIT;
@@ -268,6 +95,13 @@ namespace JSC {
public:
virtual ~CodeBlock();
+
+ int numParameters() const { return m_numParameters; }
+ void setNumParameters(int newValue);
+ void addParameter();
+
+ int* addressOfNumParameters() { return &m_numParameters; }
+ static ptrdiff_t offsetOfNumParameters() { return OBJECT_OFFSETOF(CodeBlock, m_numParameters); }
CodeBlock* alternative() { return m_alternative.get(); }
PassOwnPtr<CodeBlock> releaseAlternative() { return m_alternative.release(); }
@@ -657,12 +491,10 @@ namespace JSC {
#endif
#if ENABLE(VALUE_PROFILER)
- void setArgumentValueProfileSize(unsigned size)
- {
- m_argumentValueProfiles.resize(size);
- }
unsigned numberOfArgumentValueProfiles()
{
+ ASSERT(m_numParameters >= 0);
+ ASSERT(m_argumentValueProfiles.size() == static_cast<unsigned>(m_numParameters));
return m_argumentValueProfiles.size();
}
ValueProfile* valueProfileForArgument(unsigned argumentIndex)
@@ -1131,7 +963,6 @@ namespace JSC {
int m_numCalleeRegisters;
int m_numVars;
int m_numCapturedVars;
- int m_numParameters;
bool m_isConstructor;
// This is public because otherwise we would have many friends.
@@ -1195,6 +1026,8 @@ namespace JSC {
m_rareData = adoptPtr(new RareData);
}
+ int m_numParameters;
+
WriteBarrier<ScriptExecutable> m_ownerExecutable;
JSGlobalData* m_globalData;
diff --git a/Source/JavaScriptCore/bytecode/CodeType.h b/Source/JavaScriptCore/bytecode/CodeType.h
new file mode 100644
index 000000000..03485e564
--- /dev/null
+++ b/Source/JavaScriptCore/bytecode/CodeType.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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.
+ */
+
+#ifndef CodeType_h
+#define CodeType_h
+
+namespace JSC {
+
+enum CodeType { GlobalCode, EvalCode, FunctionCode };
+
+}
+
+#endif // CodeType_h
+
diff --git a/Source/JavaScriptCore/bytecode/ExpressionRangeInfo.h b/Source/JavaScriptCore/bytecode/ExpressionRangeInfo.h
new file mode 100644
index 000000000..f4949a686
--- /dev/null
+++ b/Source/JavaScriptCore/bytecode/ExpressionRangeInfo.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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.
+ */
+
+#ifndef ExpressionRangeInfo_h
+#define ExpressionRangeInfo_h
+
+#include <wtf/StdLibExtras.h>
+
+namespace JSC {
+
+struct ExpressionRangeInfo {
+ enum {
+ MaxOffset = (1 << 7) - 1,
+ MaxDivot = (1 << 25) - 1
+ };
+ uint32_t instructionOffset : 25;
+ uint32_t divotPoint : 25;
+ uint32_t startOffset : 7;
+ uint32_t endOffset : 7;
+};
+
+} // namespace JSC
+
+#endif // ExpressionRangeInfo_h
+
diff --git a/Source/JavaScriptCore/bytecode/GlobalResolveInfo.h b/Source/JavaScriptCore/bytecode/GlobalResolveInfo.h
new file mode 100644
index 000000000..5576cfacd
--- /dev/null
+++ b/Source/JavaScriptCore/bytecode/GlobalResolveInfo.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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.
+ */
+
+#ifndef GlobalResolveInfo_h
+#define GlobalResolveInfo_h
+
+#include "WriteBarrier.h"
+
+namespace JSC {
+
+struct GlobalResolveInfo {
+ GlobalResolveInfo(unsigned bytecodeOffset)
+ : offset(0)
+ , bytecodeOffset(bytecodeOffset)
+ {
+ }
+
+ WriteBarrier<Structure> structure;
+ unsigned offset;
+ unsigned bytecodeOffset;
+};
+
+} // namespace JSC
+
+#endif // GlobalResolveInfo_h
+
diff --git a/Source/JavaScriptCore/bytecode/HandlerInfo.h b/Source/JavaScriptCore/bytecode/HandlerInfo.h
new file mode 100644
index 000000000..8396c9607
--- /dev/null
+++ b/Source/JavaScriptCore/bytecode/HandlerInfo.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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.
+ */
+
+#ifndef HandlerInfo_h
+#define HandlerInfo_h
+
+#include "CodeLocation.h"
+#include <wtf/Platform.h>
+
+namespace JSC {
+
+struct HandlerInfo {
+ uint32_t start;
+ uint32_t end;
+ uint32_t target;
+ uint32_t scopeDepth;
+#if ENABLE(JIT)
+ CodeLocationLabel nativeCode;
+#endif
+};
+
+} // namespace JSC
+
+#endif // HandlerInfo_h
+
diff --git a/Source/JavaScriptCore/bytecode/LineInfo.h b/Source/JavaScriptCore/bytecode/LineInfo.h
new file mode 100644
index 000000000..e9e70138a
--- /dev/null
+++ b/Source/JavaScriptCore/bytecode/LineInfo.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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.
+ */
+
+#ifndef LineInfo_h
+#define LineInfo_h
+
+#include <wtf/StdLibExtras.h>
+
+namespace JSC {
+
+struct LineInfo {
+ uint32_t instructionOffset;
+ int32_t lineNumber;
+};
+
+} // namespace JSC
+
+#endif // LineInfo_h
+
diff --git a/Source/JavaScriptCore/bytecode/MethodCallLinkInfo.cpp b/Source/JavaScriptCore/bytecode/MethodCallLinkInfo.cpp
new file mode 100644
index 000000000..1fcf5850f
--- /dev/null
+++ b/Source/JavaScriptCore/bytecode/MethodCallLinkInfo.cpp
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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 "config.h"
+#include "MethodCallLinkInfo.h"
+
+#if ENABLE(JIT)
+
+#include "JITStubs.h"
+#include "RepatchBuffer.h"
+
+namespace JSC {
+
+void MethodCallLinkInfo::reset(RepatchBuffer& repatchBuffer, JITCode::JITType jitType)
+{
+ cachedStructure.clearToMaxUnsigned();
+ cachedPrototype.clear();
+ cachedPrototypeStructure.clearToMaxUnsigned();
+ cachedFunction.clear();
+
+ ASSERT_UNUSED(jitType, jitType == JITCode::BaselineJIT);
+
+ repatchBuffer.relink(callReturnLocation, cti_op_get_by_id_method_check);
+}
+
+} // namespace JSC
+
+#endif // ENABLE(JIT)
diff --git a/Source/JavaScriptCore/bytecode/MethodCallLinkInfo.h b/Source/JavaScriptCore/bytecode/MethodCallLinkInfo.h
new file mode 100644
index 000000000..2243bc24e
--- /dev/null
+++ b/Source/JavaScriptCore/bytecode/MethodCallLinkInfo.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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.
+ */
+
+#ifndef MethodCallLinkInfo_h
+#define MethodCallLinkInfo_h
+
+#include "CodeLocation.h"
+#include "JITCode.h"
+#include "JITWriteBarrier.h"
+#include <wtf/Platform.h>
+
+namespace JSC {
+
+#if ENABLE(JIT)
+
+class RepatchBuffer;
+
+struct MethodCallLinkInfo {
+ MethodCallLinkInfo()
+ : seen(false)
+ {
+ }
+
+ bool seenOnce()
+ {
+ return seen;
+ }
+
+ void setSeen()
+ {
+ seen = true;
+ }
+
+ void reset(RepatchBuffer&, JITCode::JITType);
+
+ unsigned bytecodeIndex;
+ CodeLocationCall callReturnLocation;
+ JITWriteBarrier<Structure> cachedStructure;
+ JITWriteBarrier<Structure> cachedPrototypeStructure;
+ // We'd like this to actually be JSFunction, but InternalFunction and JSFunction
+ // don't have a common parent class and we allow specialisation on both
+ JITWriteBarrier<JSObject> cachedFunction;
+ JITWriteBarrier<JSObject> cachedPrototype;
+ bool seen;
+};
+
+inline void* getMethodCallLinkInfoReturnLocation(MethodCallLinkInfo* methodCallLinkInfo)
+{
+ return methodCallLinkInfo->callReturnLocation.executableAddress();
+}
+
+inline unsigned getMethodCallLinkInfoBytecodeIndex(MethodCallLinkInfo* methodCallLinkInfo)
+{
+ return methodCallLinkInfo->bytecodeIndex;
+}
+
+#endif // ENABLE(JIT)
+
+} // namespace JSC
+
+#endif // MethodCallLinkInfo_h
diff --git a/Source/JavaScriptCore/bytecode/StructureStubInfo.h b/Source/JavaScriptCore/bytecode/StructureStubInfo.h
index 830b75594..5c7ee0bb8 100644
--- a/Source/JavaScriptCore/bytecode/StructureStubInfo.h
+++ b/Source/JavaScriptCore/bytecode/StructureStubInfo.h
@@ -231,8 +231,18 @@ namespace JSC {
CodeLocationLabel hotPathBegin;
};
+ inline void* getStructureStubInfoReturnLocation(StructureStubInfo* structureStubInfo)
+ {
+ return structureStubInfo->callReturnLocation.executableAddress();
+ }
+
+ inline unsigned getStructureStubInfoBytecodeIndex(StructureStubInfo* structureStubInfo)
+ {
+ return structureStubInfo->bytecodeIndex;
+ }
+
} // namespace JSC
-#endif
+#endif // ENABLE(JIT)
#endif // StructureStubInfo_h
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
index dec5c826e..bfb1618a6 100644
--- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
+++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
@@ -230,7 +230,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, ScopeChainNode* s
// FIXME: Move code that modifies the global object to Interpreter::execute.
- m_codeBlock->m_numParameters = 1; // Allocate space for "this"
+ m_codeBlock->setNumParameters(1); // Allocate space for "this"
codeBlock->m_numCapturedVars = codeBlock->m_numVars;
if (compilationKind == OptimizingCompilation)
@@ -401,7 +401,7 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, ScopeChainN
// Add "this" as a parameter
int nextParameterIndex = CallFrame::thisArgumentOffset();
m_thisRegister.setIndex(nextParameterIndex--);
- ++m_codeBlock->m_numParameters;
+ m_codeBlock->addParameter();
for (size_t i = 0; i < parameters.size(); ++i)
addParameter(parameters[i], nextParameterIndex--);
@@ -459,7 +459,7 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, ScopeChainNode* scopeCh
emitOpcode(op_enter);
codeBlock->setGlobalData(m_globalData);
- m_codeBlock->m_numParameters = 1; // Allocate space for "this"
+ m_codeBlock->setNumParameters(1);
const DeclarationStacks::FunctionStack& functionStack = evalNode->functionStack();
for (size_t i = 0; i < functionStack.size(); ++i)
@@ -500,7 +500,7 @@ void BytecodeGenerator::addParameter(const Identifier& ident, int parameterIndex
// To maintain the calling convention, we have to allocate unique space for
// each parameter, even if the parameter doesn't make it into the symbol table.
- ++m_codeBlock->m_numParameters;
+ m_codeBlock->addParameter();
}
RegisterID* BytecodeGenerator::registerFor(const Identifier& ident)
@@ -1869,7 +1869,7 @@ RegisterID* BytecodeGenerator::emitReturn(RegisterID* src)
emitOpcode(op_tear_off_activation);
instructions().append(m_activationRegister->index());
instructions().append(m_codeBlock->argumentsRegister());
- } else if (m_codeBlock->usesArguments() && m_codeBlock->m_numParameters != 1 && !m_codeBlock->isStrictMode()) {
+ } else if (m_codeBlock->usesArguments() && m_codeBlock->numParameters() != 1 && !m_codeBlock->isStrictMode()) {
emitOpcode(op_tear_off_arguments);
instructions().append(m_codeBlock->argumentsRegister());
}
diff --git a/Source/JavaScriptCore/dfg/DFGAbstractState.cpp b/Source/JavaScriptCore/dfg/DFGAbstractState.cpp
index 40ad857cf..eb00bcb3c 100644
--- a/Source/JavaScriptCore/dfg/DFGAbstractState.cpp
+++ b/Source/JavaScriptCore/dfg/DFGAbstractState.cpp
@@ -51,7 +51,7 @@ namespace JSC { namespace DFG {
AbstractState::AbstractState(CodeBlock* codeBlock, Graph& graph)
: m_codeBlock(codeBlock)
, m_graph(graph)
- , m_variables(codeBlock->m_numParameters, graph.m_localVars)
+ , m_variables(codeBlock->numParameters(), graph.m_localVars)
, m_block(0)
{
size_t maxBlockSize = 0;
diff --git a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
index 3b1f8c860..964618c43 100644
--- a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
+++ b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
@@ -53,7 +53,7 @@ public:
, m_constantNaN(UINT_MAX)
, m_constant1(UINT_MAX)
, m_constants(codeBlock->numberOfConstantRegisters())
- , m_numArguments(codeBlock->m_numParameters)
+ , m_numArguments(codeBlock->numParameters())
, m_numLocals(codeBlock->m_numCalleeRegisters)
, m_preservedVars(codeBlock->m_numVars)
, m_parameterSlots(0)
@@ -2478,7 +2478,7 @@ ByteCodeParser::InlineStackEntry::InlineStackEntry(ByteCodeParser* byteCodeParse
inlineCallFrame.stackOffset = inlineCallFrameStart + RegisterFile::CallFrameHeaderSize;
inlineCallFrame.callee.set(*byteCodeParser->m_globalData, byteCodeParser->m_codeBlock->ownerExecutable(), callee);
inlineCallFrame.caller = byteCodeParser->currentCodeOrigin();
- inlineCallFrame.arguments.resize(codeBlock->m_numParameters); // Set the number of arguments including this, but don't configure the value recoveries, yet.
+ inlineCallFrame.arguments.resize(codeBlock->numParameters()); // Set the number of arguments including this, but don't configure the value recoveries, yet.
inlineCallFrame.isCall = isCall(kind);
byteCodeParser->m_codeBlock->inlineCallFrames().append(inlineCallFrame);
m_inlineCallFrame = &byteCodeParser->m_codeBlock->inlineCallFrames().last();
@@ -2556,9 +2556,9 @@ void ByteCodeParser::parseCodeBlock()
// Either the block is linkable or it isn't. If it's linkable then it's the last
// block in the blockLinkingTargets list. If it's not then the last block will
// have a lower bytecode index that the one we're about to give to this block.
- if (m_inlineStackTop->m_blockLinkingTargets.isEmpty() || m_inlineStackTop->m_blockLinkingTargets.last() != m_currentIndex) {
+ if (m_inlineStackTop->m_blockLinkingTargets.isEmpty() || m_graph.m_blocks[m_inlineStackTop->m_blockLinkingTargets.last()]->bytecodeBegin != m_currentIndex) {
// Make the block linkable.
- ASSERT(m_inlineStackTop->m_blockLinkingTargets.isEmpty() || m_inlineStackTop->m_blockLinkingTargets.last() < m_currentIndex);
+ ASSERT(m_inlineStackTop->m_blockLinkingTargets.isEmpty() || m_graph.m_blocks[m_inlineStackTop->m_blockLinkingTargets.last()]->bytecodeBegin < m_currentIndex);
m_inlineStackTop->m_blockLinkingTargets.append(m_graph.m_blocks.size() - 1);
}
// Change its bytecode begin and continue.
diff --git a/Source/JavaScriptCore/dfg/DFGGraph.cpp b/Source/JavaScriptCore/dfg/DFGGraph.cpp
index 487b69206..2a3e23040 100644
--- a/Source/JavaScriptCore/dfg/DFGGraph.cpp
+++ b/Source/JavaScriptCore/dfg/DFGGraph.cpp
@@ -344,8 +344,8 @@ void Graph::predictArgumentTypes(CodeBlock* codeBlock)
ASSERT(codeBlock->alternative());
CodeBlock* profiledCodeBlock = codeBlock->alternative();
- ASSERT(codeBlock->m_numParameters >= 1);
- for (size_t arg = 0; arg < static_cast<size_t>(codeBlock->m_numParameters); ++arg) {
+ ASSERT(codeBlock->numParameters() >= 1);
+ for (size_t arg = 0; arg < static_cast<size_t>(codeBlock->numParameters()); ++arg) {
ValueProfile* profile = profiledCodeBlock->valueProfileForArgument(arg);
if (!profile)
continue;
diff --git a/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp b/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
index c50b84f7f..593e4d930 100644
--- a/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
+++ b/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
@@ -260,7 +260,7 @@ void JITCompiler::compileFunction(JITCode& entry, MacroAssemblerCodePtr& entryWi
compileEntry();
load32(AssemblyHelpers::payloadFor((VirtualRegister)RegisterFile::ArgumentCount), GPRInfo::regT1);
- branch32(AboveOrEqual, GPRInfo::regT1, Imm32(m_codeBlock->m_numParameters)).linkTo(fromArityCheck, this);
+ branch32(AboveOrEqual, GPRInfo::regT1, Imm32(m_codeBlock->numParameters())).linkTo(fromArityCheck, this);
move(stackPointerRegister, GPRInfo::argumentGPR0);
poke(GPRInfo::callFrameRegister, OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof(void*));
Call callArityCheck = call();
diff --git a/Source/JavaScriptCore/dfg/DFGOperations.cpp b/Source/JavaScriptCore/dfg/DFGOperations.cpp
index 7b4ef3f88..2e6fd9276 100644
--- a/Source/JavaScriptCore/dfg/DFGOperations.cpp
+++ b/Source/JavaScriptCore/dfg/DFGOperations.cpp
@@ -411,9 +411,9 @@ EncodedJSValue DFG_OPERATION operationArrayPush(ExecState* exec, EncodedJSValue
return JSValue::encode(jsNumber(array->length()));
}
-EncodedJSValue DFG_OPERATION operationArrayPop(ExecState*, JSArray* array)
+EncodedJSValue DFG_OPERATION operationArrayPop(ExecState* exec, JSArray* array)
{
- return JSValue::encode(array->pop());
+ return JSValue::encode(array->pop(exec));
}
void DFG_OPERATION operationPutByIdStrict(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, Identifier* propertyName)
@@ -656,7 +656,7 @@ inline void* linkFor(ExecState* execCallee, ReturnAddressPtr returnAddress, Code
return 0;
}
codeBlock = &functionExecutable->generatedBytecodeFor(kind);
- if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->m_numParameters))
+ if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()))
codePtr = functionExecutable->generatedJITCodeWithArityCheckFor(kind);
else
codePtr = functionExecutable->generatedJITCodeFor(kind).addressForCall();
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
index 939fef669..feb705ab8 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
@@ -1070,7 +1070,7 @@ void SpeculativeJIT::checkArgumentTypes()
for (size_t i = 0; i < m_variables.size(); ++i)
m_variables[i] = ValueSource(ValueInRegisterFile);
- for (int i = 0; i < m_jit.codeBlock()->m_numParameters; ++i) {
+ for (int i = 0; i < m_jit.codeBlock()->numParameters(); ++i) {
VariableAccessData* variableAccessData = at(m_jit.graph().m_arguments[i]).variableAccessData();
VirtualRegister virtualRegister = variableAccessData->local();
PredictedType predictedType = variableAccessData->prediction();
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
index da48d3a2c..3b709400d 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
@@ -2744,7 +2744,7 @@ inline SpeculativeJIT::SpeculativeJIT(JITCompiler& jit)
, m_compileIndex(0)
, m_generationInfo(m_jit.codeBlock()->m_numCalleeRegisters)
, m_blockHeads(jit.graph().m_blocks.size())
- , m_arguments(jit.codeBlock()->m_numParameters)
+ , m_arguments(jit.codeBlock()->numParameters())
, m_variables(jit.graph().m_localVars)
, m_lastSetOperand(std::numeric_limits<int>::max())
, m_state(m_jit.codeBlock(), m_jit.graph())
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
index bbe6171eb..d6a82b1cc 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
@@ -3203,7 +3203,7 @@ void SpeculativeJIT::compile(Node& node)
GPRReg resultGPR = result.gpr();
m_jit.loadPtr(MacroAssembler::Address(baseGPR, JSByteArray::offsetOfStorage()), resultGPR);
- m_jit.load32(MacroAssembler::Address(baseGPR, ByteArray::offsetOfSize()), resultGPR);
+ m_jit.load32(MacroAssembler::Address(resultGPR, ByteArray::offsetOfSize()), resultGPR);
integerResult(resultGPR, m_compileIndex);
break;
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
index c6586a679..7e36165f3 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
@@ -3198,7 +3198,7 @@ void SpeculativeJIT::compile(Node& node)
speculationCheck(BadType, JSValueRegs(baseGPR), node.child1(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(baseGPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(&JSByteArray::s_info)));
m_jit.loadPtr(MacroAssembler::Address(baseGPR, JSByteArray::offsetOfStorage()), resultGPR);
- m_jit.load32(MacroAssembler::Address(baseGPR, ByteArray::offsetOfSize()), resultGPR);
+ m_jit.load32(MacroAssembler::Address(resultGPR, ByteArray::offsetOfSize()), resultGPR);
integerResult(resultGPR, m_compileIndex);
break;
diff --git a/Source/JavaScriptCore/interpreter/Interpreter.cpp b/Source/JavaScriptCore/interpreter/Interpreter.cpp
index 38befcd4f..980bf8a1a 100644
--- a/Source/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/Source/JavaScriptCore/interpreter/Interpreter.cpp
@@ -370,16 +370,16 @@ NEVER_INLINE bool Interpreter::resolveThisAndProperty(CallFrame* callFrame, Inst
ALWAYS_INLINE CallFrame* Interpreter::slideRegisterWindowForCall(CodeBlock* newCodeBlock, RegisterFile* registerFile, CallFrame* callFrame, size_t registerOffset, int argumentCountIncludingThis)
{
// This ensures enough space for the worst case scenario of zero arguments passed by the caller.
- if (!registerFile->grow(callFrame->registers() + registerOffset + newCodeBlock->m_numParameters + newCodeBlock->m_numCalleeRegisters))
+ if (!registerFile->grow(callFrame->registers() + registerOffset + newCodeBlock->numParameters() + newCodeBlock->m_numCalleeRegisters))
return 0;
- if (argumentCountIncludingThis >= newCodeBlock->m_numParameters) {
+ if (argumentCountIncludingThis >= newCodeBlock->numParameters()) {
Register* newCallFrame = callFrame->registers() + registerOffset;
return CallFrame::create(newCallFrame);
}
// Too few arguments -- copy arguments, then fill in missing arguments with undefined.
- size_t delta = newCodeBlock->m_numParameters - argumentCountIncludingThis;
+ size_t delta = newCodeBlock->numParameters() - argumentCountIncludingThis;
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() + registerOffset + delta);
Register* dst = &newCallFrame->uncheckedR(CallFrame::thisArgumentOffset());
@@ -556,7 +556,6 @@ void Interpreter::initialize(bool canUseJIT)
for (int i = 0; i < numOpcodeIDs; ++i) {
Opcode opcode = bitwise_cast<void*>(static_cast<uintptr_t>(i));
m_opcodeTable[i] = opcode;
- m_opcodeIDTable.add(opcode, static_cast<OpcodeID>(i));
}
} else {
privateExecute(InitializeAndReturn, 0, 0);
@@ -603,14 +602,14 @@ void Interpreter::dumpRegisters(CallFrame* callFrame)
const Register* end;
JSValue v;
- it = callFrame->registers() - RegisterFile::CallFrameHeaderSize - codeBlock->m_numParameters;
+ it = callFrame->registers() - RegisterFile::CallFrameHeaderSize - codeBlock->numParameters();
v = (*it).jsValue();
#if USE(JSVALUE32_64)
printf("[this] | %10p | %-16s 0x%llx \n", it, v.description(), JSValue::encode(v)); ++it;
#else
printf("[this] | %10p | %-16s %p \n", it, v.description(), JSValue::encode(v)); ++it;
#endif
- end = it + max(codeBlock->m_numParameters - 1, 0); // - 1 to skip "this"
+ end = it + max(codeBlock->numParameters() - 1, 0); // - 1 to skip "this"
if (it != end) {
do {
v = (*it).jsValue();
@@ -669,6 +668,8 @@ void Interpreter::dumpRegisters(CallFrame* callFrame)
bool Interpreter::isOpcode(Opcode opcode)
{
#if ENABLE(COMPUTED_GOTO_INTERPRETER)
+ if (!m_enabled)
+ return opcode >= 0 && static_cast<OpcodeID>(bitwise_cast<uintptr_t>(opcode)) <= op_end;
return opcode != HashTraits<Opcode>::emptyValue()
&& !HashTraits<Opcode>::isDeletedValue(opcode)
&& m_opcodeIDTable.contains(opcode);
@@ -984,13 +985,13 @@ failedJSONP:
CodeBlock* codeBlock = &program->generatedBytecode();
Register* oldEnd = m_registerFile.end();
- Register* newEnd = oldEnd + codeBlock->m_numParameters + RegisterFile::CallFrameHeaderSize + codeBlock->m_numCalleeRegisters;
+ Register* newEnd = oldEnd + codeBlock->numParameters() + RegisterFile::CallFrameHeaderSize + codeBlock->m_numCalleeRegisters;
if (!m_registerFile.grow(newEnd))
return checkedReturn(throwStackOverflowError(callFrame));
- CallFrame* newCallFrame = CallFrame::create(oldEnd + codeBlock->m_numParameters + RegisterFile::CallFrameHeaderSize);
- ASSERT(codeBlock->m_numParameters == 1); // 1 parameter for 'this'.
- newCallFrame->init(codeBlock, 0, scopeChain, CallFrame::noCaller(), codeBlock->m_numParameters, 0);
+ CallFrame* newCallFrame = CallFrame::create(oldEnd + codeBlock->numParameters() + RegisterFile::CallFrameHeaderSize);
+ ASSERT(codeBlock->numParameters() == 1); // 1 parameter for 'this'.
+ newCallFrame->init(codeBlock, 0, scopeChain, CallFrame::noCaller(), codeBlock->numParameters(), 0);
newCallFrame->setThisValue(thisObj);
TopCallFrameSetter topCallFrame(callFrame->globalData(), newCallFrame);
@@ -1255,7 +1256,7 @@ CallFrameClosure Interpreter::prepareForRepeatCall(FunctionExecutable* functionE
}
newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), argumentCountIncludingThis, function);
scopeChain->globalData->topCallFrame = newCallFrame;
- CallFrameClosure result = { callFrame, newCallFrame, function, functionExecutable, scopeChain->globalData, oldEnd, scopeChain, codeBlock->m_numParameters, argumentCountIncludingThis };
+ CallFrameClosure result = { callFrame, newCallFrame, function, functionExecutable, scopeChain->globalData, oldEnd, scopeChain, codeBlock->numParameters(), argumentCountIncludingThis };
return result;
}
@@ -1366,8 +1367,8 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSValue
CallFrame* newCallFrame = CallFrame::create(m_registerFile.begin() + globalRegisterOffset);
- ASSERT(codeBlock->m_numParameters == 1); // 1 parameter for 'this'.
- newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), codeBlock->m_numParameters, 0);
+ ASSERT(codeBlock->numParameters() == 1); // 1 parameter for 'this'.
+ newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), codeBlock->numParameters(), 0);
newCallFrame->setThisValue(thisValue);
TopCallFrameSetter topCallFrame(callFrame->globalData(), newCallFrame);
diff --git a/Source/JavaScriptCore/interpreter/Interpreter.h b/Source/JavaScriptCore/interpreter/Interpreter.h
index 368fa27f2..6dfd331f8 100644
--- a/Source/JavaScriptCore/interpreter/Interpreter.h
+++ b/Source/JavaScriptCore/interpreter/Interpreter.h
@@ -114,11 +114,9 @@ namespace JSC {
ASSERT(m_initialized);
#if ENABLE(COMPUTED_GOTO_INTERPRETER)
ASSERT(isOpcode(opcode));
- if (!m_enabled) {
- OpcodeID result = static_cast<OpcodeID>(bitwise_cast<uintptr_t>(opcode));
- ASSERT(result == m_opcodeIDTable.get(opcode));
- return result;
- }
+ if (!m_enabled)
+ return static_cast<OpcodeID>(bitwise_cast<uintptr_t>(opcode));
+
return m_opcodeIDTable.get(opcode);
#else
return opcode;
diff --git a/Source/JavaScriptCore/jit/JIT.cpp b/Source/JavaScriptCore/jit/JIT.cpp
index 4a6e3fb3d..025b5b706 100644
--- a/Source/JavaScriptCore/jit/JIT.cpp
+++ b/Source/JavaScriptCore/jit/JIT.cpp
@@ -557,8 +557,7 @@ JITCode JIT::privateCompile(CodePtr* functionEntryArityCheck)
#if ENABLE(VALUE_PROFILER)
ASSERT(m_bytecodeOffset == (unsigned)-1);
if (shouldEmitProfiling()) {
- m_codeBlock->setArgumentValueProfileSize(m_codeBlock->m_numParameters);
- for (int argument = 0; argument < m_codeBlock->m_numParameters; ++argument) {
+ for (int argument = 0; argument < m_codeBlock->numParameters(); ++argument) {
// If this is a constructor, then we want to put in a dummy profiling site (to
// keep things consistent) but we don't actually want to record the dummy value.
if (m_codeBlock->m_isConstructor && !argument)
diff --git a/Source/JavaScriptCore/jit/JITExceptions.cpp b/Source/JavaScriptCore/jit/JITExceptions.cpp
new file mode 100644
index 000000000..24baca41b
--- /dev/null
+++ b/Source/JavaScriptCore/jit/JITExceptions.cpp
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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 "config.h"
+#include "JITExceptions.h"
+
+#include "CallFrame.h"
+#include "CodeBlock.h"
+#include "Interpreter.h"
+#include "JSGlobalData.h"
+#include "JSValue.h"
+
+#if ENABLE(ASSEMBLER)
+
+namespace JSC {
+
+ExceptionHandler genericThrow(JSGlobalData* globalData, ExecState* callFrame, JSValue exceptionValue, unsigned vPCIndex)
+{
+ ASSERT(exceptionValue);
+
+ globalData->exception = JSValue();
+ HandlerInfo* handler = globalData->interpreter->throwException(callFrame, exceptionValue, vPCIndex); // This may update callFrame & exceptionValue!
+ globalData->exception = exceptionValue;
+
+ void* catchRoutine;
+ Instruction* catchPCForInterpreter = 0;
+ if (handler) {
+ catchRoutine = handler->nativeCode.executableAddress();
+ if (callFrame->codeBlock()->hasInstructions())
+ catchPCForInterpreter = &callFrame->codeBlock()->instructions()[handler->target];
+ } else
+ catchRoutine = FunctionPtr(ctiOpThrowNotCaught).value();
+
+ globalData->callFrameForThrow = callFrame;
+ globalData->targetMachinePCForThrow = catchRoutine;
+ globalData->targetInterpreterPCForThrow = catchPCForInterpreter;
+
+ ASSERT(catchRoutine);
+ ExceptionHandler exceptionHandler = { catchRoutine, callFrame };
+ return exceptionHandler;
+}
+
+ExceptionHandler jitThrow(JSGlobalData* globalData, ExecState* callFrame, JSValue exceptionValue, ReturnAddressPtr faultLocation)
+{
+ return genericThrow(globalData, callFrame, exceptionValue, callFrame->codeBlock()->bytecodeOffset(faultLocation));
+}
+
+}
+
+#endif
diff --git a/Source/JavaScriptCore/jit/JITExceptions.h b/Source/JavaScriptCore/jit/JITExceptions.h
new file mode 100644
index 000000000..59ded187d
--- /dev/null
+++ b/Source/JavaScriptCore/jit/JITExceptions.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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.
+ */
+
+#ifndef JITExceptions_h
+#define JITExceptions_h
+
+#include "JSValue.h"
+#include "MacroAssemblerCodeRef.h"
+
+#if ENABLE(ASSEMBLER)
+
+namespace JSC {
+
+class ExecState;
+class JSGlobalData;
+
+// This header gives other parts of the system access to the JIT's prototocol
+// for the throwing and handling exceptions.
+
+struct ExceptionHandler {
+ void* catchRoutine;
+ ExecState* callFrame;
+};
+
+ExceptionHandler genericThrow(JSGlobalData*, ExecState*, JSValue exceptionValue, unsigned vPCIndex);
+
+ExceptionHandler jitThrow(JSGlobalData*, ExecState*, JSValue exceptionValue, ReturnAddressPtr faultLocation);
+
+} // namespace JSC
+
+#endif
+
+#endif // JITExceptions_h
+
diff --git a/Source/JavaScriptCore/jit/JITStubs.cpp b/Source/JavaScriptCore/jit/JITStubs.cpp
index eda8c8fba..3c16efe01 100644
--- a/Source/JavaScriptCore/jit/JITStubs.cpp
+++ b/Source/JavaScriptCore/jit/JITStubs.cpp
@@ -33,6 +33,7 @@
#if ENABLE(JIT)
#include "JITStubs.h"
+#include "CommonSlowPaths.h"
#include "Arguments.h"
#include "CallFrame.h"
#include "CodeBlock.h"
@@ -43,6 +44,7 @@
#include "Heap.h"
#include "InlineASM.h"
#include "JIT.h"
+#include "JITExceptions.h"
#include "JSActivation.h"
#include "JSArray.h"
#include "JSByteArray.h"
@@ -1032,26 +1034,6 @@ static NEVER_INLINE void returnToThrowTrampoline(JSGlobalData* globalData, Retur
} \
} while (0)
-struct ExceptionHandler {
- void* catchRoutine;
- CallFrame* callFrame;
-};
-
-static ExceptionHandler jitThrow(JSGlobalData* globalData, CallFrame* callFrame, JSValue exceptionValue, ReturnAddressPtr faultLocation)
-{
- ASSERT(exceptionValue);
-
- unsigned vPCIndex = callFrame->codeBlock()->bytecodeOffset(faultLocation);
- globalData->exception = JSValue();
- HandlerInfo* handler = globalData->interpreter->throwException(callFrame, exceptionValue, vPCIndex); // This may update callFrame & exceptionValue!
- globalData->exception = exceptionValue;
-
- void* catchRoutine = handler ? handler->nativeCode.executableAddress() : FunctionPtr(ctiOpThrowNotCaught).value();
- ASSERT(catchRoutine);
- ExceptionHandler exceptionHandler = { catchRoutine, callFrame };
- return exceptionHandler;
-}
-
// Helper function for JIT stubs that may throw an exception in the middle of
// processing a function call. This function rolls back the register file to
// our caller, so exception processing can proceed from a valid state.
@@ -2088,29 +2070,10 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_instanceof)
JSValue value = stackFrame.args[0].jsValue();
JSValue baseVal = stackFrame.args[1].jsValue();
JSValue proto = stackFrame.args[2].jsValue();
-
- // At least one of these checks must have failed to get to the slow case.
- ASSERT(!value.isCell() || !baseVal.isCell() || !proto.isCell()
- || !value.isObject() || !baseVal.isObject() || !proto.isObject()
- || !asObject(baseVal)->structure()->typeInfo().implementsDefaultHasInstance());
-
-
- // ECMA-262 15.3.5.3:
- // Throw an exception either if baseVal is not an object, or if it does not implement 'HasInstance' (i.e. is a function).
- TypeInfo typeInfo(UnspecifiedType);
- if (!baseVal.isObject() || !(typeInfo = asObject(baseVal)->structure()->typeInfo()).implementsHasInstance()) {
- stackFrame.globalData->exception = createInvalidParamError(stackFrame.callFrame, "instanceof", baseVal);
- VM_THROW_EXCEPTION();
- }
- ASSERT(typeInfo.type() != UnspecifiedType);
-
- if (!typeInfo.overridesHasInstance() && !value.isObject())
- return JSValue::encode(jsBoolean(false));
-
- JSValue result = jsBoolean(asObject(baseVal)->methodTable()->hasInstance(asObject(baseVal), callFrame, value, proto));
+
+ bool result = CommonSlowPaths::opInstanceOfSlow(callFrame, value, baseVal, proto);
CHECK_FOR_EXCEPTION_AT_END();
-
- return JSValue::encode(result);
+ return JSValue::encode(jsBoolean(result));
}
DEFINE_STUB_FUNCTION(EncodedJSValue, op_del_by_id)
@@ -2209,13 +2172,13 @@ inline CallFrame* arityCheckFor(CallFrame* callFrame, RegisterFile* registerFile
int argumentCountIncludingThis = callFrame->argumentCountIncludingThis();
// This ensures enough space for the worst case scenario of zero arguments passed by the caller.
- if (!registerFile->grow(callFrame->registers() + newCodeBlock->m_numParameters + newCodeBlock->m_numCalleeRegisters))
+ if (!registerFile->grow(callFrame->registers() + newCodeBlock->numParameters() + newCodeBlock->m_numCalleeRegisters))
return 0;
- ASSERT(argumentCountIncludingThis < newCodeBlock->m_numParameters);
+ ASSERT(argumentCountIncludingThis < newCodeBlock->numParameters());
// Too few arguments -- copy call frame and arguments, then fill in missing arguments with undefined.
- size_t delta = newCodeBlock->m_numParameters - argumentCountIncludingThis;
+ size_t delta = newCodeBlock->numParameters() - argumentCountIncludingThis;
Register* src = callFrame->registers();
Register* dst = callFrame->registers() + delta;
@@ -2276,7 +2239,7 @@ inline void* lazyLinkFor(CallFrame* callFrame, CodeSpecializationKind kind)
if (error)
return 0;
codeBlock = &functionExecutable->generatedBytecodeFor(kind);
- if (callFrame->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->m_numParameters)
+ if (callFrame->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters())
|| callLinkInfo->callType == CallLinkInfo::CallVarargs)
codePtr = functionExecutable->generatedJITCodeWithArityCheckFor(kind);
else
@@ -2424,25 +2387,10 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve)
STUB_INIT_STACK_FRAME(stackFrame);
CallFrame* callFrame = stackFrame.callFrame;
- ScopeChainNode* scopeChain = callFrame->scopeChain();
- ScopeChainIterator iter = scopeChain->begin();
- ScopeChainIterator end = scopeChain->end();
- ASSERT(iter != end);
-
- Identifier& ident = stackFrame.args[0].identifier();
- do {
- JSObject* o = iter->get();
- PropertySlot slot(o);
- if (o->getPropertySlot(callFrame, ident, slot)) {
- JSValue result = slot.getValue(callFrame, ident);
- CHECK_FOR_EXCEPTION_AT_END();
- return JSValue::encode(result);
- }
- } while (++iter != end);
-
- stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident);
- VM_THROW_EXCEPTION();
+ JSValue result = CommonSlowPaths::opResolve(callFrame, stackFrame.args[0].identifier());
+ CHECK_FOR_EXCEPTION_AT_END();
+ return JSValue::encode(result);
}
DEFINE_STUB_FUNCTION(EncodedJSValue, op_construct_NotJSConstruct)
@@ -2784,38 +2732,9 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve_skip)
{
STUB_INIT_STACK_FRAME(stackFrame);
- CallFrame* callFrame = stackFrame.callFrame;
- ScopeChainNode* scopeChain = callFrame->scopeChain();
-
- int skip = stackFrame.args[1].int32();
-
- ScopeChainIterator iter = scopeChain->begin();
- ScopeChainIterator end = scopeChain->end();
- ASSERT(iter != end);
- CodeBlock* codeBlock = callFrame->codeBlock();
- bool checkTopLevel = codeBlock->codeType() == FunctionCode && codeBlock->needsFullScopeChain();
- ASSERT(skip || !checkTopLevel);
- if (checkTopLevel && skip--) {
- if (callFrame->uncheckedR(codeBlock->activationRegister()).jsValue())
- ++iter;
- }
- while (skip--) {
- ++iter;
- ASSERT(iter != end);
- }
- Identifier& ident = stackFrame.args[0].identifier();
- do {
- JSObject* o = iter->get();
- PropertySlot slot(o);
- if (o->getPropertySlot(callFrame, ident, slot)) {
- JSValue result = slot.getValue(callFrame, ident);
- CHECK_FOR_EXCEPTION_AT_END();
- return JSValue::encode(result);
- }
- } while (++iter != end);
-
- stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident);
- VM_THROW_EXCEPTION();
+ JSValue result = CommonSlowPaths::opResolveSkip(stackFrame.callFrame, stackFrame.args[0].identifier(), stackFrame.args[1].int32());
+ CHECK_FOR_EXCEPTION_AT_END();
+ return JSValue::encode(result);
}
DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve_global)
@@ -3143,33 +3062,9 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve_with_base)
STUB_INIT_STACK_FRAME(stackFrame);
CallFrame* callFrame = stackFrame.callFrame;
- ScopeChainNode* scopeChain = callFrame->scopeChain();
-
- ScopeChainIterator iter = scopeChain->begin();
- ScopeChainIterator end = scopeChain->end();
-
- // FIXME: add scopeDepthIsZero optimization
-
- ASSERT(iter != end);
-
- Identifier& ident = stackFrame.args[0].identifier();
- JSObject* base;
- do {
- base = iter->get();
- PropertySlot slot(base);
- if (base->getPropertySlot(callFrame, ident, slot)) {
- JSValue result = slot.getValue(callFrame, ident);
- CHECK_FOR_EXCEPTION_AT_END();
-
- callFrame->registers()[stackFrame.args[1].int32()] = JSValue(base);
- return JSValue::encode(result);
- }
- ++iter;
- } while (iter != end);
-
- stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident);
- VM_THROW_EXCEPTION_AT_END();
- return JSValue::encode(JSValue());
+ JSValue result = CommonSlowPaths::opResolveWithBase(callFrame, stackFrame.args[0].identifier(), callFrame->registers()[stackFrame.args[1].int32()]);
+ CHECK_FOR_EXCEPTION_AT_END();
+ return JSValue::encode(result);
}
DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve_with_this)
@@ -3177,41 +3072,9 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve_with_this)
STUB_INIT_STACK_FRAME(stackFrame);
CallFrame* callFrame = stackFrame.callFrame;
- ScopeChainNode* scopeChain = callFrame->scopeChain();
-
- ScopeChainIterator iter = scopeChain->begin();
- ScopeChainIterator end = scopeChain->end();
-
- // FIXME: add scopeDepthIsZero optimization
-
- ASSERT(iter != end);
-
- Identifier& ident = stackFrame.args[0].identifier();
- JSObject* base;
- do {
- base = iter->get();
- ++iter;
- PropertySlot slot(base);
- if (base->getPropertySlot(callFrame, ident, slot)) {
- JSValue result = slot.getValue(callFrame, ident);
- CHECK_FOR_EXCEPTION_AT_END();
-
- // All entries on the scope chain should be EnvironmentRecords (activations etc),
- // other then 'with' object, which are directly referenced from the scope chain,
- // and the global object. If we hit either an EnvironmentRecord or a global
- // object at the end of the scope chain, this is undefined. If we hit a non-
- // EnvironmentRecord within the scope chain, pass the base as the this value.
- if (iter == end || base->structure()->typeInfo().isEnvironmentRecord())
- callFrame->registers()[stackFrame.args[1].int32()] = jsUndefined();
- else
- callFrame->registers()[stackFrame.args[1].int32()] = JSValue(base);
- return JSValue::encode(result);
- }
- } while (iter != end);
-
- stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident);
- VM_THROW_EXCEPTION_AT_END();
- return JSValue::encode(JSValue());
+ JSValue result = CommonSlowPaths::opResolveWithThis(callFrame, stackFrame.args[0].identifier(), callFrame->registers()[stackFrame.args[1].int32()]);
+ CHECK_FOR_EXCEPTION_AT_END();
+ return JSValue::encode(result);
}
DEFINE_STUB_FUNCTION(JSObject*, op_new_func_exp)
diff --git a/Source/JavaScriptCore/jit/JITStubs.h b/Source/JavaScriptCore/jit/JITStubs.h
index dfaa3b113..241ace968 100644
--- a/Source/JavaScriptCore/jit/JITStubs.h
+++ b/Source/JavaScriptCore/jit/JITStubs.h
@@ -269,6 +269,8 @@ namespace JSC {
#define JIT_STUB __fastcall
#elif COMPILER(GCC)
#define JIT_STUB __attribute__ ((fastcall))
+ #elif COMPILER(SUNCC)
+ #define JIT_STUB
#else
#error "JIT_STUB function calls require fastcall conventions on x86, add appropriate directive/attribute here for your compiler!"
#endif
diff --git a/Source/JavaScriptCore/parser/Parser.cpp b/Source/JavaScriptCore/parser/Parser.cpp
index 7fb285a6b..5c2f0383f 100644
--- a/Source/JavaScriptCore/parser/Parser.cpp
+++ b/Source/JavaScriptCore/parser/Parser.cpp
@@ -30,7 +30,6 @@
#include "Lexer.h"
#include "NodeInfo.h"
#include "SourceProvider.h"
-#include "SourceProviderCacheItem.h"
#include <utility>
#include <wtf/HashFunctions.h>
#include <wtf/OwnPtr.h>
diff --git a/Source/JavaScriptCore/parser/SourceProviderCache.cpp b/Source/JavaScriptCore/parser/SourceProviderCache.cpp
index afeec5283..ad1cbe02e 100644
--- a/Source/JavaScriptCore/parser/SourceProviderCache.cpp
+++ b/Source/JavaScriptCore/parser/SourceProviderCache.cpp
@@ -26,8 +26,6 @@
#include "config.h"
#include "SourceProviderCache.h"
-#include "SourceProviderCacheItem.h"
-
namespace JSC {
SourceProviderCache::~SourceProviderCache()
@@ -37,7 +35,6 @@ SourceProviderCache::~SourceProviderCache()
void SourceProviderCache::clear()
{
- deleteAllValues(m_map);
m_map.clear();
m_contentByteSize = 0;
}
@@ -49,7 +46,7 @@ unsigned SourceProviderCache::byteSize() const
void SourceProviderCache::add(int sourcePosition, PassOwnPtr<SourceProviderCacheItem> item, unsigned size)
{
- m_map.add(sourcePosition, item.leakPtr());
+ m_map.add(sourcePosition, item);
m_contentByteSize += size;
}
diff --git a/Source/JavaScriptCore/parser/SourceProviderCache.h b/Source/JavaScriptCore/parser/SourceProviderCache.h
index c7f332d38..e94230d10 100644
--- a/Source/JavaScriptCore/parser/SourceProviderCache.h
+++ b/Source/JavaScriptCore/parser/SourceProviderCache.h
@@ -26,13 +26,13 @@
#ifndef SourceProviderCache_h
#define SourceProviderCache_h
+#include "SourceProviderCacheItem.h"
#include <wtf/HashMap.h>
+#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
namespace JSC {
-class SourceProviderCacheItem;
-
class SourceProviderCache {
public:
SourceProviderCache() : m_contentByteSize(0) {}
@@ -44,7 +44,7 @@ public:
const SourceProviderCacheItem* get(int sourcePosition) const { return m_map.get(sourcePosition); }
private:
- HashMap<int, SourceProviderCacheItem*> m_map;
+ HashMap<int, OwnPtr<SourceProviderCacheItem> > m_map;
unsigned m_contentByteSize;
};
diff --git a/Source/JavaScriptCore/runtime/ArrayPrototype.cpp b/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
index d972693dd..dcf7a2fae 100644
--- a/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
+++ b/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
@@ -380,7 +380,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncConcat(ExecState* exec)
curArg = (exec->argument(i));
++i;
}
- arr->setLength(n);
+ arr->setLength(exec, n);
return JSValue::encode(arr);
}
@@ -389,7 +389,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncPop(ExecState* exec)
JSValue thisValue = exec->hostThisValue();
if (isJSArray(thisValue))
- return JSValue::encode(asArray(thisValue)->pop());
+ return JSValue::encode(asArray(thisValue)->pop(exec));
JSObject* thisObj = thisValue.toObject(exec);
unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
@@ -523,7 +523,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncSlice(ExecState* exec)
if (v)
resObj->methodTable()->putByIndex(resObj, exec, n, v);
}
- resObj->setLength(n);
+ resObj->setLength(exec, n);
return JSValue::encode(result);
}
diff --git a/Source/JavaScriptCore/runtime/CommonSlowPaths.h b/Source/JavaScriptCore/runtime/CommonSlowPaths.h
new file mode 100644
index 000000000..ab4de7da8
--- /dev/null
+++ b/Source/JavaScriptCore/runtime/CommonSlowPaths.h
@@ -0,0 +1,204 @@
+/*
+ * Copyright (C) 2011, 2012 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. ``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
+ * 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.
+ */
+
+#ifndef CommonSlowPaths_h
+#define CommonSlowPaths_h
+
+#include "CodeBlock.h"
+#include "ExceptionHelpers.h"
+#include "JSArray.h"
+
+namespace JSC {
+
+// The purpose of this namespace is to include slow paths that are shared
+// between the interpreter and baseline JIT. They are written to be agnostic
+// with respect to the slow-path calling convention, but they do rely on the
+// JS code being executed more-or-less directly from bytecode (so the call
+// frame layout is unmodified, making it potentially awkward to use these
+// from any optimizing JIT, like the DFG).
+
+namespace CommonSlowPaths {
+
+ALWAYS_INLINE bool opInstanceOfSlow(ExecState* exec, JSValue value, JSValue baseVal, JSValue proto)
+{
+ ASSERT(!value.isCell() || !baseVal.isCell() || !proto.isCell()
+ || !value.isObject() || !baseVal.isObject() || !proto.isObject()
+ || !asObject(baseVal)->structure()->typeInfo().implementsDefaultHasInstance());
+
+
+ // ECMA-262 15.3.5.3:
+ // Throw an exception either if baseVal is not an object, or if it does not implement 'HasInstance' (i.e. is a function).
+ TypeInfo typeInfo(UnspecifiedType);
+ if (!baseVal.isObject() || !(typeInfo = asObject(baseVal)->structure()->typeInfo()).implementsHasInstance()) {
+ exec->globalData().exception = createInvalidParamError(exec, "instanceof", baseVal);
+ return false;
+ }
+ ASSERT(typeInfo.type() != UnspecifiedType);
+
+ if (!typeInfo.overridesHasInstance() && !value.isObject())
+ return false;
+
+ return asObject(baseVal)->methodTable()->hasInstance(asObject(baseVal), exec, value, proto);
+}
+
+inline bool opIn(ExecState* exec, JSValue propName, JSValue baseVal)
+{
+ if (!baseVal.isObject()) {
+ exec->globalData().exception = createInvalidParamError(exec, "in", baseVal);
+ return false;
+ }
+
+ JSObject* baseObj = asObject(baseVal);
+
+ uint32_t i;
+ if (propName.getUInt32(i))
+ return baseObj->hasProperty(exec, i);
+
+ Identifier property(exec, propName.toString(exec));
+ if (exec->globalData().exception)
+ return false;
+ return baseObj->hasProperty(exec, property);
+}
+
+ALWAYS_INLINE JSValue opResolve(ExecState* exec, Identifier& ident)
+{
+ ScopeChainNode* scopeChain = exec->scopeChain();
+
+ ScopeChainIterator iter = scopeChain->begin();
+ ScopeChainIterator end = scopeChain->end();
+ ASSERT(iter != end);
+
+ do {
+ JSObject* o = iter->get();
+ PropertySlot slot(o);
+ if (o->getPropertySlot(exec, ident, slot))
+ return slot.getValue(exec, ident);
+ } while (++iter != end);
+
+ exec->globalData().exception = createUndefinedVariableError(exec, ident);
+ return JSValue();
+}
+
+ALWAYS_INLINE JSValue opResolveSkip(ExecState* exec, Identifier& ident, int skip)
+{
+ ScopeChainNode* scopeChain = exec->scopeChain();
+
+ ScopeChainIterator iter = scopeChain->begin();
+ ScopeChainIterator end = scopeChain->end();
+ ASSERT(iter != end);
+ CodeBlock* codeBlock = exec->codeBlock();
+ bool checkTopLevel = codeBlock->codeType() == FunctionCode && codeBlock->needsFullScopeChain();
+ ASSERT(skip || !checkTopLevel);
+ if (checkTopLevel && skip--) {
+ if (exec->uncheckedR(codeBlock->activationRegister()).jsValue())
+ ++iter;
+ }
+ while (skip--) {
+ ++iter;
+ ASSERT(iter != end);
+ }
+ do {
+ JSObject* o = iter->get();
+ PropertySlot slot(o);
+ if (o->getPropertySlot(exec, ident, slot))
+ return slot.getValue(exec, ident);
+ } while (++iter != end);
+
+ exec->globalData().exception = createUndefinedVariableError(exec, ident);
+ return JSValue();
+}
+
+ALWAYS_INLINE JSValue opResolveWithBase(ExecState* exec, Identifier& ident, Register& baseSlot)
+{
+ ScopeChainNode* scopeChain = exec->scopeChain();
+
+ ScopeChainIterator iter = scopeChain->begin();
+ ScopeChainIterator end = scopeChain->end();
+
+ // FIXME: add scopeDepthIsZero optimization
+
+ ASSERT(iter != end);
+
+ JSObject* base;
+ do {
+ base = iter->get();
+ PropertySlot slot(base);
+ if (base->getPropertySlot(exec, ident, slot)) {
+ JSValue result = slot.getValue(exec, ident);
+ if (exec->globalData().exception)
+ return JSValue();
+
+ baseSlot = JSValue(base);
+ return result;
+ }
+ ++iter;
+ } while (iter != end);
+
+ exec->globalData().exception = createUndefinedVariableError(exec, ident);
+ return JSValue();
+}
+
+ALWAYS_INLINE JSValue opResolveWithThis(ExecState* exec, Identifier& ident, Register& baseSlot)
+{
+ ScopeChainNode* scopeChain = exec->scopeChain();
+
+ ScopeChainIterator iter = scopeChain->begin();
+ ScopeChainIterator end = scopeChain->end();
+
+ // FIXME: add scopeDepthIsZero optimization
+
+ ASSERT(iter != end);
+
+ JSObject* base;
+ do {
+ base = iter->get();
+ ++iter;
+ PropertySlot slot(base);
+ if (base->getPropertySlot(exec, ident, slot)) {
+ JSValue result = slot.getValue(exec, ident);
+ if (exec->globalData().exception)
+ return JSValue();
+
+ // All entries on the scope chain should be EnvironmentRecords (activations etc),
+ // other then 'with' object, which are directly referenced from the scope chain,
+ // and the global object. If we hit either an EnvironmentRecord or a global
+ // object at the end of the scope chain, this is undefined. If we hit a non-
+ // EnvironmentRecord within the scope chain, pass the base as the this value.
+ if (iter == end || base->structure()->typeInfo().isEnvironmentRecord())
+ baseSlot = jsUndefined();
+ else
+ baseSlot = JSValue(base);
+ return result;
+ }
+ } while (iter != end);
+
+ exec->globalData().exception = createUndefinedVariableError(exec, ident);
+ return JSValue();
+}
+
+} } // namespace JSC::CommonSlowPaths
+
+#endif // CommonSlowPaths_h
+
diff --git a/Source/JavaScriptCore/runtime/Executable.cpp b/Source/JavaScriptCore/runtime/Executable.cpp
index ad86463db..a364e84da 100644
--- a/Source/JavaScriptCore/runtime/Executable.cpp
+++ b/Source/JavaScriptCore/runtime/Executable.cpp
@@ -534,7 +534,7 @@ JSObject* FunctionExecutable::compileForCallInternal(ExecState* exec, ScopeChain
newCodeBlock->setAlternative(static_pointer_cast<CodeBlock>(m_codeBlockForCall.release()));
m_codeBlockForCall = newCodeBlock.release();
- m_numParametersForCall = m_codeBlockForCall->m_numParameters;
+ m_numParametersForCall = m_codeBlockForCall->numParameters();
ASSERT(m_numParametersForCall);
m_numCapturedVariables = m_codeBlockForCall->m_numCapturedVars;
m_symbolTable = m_codeBlockForCall->sharedSymbolTable();
@@ -597,7 +597,7 @@ JSObject* FunctionExecutable::compileForConstructInternal(ExecState* exec, Scope
newCodeBlock->setAlternative(static_pointer_cast<CodeBlock>(m_codeBlockForConstruct.release()));
m_codeBlockForConstruct = newCodeBlock.release();
- m_numParametersForConstruct = m_codeBlockForConstruct->m_numParameters;
+ m_numParametersForConstruct = m_codeBlockForConstruct->numParameters();
ASSERT(m_numParametersForConstruct);
m_numCapturedVariables = m_codeBlockForConstruct->m_numCapturedVars;
m_symbolTable = m_codeBlockForConstruct->sharedSymbolTable();
diff --git a/Source/JavaScriptCore/runtime/JSArray.cpp b/Source/JavaScriptCore/runtime/JSArray.cpp
index da7be8564..b3210083d 100644
--- a/Source/JavaScriptCore/runtime/JSArray.cpp
+++ b/Source/JavaScriptCore/runtime/JSArray.cpp
@@ -27,6 +27,7 @@
#include "CachedCall.h"
#include "Error.h"
#include "Executable.h"
+#include "GetterSetter.h"
#include "PropertyNameArray.h"
#include <wtf/AVLTree.h>
#include <wtf/Assertions.h>
@@ -212,24 +213,94 @@ void JSArray::destroy(JSCell* cell)
jsCast<JSArray*>(cell)->JSArray::~JSArray();
}
-SparseArrayValueMap::iterator SparseArrayValueMap::find(unsigned i)
+inline std::pair<SparseArrayValueMap::iterator, bool> SparseArrayValueMap::add(JSArray* array, unsigned i)
{
- return m_map.find(i);
+ SparseArrayEntry entry;
+ std::pair<iterator, bool> result = m_map.add(i, entry);
+ size_t capacity = m_map.capacity();
+ if (capacity != m_reportedCapacity) {
+ Heap::heap(array)->reportExtraMemoryCost((capacity - m_reportedCapacity) * (sizeof(unsigned) + sizeof(WriteBarrier<Unknown>)));
+ m_reportedCapacity = capacity;
+ }
+ return result;
}
-inline void SparseArrayValueMap::put(JSGlobalData& globalData, JSArray* array, unsigned i, JSValue value)
+inline void SparseArrayValueMap::put(ExecState* exec, JSArray* array, unsigned i, JSValue value)
{
- SparseArrayEntry temp;
- pair<Map::iterator, bool> result = m_map.add(i, temp);
- result.first->second.set(globalData, array, value);
- if (!result.second) // pre-existing entry
+ SparseArrayEntry& entry = add(array, i).first->second;
+
+ if (!(entry.attributes & (Getter | Setter))) {
+ if (entry.attributes & ReadOnly) {
+ // FIXME: should throw if being called from strict mode.
+ // throwTypeError(exec, StrictModeReadonlyPropertyWriteError);
+ return;
+ }
+
+ entry.set(exec->globalData(), array, value);
return;
+ }
- size_t capacity = m_map.capacity();
- if (capacity != m_reportedCapacity) {
- Heap::heap(array)->reportExtraMemoryCost((capacity - m_reportedCapacity) * (sizeof(unsigned) + sizeof(WriteBarrier<Unknown>)));
- m_reportedCapacity = capacity;
+ JSValue accessor = entry.Base::get();
+ ASSERT(accessor.isGetterSetter());
+ JSObject* setter = asGetterSetter(accessor)->setter();
+
+ if (!setter) {
+ throwTypeError(exec, "setting a property that has only a getter");
+ return;
}
+
+ CallData callData;
+ CallType callType = setter->methodTable()->getCallData(setter, callData);
+ MarkedArgumentBuffer args;
+ args.append(value);
+ call(exec, setter, callType, callData, array, args);
+}
+
+inline void SparseArrayEntry::get(PropertySlot& slot) const
+{
+ JSValue value = Base::get();
+ ASSERT(value);
+
+ if (LIKELY(!value.isGetterSetter())) {
+ slot.setValue(value);
+ return;
+ }
+
+ JSObject* getter = asGetterSetter(value)->getter();
+ if (!getter) {
+ slot.setUndefined();
+ return;
+ }
+
+ slot.setGetterSlot(getter);
+}
+
+inline void SparseArrayEntry::get(PropertyDescriptor& descriptor) const
+{
+ descriptor.setDescriptor(Base::get(), attributes);
+}
+
+inline JSValue SparseArrayEntry::get(ExecState* exec, JSArray* array) const
+{
+ JSValue result = Base::get();
+ ASSERT(result);
+
+ if (LIKELY(!result.isGetterSetter()))
+ return result;
+
+ JSObject* getter = asGetterSetter(result)->getter();
+ if (!getter)
+ return jsUndefined();
+
+ CallData callData;
+ CallType callType = getter->methodTable()->getCallData(getter, callData);
+ return call(exec, getter, callType, callData, array, exec->emptyList());
+}
+
+inline JSValue SparseArrayEntry::getNonSparseMode() const
+{
+ ASSERT(!attributes);
+ return Base::get();
}
inline void SparseArrayValueMap::visitChildren(SlotVisitor& visitor)
@@ -239,6 +310,315 @@ inline void SparseArrayValueMap::visitChildren(SlotVisitor& visitor)
visitor.append(&it->second);
}
+void JSArray::enterSparseMode(JSGlobalData& globalData)
+{
+ ArrayStorage* storage = m_storage;
+ SparseArrayValueMap* map = storage->m_sparseValueMap;
+
+ if (!map)
+ map = storage->m_sparseValueMap = new SparseArrayValueMap;
+
+ if (map->sparseMode())
+ return;
+
+ map->setSparseMode();
+
+ unsigned usedVectorLength = min(storage->m_length, m_vectorLength);
+ for (unsigned i = 0; i < usedVectorLength; ++i) {
+ JSValue value = storage->m_vector[i].get();
+ // This will always be a new entry in the map, so no need to check we can write,
+ // and attributes are default so no need to set them.
+ if (value)
+ map->add(this, i).first->second.set(globalData, this, value);
+ }
+
+ ArrayStorage* newStorage = static_cast<ArrayStorage*>(fastMalloc(storageSize(0)));
+ memcpy(newStorage, m_storage, storageSize(0));
+ newStorage->m_allocBase = newStorage;
+ fastFree(m_storage);
+ m_storage = newStorage;
+ m_indexBias = 0;
+ m_vectorLength = 0;
+}
+
+void JSArray::putDescriptor(ExecState* exec, SparseArrayEntry* entryInMap, PropertyDescriptor& descriptor, PropertyDescriptor& oldDescriptor)
+{
+ if (descriptor.isDataDescriptor()) {
+ if (descriptor.value())
+ entryInMap->set(exec->globalData(), this, descriptor.value());
+ else if (oldDescriptor.isAccessorDescriptor())
+ entryInMap->set(exec->globalData(), this, jsUndefined());
+ entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~(Getter | Setter);
+ return;
+ }
+
+ if (descriptor.isAccessorDescriptor()) {
+ JSObject* getter = 0;
+ if (descriptor.getter() && descriptor.getter().isObject())
+ getter = asObject(descriptor.getter());
+ if (!getter && oldDescriptor.isAccessorDescriptor()) {
+ if (oldDescriptor.getter() && oldDescriptor.getter().isObject())
+ getter = asObject(oldDescriptor.getter());
+ }
+ JSObject* setter = 0;
+ if (descriptor.setter() && descriptor.setter().isObject())
+ setter = asObject(descriptor.setter());
+ if (!setter && oldDescriptor.isAccessorDescriptor()) {
+ if (oldDescriptor.setter() && oldDescriptor.setter().isObject())
+ setter = asObject(oldDescriptor.setter());
+ }
+
+ GetterSetter* accessor = GetterSetter::create(exec);
+ if (getter)
+ accessor->setGetter(exec->globalData(), getter);
+ if (setter)
+ accessor->setSetter(exec->globalData(), setter);
+
+ entryInMap->set(exec->globalData(), this, accessor);
+ entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~DontDelete;
+ return;
+ }
+
+ ASSERT(descriptor.isGenericDescriptor());
+ entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor);
+}
+
+static bool reject(ExecState* exec, bool throwException, const char* message)
+{
+ if (throwException)
+ throwTypeError(exec, message);
+ return false;
+}
+
+// Defined in ES5.1 8.12.9
+bool JSArray::defineOwnNumericProperty(ExecState* exec, unsigned index, PropertyDescriptor& descriptor, bool throwException)
+{
+ ASSERT(index != 0xFFFFFFFF);
+
+ if (!inSparseMode()) {
+ // Fast case: we're putting a regular property to a regular array
+ // FIXME: this will pessimistically assume that if attributes are missing then they'll default to false
+ // – however if the property currently exists missing attributes will override from their current 'true'
+ // state (i.e. defineOwnProperty could be used to set a value without needing to entering 'SparseMode').
+ if (!descriptor.attributes()) {
+ ASSERT(!descriptor.isAccessorDescriptor());
+ putByIndex(this, exec, index, descriptor.value());
+ return true;
+ }
+
+ enterSparseMode(exec->globalData());
+ }
+
+ SparseArrayValueMap* map = m_storage->m_sparseValueMap;
+ ASSERT(map);
+
+ // 1. Let current be the result of calling the [[GetOwnProperty]] internal method of O with property name P.
+ std::pair<SparseArrayValueMap::iterator, bool> result = map->add(this, index);
+ SparseArrayEntry* entryInMap = &result.first->second;
+
+ // 2. Let extensible be the value of the [[Extensible]] internal property of O.
+ // 3. If current is undefined and extensible is false, then Reject.
+ // 4. If current is undefined and extensible is true, then
+ if (result.second) {
+ if (!isExtensible()) {
+ map->remove(result.first);
+ return reject(exec, throwException, "Attempting to define property on object that is not extensible.");
+ }
+
+ // 4.a. If IsGenericDescriptor(Desc) or IsDataDescriptor(Desc) is true, then create an own data property
+ // named P of object O whose [[Value]], [[Writable]], [[Enumerable]] and [[Configurable]] attribute values
+ // are described by Desc. If the value of an attribute field of Desc is absent, the attribute of the newly
+ // created property is set to its default value.
+ // 4.b. Else, Desc must be an accessor Property Descriptor so, create an own accessor property named P of
+ // object O whose [[Get]], [[Set]], [[Enumerable]] and [[Configurable]] attribute values are described by
+ // Desc. If the value of an attribute field of Desc is absent, the attribute of the newly created property
+ // is set to its default value.
+ // 4.c. Return true.
+
+ PropertyDescriptor defaults;
+ entryInMap->setWithoutWriteBarrier(jsUndefined());
+ entryInMap->attributes = DontDelete | DontEnum | ReadOnly;
+ entryInMap->get(defaults);
+
+ putDescriptor(exec, entryInMap, descriptor, defaults);
+ if (index >= m_storage->m_length)
+ m_storage->m_length = index + 1;
+ return true;
+ }
+
+ // 5. Return true, if every field in Desc is absent.
+ // 6. Return true, if every field in Desc also occurs in current and the value of every field in Desc is the same value as the corresponding field in current when compared using the SameValue algorithm (9.12).
+ PropertyDescriptor current;
+ entryInMap->get(current);
+ if (descriptor.isEmpty() || descriptor.equalTo(exec, current))
+ return true;
+
+ // 7. If the [[Configurable]] field of current is false then
+ if (!current.configurable()) {
+ // 7.a. Reject, if the [[Configurable]] field of Desc is true.
+ if (descriptor.configurablePresent() && !descriptor.configurable())
+ return reject(exec, throwException, "Attempting to change configurable attribute of unconfigurable property.");
+ // 7.b. Reject, if the [[Enumerable]] field of Desc is present and the [[Enumerable]] fields of current and Desc are the Boolean negation of each other.
+ if (descriptor.enumerablePresent() && current.enumerable() != descriptor.enumerable())
+ return reject(exec, throwException, "Attempting to change enumerable attribute of unconfigurable property.");
+ }
+
+ // 8. If IsGenericDescriptor(Desc) is true, then no further validation is required.
+ if (!descriptor.isGenericDescriptor()) {
+ // 9. Else, if IsDataDescriptor(current) and IsDataDescriptor(Desc) have different results, then
+ if (current.isDataDescriptor() != descriptor.isDataDescriptor()) {
+ // 9.a. Reject, if the [[Configurable]] field of current is false.
+ if (!current.configurable())
+ return reject(exec, throwException, "Attempting to change access mechanism for an unconfigurable property.");
+ // 9.b. If IsDataDescriptor(current) is true, then convert the property named P of object O from a
+ // data property to an accessor property. Preserve the existing values of the converted property‘s
+ // [[Configurable]] and [[Enumerable]] attributes and set the rest of the property‘s attributes to
+ // their default values.
+ // 9.c. Else, convert the property named P of object O from an accessor property to a data property.
+ // Preserve the existing values of the converted property‘s [[Configurable]] and [[Enumerable]]
+ // attributes and set the rest of the property‘s attributes to their default values.
+ } else if (current.isDataDescriptor() && descriptor.isDataDescriptor()) {
+ // 10. Else, if IsDataDescriptor(current) and IsDataDescriptor(Desc) are both true, then
+ // 10.a. If the [[Configurable]] field of current is false, then
+ if (!current.configurable() && !current.writable()) {
+ // 10.a.i. Reject, if the [[Writable]] field of current is false and the [[Writable]] field of Desc is true.
+ if (descriptor.writable())
+ return reject(exec, throwException, "Attempting to change writable attribute of unconfigurable property.");
+ // 10.a.ii. If the [[Writable]] field of current is false, then
+ // 10.a.ii.1. Reject, if the [[Value]] field of Desc is present and SameValue(Desc.[[Value]], current.[[Value]]) is false.
+ if (descriptor.value() && !sameValue(exec, descriptor.value(), current.value()))
+ return reject(exec, throwException, "Attempting to change value of a readonly property.");
+ }
+ // 10.b. else, the [[Configurable]] field of current is true, so any change is acceptable.
+ } else {
+ // 11. Else, IsAccessorDescriptor(current) and IsAccessorDescriptor(Desc) are both true so, if the [[Configurable]] field of current is false, then
+ if (!current.configurable()) {
+ // 11.i. Reject, if the [[Set]] field of Desc is present and SameValue(Desc.[[Set]], current.[[Set]]) is false.
+ if (descriptor.setterPresent() && descriptor.setter() != current.setter())
+ return reject(exec, throwException, "Attempting to change the setter of an unconfigurable property.");
+ // 11.ii. Reject, if the [[Get]] field of Desc is present and SameValue(Desc.[[Get]], current.[[Get]]) is false.
+ if (descriptor.getterPresent() && descriptor.getter() != current.getter())
+ return reject(exec, throwException, "Attempting to change the getter of an unconfigurable property.");
+ }
+ }
+ }
+
+ // 12. For each attribute field of Desc that is present, set the correspondingly named attribute of the property named P of object O to the value of the field.
+ putDescriptor(exec, entryInMap, descriptor, current);
+ // 13. Return true.
+ return true;
+}
+
+void JSArray::setLengthWritable(ExecState* exec, bool writable)
+{
+ ASSERT(isLengthWritable() || !writable);
+ if (!isLengthWritable() || writable)
+ return;
+
+ enterSparseMode(exec->globalData());
+
+ SparseArrayValueMap* map = m_storage->m_sparseValueMap;
+ ASSERT(map);
+ map->setLengthIsReadOnly();
+}
+
+// Defined in ES5.1 15.4.5.1
+bool JSArray::defineOwnProperty(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor, bool throwException)
+{
+ JSArray* array = static_cast<JSArray*>(object);
+
+ // 3. If P is "length", then
+ if (propertyName == exec->propertyNames().length) {
+ // All paths through length definition call the default [[DefineOwnProperty]], hence:
+ // from ES5.1 8.12.9 7.a.
+ if (descriptor.configurable())
+ return reject(exec, throwException, "Attempting to change configurable attribute of unconfigurable property.");
+ // from ES5.1 8.12.9 7.b.
+ if (descriptor.enumerable())
+ return reject(exec, throwException, "Attempting to change enumerable attribute of unconfigurable property.");
+
+ // a. If the [[Value]] field of Desc is absent, then
+ // a.i. Return the result of calling the default [[DefineOwnProperty]] internal method (8.12.9) on A passing "length", Desc, and Throw as arguments.
+ if (descriptor.isAccessorDescriptor())
+ return reject(exec, throwException, "Attempting to change access mechanism for an unconfigurable property.");
+ // from ES5.1 8.12.9 10.a.
+ if (!array->isLengthWritable() && descriptor.writable())
+ return reject(exec, throwException, "Attempting to change writable attribute of unconfigurable property.");
+ // This descriptor is either just making length read-only, or changing nothing!
+ if (!descriptor.value()) {
+ array->setLengthWritable(exec, descriptor.writable());
+ return true;
+ }
+
+ // b. Let newLenDesc be a copy of Desc.
+ // c. Let newLen be ToUint32(Desc.[[Value]]).
+ unsigned newLen = descriptor.value().toUInt32(exec);
+ // d. If newLen is not equal to ToNumber( Desc.[[Value]]), throw a RangeError exception.
+ if (newLen != descriptor.value().toNumber(exec)) {
+ throwError(exec, createRangeError(exec, "Invalid array length"));
+ return false;
+ }
+
+ // Based on SameValue check in 8.12.9, this is always okay.
+ if (newLen == array->length()) {
+ array->setLengthWritable(exec, descriptor.writable());
+ return true;
+ }
+
+ // e. Set newLenDesc.[[Value] to newLen.
+ // f. If newLen >= oldLen, then
+ // f.i. Return the result of calling the default [[DefineOwnProperty]] internal method (8.12.9) on A passing "length", newLenDesc, and Throw as arguments.
+ // g. Reject if oldLenDesc.[[Writable]] is false.
+ if (!array->isLengthWritable())
+ return reject(exec, throwException, "Attempting to change value of a readonly property.");
+
+ // h. If newLenDesc.[[Writable]] is absent or has the value true, let newWritable be true.
+ // i. Else,
+ // i.i. Need to defer setting the [[Writable]] attribute to false in case any elements cannot be deleted.
+ // i.ii. Let newWritable be false.
+ // i.iii. Set newLenDesc.[[Writable] to true.
+ // j. Let succeeded be the result of calling the default [[DefineOwnProperty]] internal method (8.12.9) on A passing "length", newLenDesc, and Throw as arguments.
+ // k. If succeeded is false, return false.
+ // l. While newLen < oldLen repeat,
+ // l.i. Set oldLen to oldLen – 1.
+ // l.ii. Let deleteSucceeded be the result of calling the [[Delete]] internal method of A passing ToString(oldLen) and false as arguments.
+ // l.iii. If deleteSucceeded is false, then
+ if (!array->setLength(exec, newLen, throwException)) {
+ // 1. Set newLenDesc.[[Value] to oldLen+1.
+ // 2. If newWritable is false, set newLenDesc.[[Writable] to false.
+ // 3. Call the default [[DefineOwnProperty]] internal method (8.12.9) on A passing "length", newLenDesc, and false as arguments.
+ // 4. Reject.
+ array->setLengthWritable(exec, descriptor.writable());
+ return false;
+ }
+
+ // m. If newWritable is false, then
+ // i. Call the default [[DefineOwnProperty]] internal method (8.12.9) on A passing "length", Property Descriptor{[[Writable]]: false}, and false as arguments. This call will always return true.
+ array->setLengthWritable(exec, descriptor.writable());
+ // n. Return true.
+ return true;
+ }
+
+ // 4. Else if P is an array index (15.4), then
+ bool isArrayIndex;
+ // a. Let index be ToUint32(P).
+ unsigned index = propertyName.toArrayIndex(isArrayIndex);
+ if (isArrayIndex) {
+ // b. Reject if index >= oldLen and oldLenDesc.[[Writable]] is false.
+ if (index >= array->length() && !array->isLengthWritable())
+ return reject(exec, throwException, "Attempting to define numeric property on array with non-writable length property.");
+ // c. Let succeeded be the result of calling the default [[DefineOwnProperty]] internal method (8.12.9) on A passing P, Desc, and false as arguments.
+ // d. Reject if succeeded is false.
+ // e. If index >= oldLen
+ // e.i. Set oldLenDesc.[[Value]] to index + 1.
+ // e.ii. Call the default [[DefineOwnProperty]] internal method (8.12.9) on A passing "length", oldLenDesc, and false as arguments. This call will always return true.
+ // f. Return true.
+ return array->defineOwnNumericProperty(exec, index, descriptor, throwException);
+ }
+
+ return JSObject::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
+}
+
bool JSArray::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned i, PropertySlot& slot)
{
JSArray* thisObject = jsCast<JSArray*>(cell);
@@ -259,7 +639,7 @@ bool JSArray::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned
} else if (SparseArrayValueMap* map = storage->m_sparseValueMap) {
SparseArrayValueMap::iterator it = map->find(i);
if (it != map->notFound()) {
- slot.setValue(it->second.get());
+ it->second.get(slot);
return true;
}
}
@@ -307,7 +687,7 @@ bool JSArray::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const
} else if (SparseArrayValueMap* map = storage->m_sparseValueMap) {
SparseArrayValueMap::iterator it = map->find(i);
if (it != map->notFound()) {
- descriptor.setDescriptor(it->second.get(), 0);
+ it->second.get(descriptor);
return true;
}
}
@@ -332,7 +712,7 @@ void JSArray::put(JSCell* cell, ExecState* exec, const Identifier& propertyName,
throwError(exec, createRangeError(exec, "Invalid array length"));
return;
}
- thisObject->setLength(newLength);
+ thisObject->setLength(exec, newLength, slot.isStrictMode());
return;
}
@@ -372,12 +752,14 @@ void JSArray::putByIndex(JSCell* cell, ExecState* exec, unsigned i, JSValue valu
}
// For all other cases, call putByIndexBeyondVectorLength.
- thisObject->putByIndexBeyondVectorLength(exec->globalData(), i, value);
+ thisObject->putByIndexBeyondVectorLength(exec, i, value);
thisObject->checkConsistency();
}
-NEVER_INLINE void JSArray::putByIndexBeyondVectorLength(JSGlobalData& globalData, unsigned i, JSValue value)
+NEVER_INLINE void JSArray::putByIndexBeyondVectorLength(ExecState* exec, unsigned i, JSValue value)
{
+ JSGlobalData& globalData = exec->globalData();
+
// i should be a valid array index that is outside of the current vector.
ASSERT(i >= m_vectorLength);
ASSERT(i <= MAX_ARRAY_INDEX);
@@ -385,15 +767,12 @@ NEVER_INLINE void JSArray::putByIndexBeyondVectorLength(JSGlobalData& globalData
ArrayStorage* storage = m_storage;
SparseArrayValueMap* map = storage->m_sparseValueMap;
- // Update m_length if necessary.
- unsigned length = storage->m_length;
- if (i >= length) {
- length = i + 1;
- storage->m_length = length;
- }
-
// First, handle cases where we don't currently have a sparse map.
if (LIKELY(!map)) {
+ // Update m_length if necessary.
+ if (i >= storage->m_length)
+ storage->m_length = i + 1;
+
// Check that it is sensible to still be using a vector, and then try to grow the vector.
if (LIKELY((isDenseEnoughForVector(i, storage->m_numValuesInVector)) && increaseVectorLength(i + 1))) {
// success! - reread m_storage since it has likely been reallocated, and store to the vector.
@@ -405,15 +784,27 @@ NEVER_INLINE void JSArray::putByIndexBeyondVectorLength(JSGlobalData& globalData
// We don't want to, or can't use a vector to hold this property - allocate a sparse map & add the value.
map = new SparseArrayValueMap;
storage->m_sparseValueMap = map;
- map->put(globalData, this, i, value);
+ map->put(exec, this, i, value);
return;
}
+ // Update m_length if necessary.
+ unsigned length = storage->m_length;
+ if (i >= length) {
+ // Prohibit growing the array if length is not writable.
+ if (map->lengthIsReadOnly()) {
+ // FIXME: should throw in strict mode.
+ return;
+ }
+ length = i + 1;
+ storage->m_length = length;
+ }
+
// We are currently using a map - check whether we still want to be doing so.
// We will continue to use a sparse map if SparseMode is set, a vector would be too sparse, or if allocation fails.
unsigned numValuesInArray = storage->m_numValuesInVector + map->size();
if (map->sparseMode() || !isDenseEnoughForVector(length, numValuesInArray) || !increaseVectorLength(length)) {
- map->put(globalData, this, i, value);
+ map->put(exec, this, i, value);
return;
}
@@ -425,7 +816,7 @@ NEVER_INLINE void JSArray::putByIndexBeyondVectorLength(JSGlobalData& globalData
WriteBarrier<Unknown>* vector = storage->m_vector;
SparseArrayValueMap::const_iterator end = map->end();
for (SparseArrayValueMap::const_iterator it = map->begin(); it != end; ++it)
- vector[it->first].set(globalData, this, it->second.get());
+ vector[it->first].set(globalData, this, it->second.getNonSparseMode());
delete map;
storage->m_sparseValueMap = 0;
@@ -455,35 +846,35 @@ bool JSArray::deletePropertyByIndex(JSCell* cell, ExecState* exec, unsigned i)
JSArray* thisObject = jsCast<JSArray*>(cell);
thisObject->checkConsistency();
+ if (i > MAX_ARRAY_INDEX)
+ return thisObject->methodTable()->deleteProperty(thisObject, exec, Identifier::from(exec, i));
+
ArrayStorage* storage = thisObject->m_storage;
if (i < thisObject->m_vectorLength) {
WriteBarrier<Unknown>& valueSlot = storage->m_vector[i];
- if (!valueSlot) {
- thisObject->checkConsistency();
- return false;
+ if (valueSlot) {
+ valueSlot.clear();
+ --storage->m_numValuesInVector;
}
- valueSlot.clear();
- --storage->m_numValuesInVector;
- thisObject->checkConsistency();
- return true;
- }
-
- if (SparseArrayValueMap* map = storage->m_sparseValueMap) {
+ } else if (SparseArrayValueMap* map = storage->m_sparseValueMap) {
SparseArrayValueMap::iterator it = map->find(i);
if (it != map->notFound()) {
+ if (it->second.attributes & DontDelete)
+ return false;
map->remove(it);
- thisObject->checkConsistency();
- return true;
}
}
thisObject->checkConsistency();
+ return true;
+}
- if (i > MAX_ARRAY_INDEX)
- return thisObject->methodTable()->deleteProperty(thisObject, exec, Identifier::from(exec, i));
-
- return false;
+static int compareKeysForQSort(const void* a, const void* b)
+{
+ unsigned da = *static_cast<const unsigned*>(a);
+ unsigned db = *static_cast<const unsigned*>(b);
+ return (da > db) - (da < db);
}
void JSArray::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
@@ -502,9 +893,18 @@ void JSArray::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNam
}
if (SparseArrayValueMap* map = storage->m_sparseValueMap) {
+ Vector<unsigned> keys;
+ keys.reserveCapacity(map->size());
+
SparseArrayValueMap::const_iterator end = map->end();
- for (SparseArrayValueMap::const_iterator it = map->begin(); it != end; ++it)
- propertyNames.add(Identifier::from(exec, it->first));
+ for (SparseArrayValueMap::const_iterator it = map->begin(); it != end; ++it) {
+ if (mode == IncludeDontEnumProperties || !(it->second.attributes & DontEnum))
+ keys.append(static_cast<unsigned>(it->first));
+ }
+
+ qsort(keys.begin(), keys.size(), sizeof(unsigned), compareKeysForQSort);
+ for (unsigned i = 0; i < keys.size(); ++i)
+ propertyNames.add(Identifier::from(exec, keys[i]));
}
if (mode == IncludeDontEnumProperties)
@@ -693,15 +1093,61 @@ bool JSArray::unshiftCountSlowCase(unsigned count)
return true;
}
-void JSArray::setLength(unsigned newLength)
+bool JSArray::setLength(ExecState* exec, unsigned newLength, bool throwException)
{
checkConsistency();
ArrayStorage* storage = m_storage;
-
unsigned length = storage->m_length;
+ // If the length is read only then we enter sparse mode, so should enter the following 'if'.
+ ASSERT(isLengthWritable() || storage->m_sparseValueMap);
+
+ if (SparseArrayValueMap* map = storage->m_sparseValueMap) {
+ // Fail if the length is not writable.
+ if (map->lengthIsReadOnly())
+ return reject(exec, throwException, StrictModeReadonlyPropertyWriteError);
+
+ if (newLength < length) {
+ // Copy any keys we might be interested in into a vector.
+ Vector<unsigned> keys;
+ keys.reserveCapacity(min(map->size(), static_cast<size_t>(length - newLength)));
+ SparseArrayValueMap::const_iterator end = map->end();
+ for (SparseArrayValueMap::const_iterator it = map->begin(); it != end; ++it) {
+ unsigned index = static_cast<unsigned>(it->first);
+ if (index < length && index >= newLength)
+ keys.append(index);
+ }
+
+ // Check if the array is in sparse mode. If so there may be non-configurable
+ // properties, so we have to perform deletion with caution, if not we can
+ // delete values in any order.
+ if (map->sparseMode()) {
+ qsort(keys.begin(), keys.size(), sizeof(unsigned), compareKeysForQSort);
+ unsigned i = keys.size();
+ while (i) {
+ unsigned index = keys[--i];
+ SparseArrayValueMap::iterator it = map->find(index);
+ ASSERT(it != map->notFound());
+ if (it->second.attributes & DontDelete) {
+ storage->m_length = index + 1;
+ return reject(exec, throwException, "Unable to delete property.");
+ }
+ map->remove(it);
+ }
+ } else {
+ for (unsigned i = 0; i < keys.size(); ++i)
+ map->remove(keys[i]);
+ if (map->isEmpty()) {
+ delete map;
+ storage->m_sparseValueMap = 0;
+ }
+ }
+ }
+ }
+
if (newLength < length) {
+ // Delete properties from the vector.
unsigned usedVectorLength = min(length, m_vectorLength);
for (unsigned i = newLength; i < usedVectorLength; ++i) {
WriteBarrier<Unknown>& valueSlot = storage->m_vector[i];
@@ -709,35 +1155,26 @@ void JSArray::setLength(unsigned newLength)
valueSlot.clear();
storage->m_numValuesInVector -= hadValue;
}
-
- if (SparseArrayValueMap* map = storage->m_sparseValueMap) {
- SparseArrayValueMap copy = *map;
- SparseArrayValueMap::const_iterator end = copy.end();
- for (SparseArrayValueMap::const_iterator it = copy.begin(); it != end; ++it) {
- if (it->first >= newLength)
- map->remove(it->first);
- }
- if (map->isEmpty() && !map->sparseMode()) {
- delete map;
- storage->m_sparseValueMap = 0;
- }
- }
}
storage->m_length = newLength;
checkConsistency();
+ return true;
}
-JSValue JSArray::pop()
+JSValue JSArray::pop(ExecState* exec)
{
checkConsistency();
ArrayStorage* storage = m_storage;
unsigned length = storage->m_length;
- if (!length)
+ if (!length) {
+ if (!isLengthWritable())
+ throwTypeError(exec, StrictModeReadonlyPropertyWriteError);
return jsUndefined();
+ }
--length;
@@ -755,8 +1192,19 @@ JSValue JSArray::pop()
result = jsUndefined();
if (SparseArrayValueMap* map = storage->m_sparseValueMap) {
SparseArrayValueMap::iterator it = map->find(length);
- if (it != map->end()) {
- result = it->second.get();
+ if (it != map->notFound()) {
+ unsigned attributes = it->second.attributes;
+
+ result = it->second.get(exec, this);
+ if (exec->hadException())
+ return jsUndefined();
+
+ if (attributes & DontDelete) {
+ throwError(exec, createTypeError(exec, "Unable to delete property."));
+ checkConsistency();
+ return result;
+ }
+
map->remove(it);
if (map->isEmpty() && !map->sparseMode()) {
delete map;
@@ -800,7 +1248,7 @@ void JSArray::push(ExecState* exec, JSValue value)
}
// Handled the same as putIndex.
- putByIndexBeyondVectorLength(exec->globalData(), storage->m_length, value);
+ putByIndexBeyondVectorLength(exec, storage->m_length, value);
checkConsistency();
}
@@ -1189,7 +1637,7 @@ void JSArray::sort(ExecState* exec, JSValue compareFunction, CallType callType,
SparseArrayValueMap::const_iterator end = map->end();
for (SparseArrayValueMap::const_iterator it = map->begin(); it != end; ++it) {
- tree.abstractor().m_nodes[numDefined].value = it->second.get();
+ tree.abstractor().m_nodes[numDefined].value = it->second.getNonSparseMode();
tree.insert(numDefined);
++numDefined;
}
@@ -1305,7 +1753,7 @@ unsigned JSArray::compactForSorting()
SparseArrayValueMap::const_iterator end = map->end();
for (SparseArrayValueMap::const_iterator it = map->begin(); it != end; ++it)
- storage->m_vector[numDefined++].setWithoutWriteBarrier(it->second.get());
+ storage->m_vector[numDefined++].setWithoutWriteBarrier(it->second.getNonSparseMode());
delete map;
storage->m_sparseValueMap = 0;
diff --git a/Source/JavaScriptCore/runtime/JSArray.h b/Source/JavaScriptCore/runtime/JSArray.h
index 9102c8724..871cfc882 100644
--- a/Source/JavaScriptCore/runtime/JSArray.h
+++ b/Source/JavaScriptCore/runtime/JSArray.h
@@ -30,16 +30,25 @@ namespace JSC {
class JSArray;
struct SparseArrayEntry : public WriteBarrier<Unknown> {
+ typedef WriteBarrier<Unknown> Base;
+
SparseArrayEntry() : attributes(0) {}
+
+ JSValue get(ExecState*, JSArray*) const;
+ void get(PropertySlot&) const;
+ void get(PropertyDescriptor&) const;
+ JSValue getNonSparseMode() const;
+
unsigned attributes;
};
class SparseArrayValueMap {
- typedef HashMap<unsigned, SparseArrayEntry> Map;
+ typedef HashMap<uint64_t, SparseArrayEntry, WTF::IntHash<uint64_t>, WTF::UnsignedWithZeroKeyHashTraits<uint64_t> > Map;
enum Flags {
Normal = 0,
- SparseMode = 1
+ SparseMode = 1,
+ LengthIsReadOnly = 2,
};
public:
@@ -61,12 +70,23 @@ namespace JSC {
void setSparseMode()
{
- m_flags = (Flags)(m_flags | SparseMode);
+ m_flags = static_cast<Flags>(m_flags | SparseMode);
+ }
+
+ bool lengthIsReadOnly()
+ {
+ return m_flags & LengthIsReadOnly;
+ }
+
+ void setLengthIsReadOnly()
+ {
+ m_flags = static_cast<Flags>(m_flags | LengthIsReadOnly);
}
// These methods may mutate the contents of the map
- void put(JSGlobalData&, JSArray*, unsigned, JSValue);
- iterator find(unsigned);
+ void put(ExecState*, JSArray*, unsigned, JSValue);
+ std::pair<iterator, bool> add(JSArray*, unsigned);
+ iterator find(unsigned i) { return m_map.find(i); }
// This should ASSERT the remove is valid (check the result of the find).
void remove(iterator it) { m_map.remove(it); }
void remove(unsigned i) { m_map.remove(i); }
@@ -136,7 +156,9 @@ namespace JSC {
return array->tryFinishCreationUninitialized(globalData, initialLength);
}
- static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier& propertyName, PropertySlot&);
+ static bool defineOwnProperty(JSObject*, ExecState*, const Identifier&, PropertyDescriptor&, bool throwException);
+
+ static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
static bool getOwnPropertyDescriptor(JSObject*, ExecState*, const Identifier&, PropertyDescriptor&);
static void putByIndex(JSCell*, ExecState*, unsigned propertyName, JSValue);
@@ -144,14 +166,15 @@ namespace JSC {
static JS_EXPORTDATA const ClassInfo s_info;
unsigned length() const { return m_storage->m_length; }
- void setLength(unsigned); // OK to use on new arrays, but not if it might be a RegExpMatchArray.
+ // OK to use on new arrays, but not if it might be a RegExpMatchArray.
+ bool setLength(ExecState*, unsigned, bool throwException = false);
void sort(ExecState*);
void sort(ExecState*, JSValue compareFunction, CallType, const CallData&);
void sortNumeric(ExecState*, JSValue compareFunction, CallType, const CallData&);
void push(ExecState*, JSValue);
- JSValue pop();
+ JSValue pop(ExecState*);
void shiftCount(ExecState*, unsigned count);
void unshiftCount(ExecState*, unsigned count);
@@ -245,8 +268,19 @@ namespace JSC {
void setSubclassData(void*);
private:
+ bool isLengthWritable()
+ {
+ SparseArrayValueMap* map = m_storage->m_sparseValueMap;
+ return !map || !map->lengthIsReadOnly();
+ }
+
+ void setLengthWritable(ExecState*, bool writable);
+ void putDescriptor(ExecState*, SparseArrayEntry*, PropertyDescriptor&, PropertyDescriptor& old);
+ bool defineOwnNumericProperty(ExecState*, unsigned, PropertyDescriptor&, bool throwException);
+ void enterSparseMode(JSGlobalData&);
+
bool getOwnPropertySlotSlowCase(ExecState*, unsigned propertyName, PropertySlot&);
- void putByIndexBeyondVectorLength(JSGlobalData&, unsigned propertyName, JSValue);
+ void putByIndexBeyondVectorLength(ExecState*, unsigned propertyName, JSValue);
unsigned getNewVectorLength(unsigned desiredLength);
bool increaseVectorLength(unsigned newLength);
diff --git a/Source/JavaScriptCore/runtime/JSByteArray.cpp b/Source/JavaScriptCore/runtime/JSByteArray.cpp
index 7478a08fb..3df21e6f5 100644
--- a/Source/JavaScriptCore/runtime/JSByteArray.cpp
+++ b/Source/JavaScriptCore/runtime/JSByteArray.cpp
@@ -33,7 +33,7 @@ using namespace WTF;
namespace JSC {
-const ClassInfo JSByteArray::s_info = { "ByteArray", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) };
+const ClassInfo JSByteArray::s_info = { "Uint8ClampedArray", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) };
JSByteArray::JSByteArray(ExecState* exec, Structure* structure, ByteArray* storage)
: JSNonFinalObject(exec->globalData(), structure)
diff --git a/Source/JavaScriptCore/runtime/JSGlobalData.h b/Source/JavaScriptCore/runtime/JSGlobalData.h
index 1619f9297..a6ad8a747 100644
--- a/Source/JavaScriptCore/runtime/JSGlobalData.h
+++ b/Source/JavaScriptCore/runtime/JSGlobalData.h
@@ -251,6 +251,9 @@ namespace JSC {
#if ENABLE(JIT)
ReturnAddressPtr exceptionLocation;
JSValue hostCallReturnValue;
+ CallFrame* callFrameForThrow;
+ void* targetMachinePCForThrow;
+ Instruction* targetInterpreterPCForThrow;
#if ENABLE(DFG_JIT)
uint32_t osrExitIndex;
void* osrExitJumpDestination;
diff --git a/Source/JavaScriptCore/runtime/JSObject.cpp b/Source/JavaScriptCore/runtime/JSObject.cpp
index 9cc29617a..a813e8416 100644
--- a/Source/JavaScriptCore/runtime/JSObject.cpp
+++ b/Source/JavaScriptCore/runtime/JSObject.cpp
@@ -761,7 +761,7 @@ bool JSObject::defineOwnProperty(JSObject* object, ExecState* exec, const Identi
if (descriptor.isGenericDescriptor()) {
if (!current.attributesEqual(descriptor)) {
object->methodTable()->deleteProperty(object, exec, propertyName);
- putDescriptor(exec, object, propertyName, descriptor, current.attributesWithOverride(descriptor), current);
+ return putDescriptor(exec, object, propertyName, descriptor, current.attributesWithOverride(descriptor), current);
}
return true;
}
@@ -786,7 +786,7 @@ bool JSObject::defineOwnProperty(JSObject* object, ExecState* exec, const Identi
return false;
}
if (!current.writable()) {
- if (descriptor.value() || !JSValue::strictEqual(exec, current.value(), descriptor.value())) {
+ if (descriptor.value() || !sameValue(exec, current.value(), descriptor.value())) {
if (throwException)
throwError(exec, createTypeError(exec, "Attempting to change value of a readonly property."));
return false;
diff --git a/Source/JavaScriptCore/runtime/JSString.h b/Source/JavaScriptCore/runtime/JSString.h
index 6700e2e41..f40455571 100644
--- a/Source/JavaScriptCore/runtime/JSString.h
+++ b/Source/JavaScriptCore/runtime/JSString.h
@@ -59,7 +59,7 @@ namespace JSC {
JSString* jsStringBuilder(JSGlobalData*);
- class JS_EXPORTCLASS JSString : public JSCell {
+ class JSString : public JSCell {
public:
friend class JIT;
friend class JSGlobalData;
diff --git a/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp b/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp
index 9d62dfc98..c664952a5 100644
--- a/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp
+++ b/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp
@@ -162,16 +162,30 @@ void PropertyDescriptor::setGetter(JSValue getter)
m_attributes &= ~ReadOnly;
}
+// See ES5.1 9.12
+bool sameValue(ExecState* exec, JSValue a, JSValue b)
+{
+ if (!a.isNumber())
+ return JSValue::strictEqual(exec, a, b);
+ if (!b.isNumber())
+ return false;
+ double x = a.asNumber();
+ double y = b.asNumber();
+ if (isnan(x))
+ return isnan(y);
+ return bitwise_cast<uint64_t>(x) == bitwise_cast<uint64_t>(y);
+}
+
bool PropertyDescriptor::equalTo(ExecState* exec, const PropertyDescriptor& other) const
{
if (!other.m_value == m_value ||
!other.m_getter == m_getter ||
!other.m_setter == m_setter)
return false;
- return (!m_value || JSValue::strictEqual(exec, other.m_value, m_value)) &&
- (!m_getter || JSValue::strictEqual(exec, other.m_getter, m_getter)) &&
- (!m_setter || JSValue::strictEqual(exec, other.m_setter, m_setter)) &&
- attributesEqual(other);
+ return (!m_value || sameValue(exec, other.m_value, m_value))
+ && (!m_getter || JSValue::strictEqual(exec, other.m_getter, m_getter))
+ && (!m_setter || JSValue::strictEqual(exec, other.m_setter, m_setter))
+ && attributesEqual(other);
}
bool PropertyDescriptor::attributesEqual(const PropertyDescriptor& other) const
@@ -201,4 +215,18 @@ unsigned PropertyDescriptor::attributesWithOverride(const PropertyDescriptor& ot
return newAttributes;
}
+unsigned PropertyDescriptor::attributesOverridingCurrent(const PropertyDescriptor& current) const
+{
+ unsigned overrideMask = 0;
+ if (writablePresent())
+ overrideMask |= ReadOnly;
+ if (enumerablePresent())
+ overrideMask |= DontEnum;
+ if (configurablePresent())
+ overrideMask |= DontDelete;
+ if (isAccessorDescriptor())
+ overrideMask |= (Getter | Setter);
+ return (m_attributes & overrideMask) | (current.m_attributes & ~overrideMask);
+}
+
}
diff --git a/Source/JavaScriptCore/runtime/PropertyDescriptor.h b/Source/JavaScriptCore/runtime/PropertyDescriptor.h
index bebf5e826..3d481b25e 100644
--- a/Source/JavaScriptCore/runtime/PropertyDescriptor.h
+++ b/Source/JavaScriptCore/runtime/PropertyDescriptor.h
@@ -31,6 +31,9 @@
namespace JSC {
class GetterSetter;
+ // See ES5.1 9.12
+ bool sameValue(ExecState*, JSValue, JSValue);
+
class PropertyDescriptor {
public:
PropertyDescriptor()
@@ -66,6 +69,8 @@ namespace JSC {
bool equalTo(ExecState* exec, const PropertyDescriptor& other) const;
bool attributesEqual(const PropertyDescriptor& other) const;
unsigned attributesWithOverride(const PropertyDescriptor& other) const;
+ unsigned attributesOverridingCurrent(const PropertyDescriptor& current) const;
+
private:
static unsigned defaultAttributes;
bool operator==(const PropertyDescriptor&){ return false; }
diff --git a/Source/JavaScriptCore/wtf/Assertions.cpp b/Source/JavaScriptCore/wtf/Assertions.cpp
index de062ce25..3da67effe 100644
--- a/Source/JavaScriptCore/wtf/Assertions.cpp
+++ b/Source/JavaScriptCore/wtf/Assertions.cpp
@@ -98,7 +98,7 @@ static void vprintf_stderr_common(const char* format, va_list args)
// Fall through to write to stderr in the same manner as other platforms.
#elif PLATFORM(BLACKBERRY)
- BlackBerry::Platform::logV(BlackBerry::Platform::LogLevelInfo, format, args);
+ BlackBerry::Platform::logStreamV(format, args);
#elif HAVE(ISDEBUGGERPRESENT)
if (IsDebuggerPresent()) {
size_t size = 1024;
@@ -133,7 +133,9 @@ static void vprintf_stderr_common(const char* format, va_list args)
} while (size > 1024);
}
#endif
+#if !PLATFORM(BLACKBERRY)
vfprintf(stderr, format, args);
+#endif
}
#if COMPILER(CLANG) || (COMPILER(GCC) && GCC_VERSION_AT_LEAST(4, 6, 0))
@@ -194,8 +196,26 @@ static void printCallSite(const char* file, int line, const char* function)
#endif
}
+#if PLATFORM(BLACKBERRY)
+struct WTFLogLocker {
+ WTFLogLocker(BlackBerry::Platform::MessageLogLevel logLevel)
+ {
+ BlackBerry::Platform::lockLogging(logLevel);
+ }
+
+ ~WTFLogLocker()
+ {
+ BlackBerry::Platform::unlockLogging();
+ }
+};
+#endif
+
void WTFReportAssertionFailure(const char* file, int line, const char* function, const char* assertion)
{
+#if PLATFORM(BLACKBERRY)
+ WTFLogLocker locker(BlackBerry::Platform::LogLevelCritical);
+#endif
+
if (assertion)
printf_stderr_common("ASSERTION FAILED: %s\n", assertion);
else
@@ -205,6 +225,10 @@ void WTFReportAssertionFailure(const char* file, int line, const char* function,
void WTFReportAssertionFailureWithMessage(const char* file, int line, const char* function, const char* assertion, const char* format, ...)
{
+#if PLATFORM(BLACKBERRY)
+ WTFLogLocker locker(BlackBerry::Platform::LogLevelCritical);
+#endif
+
va_list args;
va_start(args, format);
vprintf_stderr_with_prefix("ASSERTION FAILED: ", format, args);
@@ -215,6 +239,10 @@ void WTFReportAssertionFailureWithMessage(const char* file, int line, const char
void WTFReportArgumentAssertionFailure(const char* file, int line, const char* function, const char* argName, const char* assertion)
{
+#if PLATFORM(BLACKBERRY)
+ WTFLogLocker locker(BlackBerry::Platform::LogLevelCritical);
+#endif
+
printf_stderr_common("ARGUMENT BAD: %s, %s\n", argName, assertion);
printCallSite(file, line, function);
}
@@ -275,6 +303,10 @@ void WTFReportBacktrace()
void WTFReportFatalError(const char* file, int line, const char* function, const char* format, ...)
{
+#if PLATFORM(BLACKBERRY)
+ WTFLogLocker locker(BlackBerry::Platform::LogLevelCritical);
+#endif
+
va_list args;
va_start(args, format);
vprintf_stderr_with_prefix("FATAL ERROR: ", format, args);
@@ -285,6 +317,10 @@ void WTFReportFatalError(const char* file, int line, const char* function, const
void WTFReportError(const char* file, int line, const char* function, const char* format, ...)
{
+#if PLATFORM(BLACKBERRY)
+ WTFLogLocker locker(BlackBerry::Platform::LogLevelWarn);
+#endif
+
va_list args;
va_start(args, format);
vprintf_stderr_with_prefix("ERROR: ", format, args);
@@ -298,6 +334,10 @@ void WTFLog(WTFLogChannel* channel, const char* format, ...)
if (channel->state != WTFLogChannelOn)
return;
+#if PLATFORM(BLACKBERRY)
+ WTFLogLocker locker(BlackBerry::Platform::LogLevelInfo);
+#endif
+
va_list args;
va_start(args, format);
vprintf_stderr_with_trailing_newline(format, args);
@@ -309,6 +349,10 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann
if (channel->state != WTFLogChannelOn)
return;
+#if PLATFORM(BLACKBERRY)
+ WTFLogLocker locker(BlackBerry::Platform::LogLevelInfo);
+#endif
+
va_list args;
va_start(args, format);
vprintf_stderr_with_trailing_newline(format, args);
diff --git a/Source/JavaScriptCore/wtf/ByteArray.h b/Source/JavaScriptCore/wtf/ByteArray.h
index 009ec5850..6964a33df 100644
--- a/Source/JavaScriptCore/wtf/ByteArray.h
+++ b/Source/JavaScriptCore/wtf/ByteArray.h
@@ -97,7 +97,7 @@ namespace WTF {
// MSVC can't handle correctly unsized array.
// warning C4200: nonstandard extension used : zero-sized array in struct/union
// Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array
-#if COMPILER(MSVC) && !COMPILER(INTEL)
+#if (COMPILER(MSVC) || COMPILER(SUNCC)) && !COMPILER(INTEL)
unsigned char m_data[INT_MAX];
#else
unsigned char m_data[];
diff --git a/Source/JavaScriptCore/wtf/CMakeLists.txt b/Source/JavaScriptCore/wtf/CMakeLists.txt
index 6d1cee899..52d3e3c4d 100644
--- a/Source/JavaScriptCore/wtf/CMakeLists.txt
+++ b/Source/JavaScriptCore/wtf/CMakeLists.txt
@@ -56,7 +56,6 @@ SET(WTF_HEADERS
OSAllocator.h
OSRandomSource.h
OwnArrayPtr.h
- OwnFastMallocPtr.h
OwnPtr.h
OwnPtrCommon.h
PageAllocation.h
@@ -187,12 +186,12 @@ SET(WTF_INCLUDE_DIRECTORIES
"${JAVASCRIPTCORE_DIR}/wtf/unicode"
"${JAVASCRIPTCORE_DIR}/wtf/dtoa"
"${JavaScriptCore_INCLUDE_DIRECTORIES}"
+ "${THIRDPARTY_DIR}"
)
SET(WTF_LIBRARIES
)
-
IF (ENABLE_FAST_MALLOC)
LIST(APPEND WTF_SOURCES
TCSystemAlloc.cpp
@@ -201,15 +200,8 @@ ELSE ()
ADD_DEFINITIONS(-DUSE_SYSTEM_MALLOC=1)
ENDIF()
-
-SET(WTF_PORT_FLAGS )
INCLUDE_IF_EXISTS(${JAVASCRIPTCORE_DIR}/wtf/Platform${PORT}.cmake)
-LIST(APPEND WTF_INCLUDE_DIRECTORIES
- "${CMAKE_BINARY_DIR}"
- "${CMAKE_SOURCE_DIR}/Source/ThirdParty"
-)
-
WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
INCLUDE_DIRECTORIES(${WTF_INCLUDE_DIRECTORIES})
ADD_DEFINITIONS(-DBUILDING_WTF)
diff --git a/Source/JavaScriptCore/wtf/DateMath.cpp b/Source/JavaScriptCore/wtf/DateMath.cpp
index 86bd99527..dc503ca2a 100644
--- a/Source/JavaScriptCore/wtf/DateMath.cpp
+++ b/Source/JavaScriptCore/wtf/DateMath.cpp
@@ -961,6 +961,7 @@ double parseDateFromNullTerminatedCharacters(const char* dateString, bool& haveT
else
offset = o * 60 * sgn;
} else { // GMT+05:00
+ ++dateString; // skip the ':'
long o2;
if (!parseLong(dateString, &newPosStr, 10, &o2))
return std::numeric_limits<double>::quiet_NaN();
diff --git a/Source/JavaScriptCore/wtf/Functional.h b/Source/JavaScriptCore/wtf/Functional.h
index 86d6203cf..bd0f3e282 100644
--- a/Source/JavaScriptCore/wtf/Functional.h
+++ b/Source/JavaScriptCore/wtf/Functional.h
@@ -136,6 +136,26 @@ private:
R (*m_function)(P1, P2);
};
+template<typename R, typename P1, typename P2, typename P3>
+class FunctionWrapper<R (*)(P1, P2, P3)> {
+public:
+ typedef R ResultType;
+ static const bool shouldRefFirstParameter = false;
+
+ explicit FunctionWrapper(R (*function)(P1, P2, P3))
+ : m_function(function)
+ {
+ }
+
+ R operator()(P1 p1, P2 p2, P3 p3)
+ {
+ return m_function(p1, p2, p3);
+ }
+
+private:
+ R (*m_function)(P1, P2, P3);
+};
+
template<typename R, typename C>
class FunctionWrapper<R (C::*)()> {
public:
diff --git a/Source/JavaScriptCore/wtf/ListHashSet.h b/Source/JavaScriptCore/wtf/ListHashSet.h
index 3b413406d..32bd23832 100644
--- a/Source/JavaScriptCore/wtf/ListHashSet.h
+++ b/Source/JavaScriptCore/wtf/ListHashSet.h
@@ -375,7 +375,7 @@ namespace WTF {
private:
typedef ListHashSet<ValueArg, inlineCapacity, HashArg> ListHashSetType;
typedef ListHashSetReverseIterator<ValueArg, inlineCapacity, HashArg> reverse_iterator;
- typedef ListHashSetConstIterator<ValueArg, inlineCapacity, HashArg> const_reverse_iterator;
+ typedef ListHashSetConstReverseIterator<ValueArg, inlineCapacity, HashArg> const_reverse_iterator;
typedef ListHashSetNode<ValueArg, inlineCapacity> Node;
typedef ValueArg ValueType;
typedef ValueType& ReferenceType;
diff --git a/Source/JavaScriptCore/wtf/OwnFastMallocPtr.h b/Source/JavaScriptCore/wtf/OwnFastMallocPtr.h
deleted file mode 100644
index 183bfec8f..000000000
--- a/Source/JavaScriptCore/wtf/OwnFastMallocPtr.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef OwnFastMallocPtr_h
-#define OwnFastMallocPtr_h
-
-#include "FastMalloc.h"
-#include <wtf/Noncopyable.h>
-
-namespace WTF {
-
- template<class T> class OwnFastMallocPtr {
- WTF_MAKE_NONCOPYABLE(OwnFastMallocPtr);
- public:
- explicit OwnFastMallocPtr(T* ptr) : m_ptr(ptr)
- {
- }
-
- ~OwnFastMallocPtr()
- {
- fastFree(const_cast<void*>(static_cast<const void*>(const_cast<const T*>(m_ptr))));
- }
-
- T* get() const { return m_ptr; }
- T* release() { T* ptr = m_ptr; m_ptr = 0; return ptr; }
-
- private:
- T* m_ptr;
- };
-
-} // namespace WTF
-
-using WTF::OwnFastMallocPtr;
-
-#endif // OwnFastMallocPtr_h
diff --git a/Source/JavaScriptCore/wtf/TypeTraits.cpp b/Source/JavaScriptCore/wtf/TypeTraits.cpp
index afeaa5e4c..7cea256b7 100644
--- a/Source/JavaScriptCore/wtf/TypeTraits.cpp
+++ b/Source/JavaScriptCore/wtf/TypeTraits.cpp
@@ -139,4 +139,17 @@ COMPILE_ASSERT((!IsSameType<int, RemovePointer<int**>::Type>::value), WTF_Test_R
COMPILE_ASSERT((IsSameType<int, RemoveReference<int>::Type>::value), WTF_Test_RemoveReference_int);
COMPILE_ASSERT((IsSameType<int, RemoveReference<int&>::Type>::value), WTF_Test_RemoveReference_int_reference);
+
+typedef int IntArray[];
+typedef int IntArraySized[4];
+
+COMPILE_ASSERT((IsArray<IntArray>::value), WTF_Test_IsArray_int_array);
+COMPILE_ASSERT((IsArray<IntArraySized>::value), WTF_Test_IsArray_int_sized_array);
+
+COMPILE_ASSERT((IsSameType<int, RemoveExtent<IntArray>::Type>::value), WTF_Test_RemoveExtent_int_array);
+COMPILE_ASSERT((IsSameType<int, RemoveExtent<IntArraySized>::Type>::value), WTF_Test_RemoveReference_int_sized_array);
+
+COMPILE_ASSERT((IsSameType<int*, DecayArray<IntArray>::Type>::value), WTF_Test_DecayArray_int_array);
+COMPILE_ASSERT((IsSameType<int*, DecayArray<IntArraySized>::Type>::value), WTF_Test_DecayArray_int_sized_array);
+
} // namespace WTF
diff --git a/Source/JavaScriptCore/wtf/TypeTraits.h b/Source/JavaScriptCore/wtf/TypeTraits.h
index 6c7466acc..34e8b79a3 100644
--- a/Source/JavaScriptCore/wtf/TypeTraits.h
+++ b/Source/JavaScriptCore/wtf/TypeTraits.h
@@ -35,10 +35,14 @@ namespace WTF {
// The following are provided in this file:
//
+ // Conditional<Predicate, If, Then>::Type
+ //
// IsInteger<T>::value
// IsPod<T>::value, see the definition for a note about its limitations
// IsConvertibleToInteger<T>::value
//
+ // IsArray<T>::value
+ //
// IsSameType<T, U>::value
//
// RemovePointer<T>::Type
@@ -46,9 +50,15 @@ namespace WTF {
// RemoveConst<T>::Type
// RemoveVolatile<T>::Type
// RemoveConstVolatile<T>::Type
+ // RemoveExtent<T>::Type
+ //
+ // DecayArray<T>::Type
//
// COMPILE_ASSERT's in TypeTraits.cpp illustrate their usage and what they do.
+ template <bool Predicate, class If, class Then> struct Conditional { typedef If Type; };
+ template <class If, class Then> struct Conditional<false, If, Then> { typedef Then Type; };
+
template<typename T> struct IsInteger { static const bool value = false; };
template<> struct IsInteger<bool> { static const bool value = true; };
template<> struct IsInteger<char> { static const bool value = true; };
@@ -104,6 +114,20 @@ namespace WTF {
static const bool value = IsInteger<T>::value || IsConvertibleToDouble<!IsInteger<T>::value, T>::value;
};
+
+ template <class T> struct IsArray {
+ static const bool value = false;
+ };
+
+ template <class T> struct IsArray<T[]> {
+ static const bool value = true;
+ };
+
+ template <class T, size_t N> struct IsArray<T[N]> {
+ static const bool value = true;
+ };
+
+
template <typename T, typename U> struct IsSameType {
static const bool value = false;
};
@@ -182,6 +206,28 @@ namespace WTF {
typedef T Type;
};
+ template <typename T> struct RemoveExtent {
+ typedef T Type;
+ };
+
+ template <typename T> struct RemoveExtent<T[]> {
+ typedef T Type;
+ };
+
+ template <typename T, size_t N> struct RemoveExtent<T[N]> {
+ typedef T Type;
+ };
+
+ template <class T> struct DecayArray {
+ typedef typename RemoveReference<T>::Type U;
+ public:
+ typedef typename Conditional<
+ IsArray<U>::value,
+ typename RemoveExtent<U>::Type*,
+ typename RemoveConstVolatile<U>::Type
+ >::Type Type;
+ };
+
#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
// GCC's libstdc++ 20070724 and later supports C++ TR1 type_traits in the std namespace.
diff --git a/Source/JavaScriptCore/wtf/text/StringImpl.h b/Source/JavaScriptCore/wtf/text/StringImpl.h
index a3008e1d3..003c44ce6 100644
--- a/Source/JavaScriptCore/wtf/text/StringImpl.h
+++ b/Source/JavaScriptCore/wtf/text/StringImpl.h
@@ -26,7 +26,6 @@
#include <limits.h>
#include <wtf/ASCIICType.h>
#include <wtf/Forward.h>
-#include <wtf/OwnFastMallocPtr.h>
#include <wtf/StdLibExtras.h>
#include <wtf/StringHasher.h>
#include <wtf/Vector.h>
diff --git a/Source/JavaScriptCore/wtf/wtf.pro b/Source/JavaScriptCore/wtf/wtf.pro
index e59d118e2..234348f2b 100644
--- a/Source/JavaScriptCore/wtf/wtf.pro
+++ b/Source/JavaScriptCore/wtf/wtf.pro
@@ -90,7 +90,6 @@ HEADERS += \
OSAllocator.h \
OSRandomSource.h \
OwnArrayPtr.h \
- OwnFastMallocPtr.h \
OwnPtr.h \
OwnPtrCommon.h \
PackedIntVector.h \