Title: [153360] trunk/Source/_javascript_Core
Revision
153360
Author
msab...@apple.com
Date
2013-07-25 17:22:14 -0700 (Thu, 25 Jul 2013)

Log Message

[Windows] Speculative build fix.

Moved interpreterThrowInCaller() out of LLintExceptions.cpp into new CommonSlowPathsExceptions.cpp
that is always compiled.  Made LLInt::returnToThrow() conditional on LLINT being enabled.
Roger will add the new files to Windows project in another checkin.

* _javascript_Core.xcodeproj/project.pbxproj:
* llint/LLIntExceptions.cpp:
* llint/LLIntExceptions.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPathsExceptions.cpp: Added.
(JSC::CommonSlowPaths::interpreterThrowInCaller):
* runtime/CommonSlowPathsExceptions.h: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (153359 => 153360)


--- trunk/Source/_javascript_Core/ChangeLog	2013-07-26 00:19:54 UTC (rev 153359)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-07-26 00:22:14 UTC (rev 153360)
@@ -1,3 +1,21 @@
+2013-07-25  Michael Saboff  <msab...@apple.com>
+
+        [Windows] Speculative build fix.
+
+        Moved interpreterThrowInCaller() out of LLintExceptions.cpp into new CommonSlowPathsExceptions.cpp
+        that is always compiled.  Made LLInt::returnToThrow() conditional on LLINT being enabled.
+
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        * llint/LLIntExceptions.cpp:
+        * llint/LLIntExceptions.h:
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+        * runtime/CommonSlowPaths.cpp:
+        (JSC::SLOW_PATH_DECL):
+        * runtime/CommonSlowPathsExceptions.cpp: Added.
+        (JSC::CommonSlowPaths::interpreterThrowInCaller):
+        * runtime/CommonSlowPathsExceptions.h: Added.
+
 2013-07-25  Brent Fulgham  <bfulg...@apple.com>
 
         [Windows] Unreviewed build fix.

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (153359 => 153360)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2013-07-26 00:19:54 UTC (rev 153359)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2013-07-26 00:22:14 UTC (rev 153360)
@@ -590,6 +590,8 @@
 		651122FE14046A4C002B101D /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */; };
 		6511230714046B0A002B101D /* testRegExp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 651122E5140469BA002B101D /* testRegExp.cpp */; };
 		65303D641447B9E100D3F904 /* ParserTokens.h in Headers */ = {isa = PBXBuildFile; fileRef = 65303D631447B9E100D3F904 /* ParserTokens.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		6553A33117A1F1EE008CF6F3 /* CommonSlowPathsExceptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6553A32F17A1F1EE008CF6F3 /* CommonSlowPathsExceptions.cpp */; };
+		6553A33217A1F1EE008CF6F3 /* CommonSlowPathsExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6553A33017A1F1EE008CF6F3 /* CommonSlowPathsExceptions.h */; };
 		655EB29B10CE2581001A990E /* NodesCodegen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 655EB29A10CE2581001A990E /* NodesCodegen.cpp */; };
 		65C02850171795E200351E35 /* ARMv7Disassembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65C0284F171795E200351E35 /* ARMv7Disassembler.cpp */; };
 		65C0285C1717966800351E35 /* ARMv7DOpcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65C0285A1717966800351E35 /* ARMv7DOpcode.cpp */; };
@@ -1631,6 +1633,8 @@
 		65303D631447B9E100D3F904 /* ParserTokens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParserTokens.h; sourceTree = "<group>"; };
 		65400C0F0A69BAF200509887 /* PropertyNameArray.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PropertyNameArray.cpp; sourceTree = "<group>"; };
 		65400C100A69BAF200509887 /* PropertyNameArray.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PropertyNameArray.h; sourceTree = "<group>"; };
+		6553A32F17A1F1EE008CF6F3 /* CommonSlowPathsExceptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommonSlowPathsExceptions.cpp; sourceTree = "<group>"; };
+		6553A33017A1F1EE008CF6F3 /* CommonSlowPathsExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonSlowPathsExceptions.h; sourceTree = "<group>"; };
 		655EB29A10CE2581001A990E /* NodesCodegen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodesCodegen.cpp; sourceTree = "<group>"; };
 		6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
 		65621E6B089E859700760F35 /* PropertySlot.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PropertySlot.cpp; sourceTree = "<group>"; tabWidth = 8; };
@@ -2791,6 +2795,8 @@
 		7EF6E0BB0EB7A1EC0079AFAF /* runtime */ = {
 			isa = PBXGroup;
 			children = (
+				6553A32F17A1F1EE008CF6F3 /* CommonSlowPathsExceptions.cpp */,
+				6553A33017A1F1EE008CF6F3 /* CommonSlowPathsExceptions.h */,
 				BCF605110E203EF800B9A64D /* ArgList.cpp */,
 				BCF605120E203EF800B9A64D /* ArgList.h */,
 				BC257DE50E1F51C50016B6C9 /* Arguments.cpp */,
@@ -3965,6 +3971,7 @@
 				E49DC16D12EF295300184A1F /* SourceProviderCacheItem.h in Headers */,
 				0FB7F39E15ED8E4600F167B2 /* SparseArrayValueMap.h in Headers */,
 				A7386554118697B400540279 /* SpecializedThunkJIT.h in Headers */,
+				6553A33217A1F1EE008CF6F3 /* CommonSlowPathsExceptions.h in Headers */,
 				0F5541B21613C1FB00CE3E25 /* SpecialPointer.h in Headers */,
 				0FD82E54141DAEEE00179C94 /* SpeculatedType.h in Headers */,
 				A7C1EAF217987AB600299DB2 /* StackIterator.h in Headers */,
@@ -4677,6 +4684,7 @@
 				0FF729AF166AD35C000F5BA3 /* ProfilerCompilation.cpp in Sources */,
 				0FF729B0166AD35C000F5BA3 /* ProfilerCompilationKind.cpp in Sources */,
 				0FF729B1166AD35C000F5BA3 /* ProfilerCompiledBytecode.cpp in Sources */,
+				6553A33117A1F1EE008CF6F3 /* CommonSlowPathsExceptions.cpp in Sources */,
 				0FF729B2166AD35C000F5BA3 /* ProfilerDatabase.cpp in Sources */,
 				0FF729B3166AD35C000F5BA3 /* ProfilerOrigin.cpp in Sources */,
 				0FF729B4166AD35C000F5BA3 /* ProfilerOriginStack.cpp in Sources */,

Modified: trunk/Source/_javascript_Core/llint/LLIntExceptions.cpp (153359 => 153360)


--- trunk/Source/_javascript_Core/llint/LLIntExceptions.cpp	2013-07-26 00:19:54 UTC (rev 153359)
+++ trunk/Source/_javascript_Core/llint/LLIntExceptions.cpp	2013-07-26 00:22:14 UTC (rev 153360)
@@ -38,18 +38,6 @@
 
 namespace JSC { namespace LLInt {
 
-void interpreterThrowInCaller(ExecState* exec, ReturnAddressPtr pc)
-{
-    VM* vm = &exec->vm();
-    NativeCallFrameTracer tracer(vm, exec);
-#if LLINT_SLOW_PATH_TRACING
-    dataLog("Throwing exception ", vm->exception, ".\n");
-#endif
-    genericThrow(
-        vm, exec, vm->exception,
-        exec->codeBlock()->bytecodeOffset(exec, pc));
-}
-
 Instruction* returnToThrowForThrownException(ExecState* exec)
 {
     UNUSED_PARAM(exec);

Modified: trunk/Source/_javascript_Core/llint/LLIntExceptions.h (153359 => 153360)


--- trunk/Source/_javascript_Core/llint/LLIntExceptions.h	2013-07-26 00:19:54 UTC (rev 153359)
+++ trunk/Source/_javascript_Core/llint/LLIntExceptions.h	2013-07-26 00:22:14 UTC (rev 153360)
@@ -40,9 +40,6 @@
 
 namespace LLInt {
 
-// Throw the currently active exception in the context of the caller's call frame.
-void interpreterThrowInCaller(ExecState* callerFrame, ReturnAddressPtr);
-
 // Tells you where to jump to if you want to return-to-throw, after you've already
 // set up all information needed to throw the exception.
 Instruction* returnToThrowForThrownException(ExecState*);

Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (153359 => 153360)


--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp	2013-07-26 00:19:54 UTC (rev 153359)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp	2013-07-26 00:22:14 UTC (rev 153360)
@@ -32,6 +32,7 @@
 #include "ArrayConstructor.h"
 #include "CallFrame.h"
 #include "CommonSlowPaths.h"
+#include "CommonSlowPathsExceptions.h"
 #include "GetterSetter.h"
 #include "HostCallReturnValue.h"
 #include "Interpreter.h"
@@ -422,7 +423,7 @@
         ReturnAddressPtr returnPC = exec->returnPC();
         exec = exec->callerFrame();
         vm.exception = createStackOverflowError(exec);
-        interpreterThrowInCaller(exec, returnPC);
+        CommonSlowPaths::interpreterThrowInCaller(exec, returnPC);
         pc = returnToThrowForThrownException(exec);
     }
     LLINT_END_IMPL();

Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp (153359 => 153360)


--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp	2013-07-26 00:19:54 UTC (rev 153359)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp	2013-07-26 00:22:14 UTC (rev 153360)
@@ -32,6 +32,7 @@
 #include "ArrayConstructor.h"
 #include "CallFrame.h"
 #include "CodeProfiling.h"
+#include "CommonSlowPathsExceptions.h"
 #include "GetterSetter.h"
 #include "HostCallReturnValue.h"
 #include "Interpreter.h"
@@ -70,6 +71,12 @@
     } while (false)
 #endif
 
+#if ENABLE(LLINT)
+#define RETURN_TO_THROW(exec, pc)   pc = LLInt::returnToThrow(exec, pc)
+#else
+#define RETURN_TO_THROW(exec, pc)
+#endif
+
 #define BEGIN()                           \
     BEGIN_NO_SET_PC();                    \
     SET_PC_FOR_STUBS()
@@ -85,13 +92,13 @@
 
 #define THROW(exceptionToThrow) do {                        \
         vm.exception = (exceptionToThrow);                \
-        pc = LLInt::returnToThrow(exec, pc);                             \
+        RETURN_TO_THROW(exec, pc);                             \
         END_IMPL();                                         \
     } while (false)
 
 #define CHECK_EXCEPTION() do {                    \
         if (UNLIKELY(vm.exception)) {           \
-            pc = LLInt::returnToThrow(exec, pc);               \
+            RETURN_TO_THROW(exec, pc);               \
             END_IMPL();                           \
         }                                               \
     } while (false)
@@ -171,7 +178,7 @@
         ReturnAddressPtr returnPC = exec->returnPC();
         exec = exec->callerFrame();
         vm.exception = createStackOverflowError(exec);
-        LLInt::interpreterThrowInCaller(exec, returnPC);
+        CommonSlowPaths::interpreterThrowInCaller(exec, returnPC);
         RETURN_TWO(bitwise_cast<void*>(static_cast<uintptr_t>(1)), exec);
     }
     RETURN_TWO(0, reinterpret_cast<ExecState*>(SlotsToAdd));
@@ -185,7 +192,7 @@
         ReturnAddressPtr returnPC = exec->returnPC();
         exec = exec->callerFrame();
         vm.exception = createStackOverflowError(exec);
-        LLInt::interpreterThrowInCaller(exec, returnPC);
+        CommonSlowPaths::interpreterThrowInCaller(exec, returnPC);
         RETURN_TWO(bitwise_cast<void*>(static_cast<uintptr_t>(1)), exec);
     }
     RETURN_TWO(0, reinterpret_cast<ExecState*>(SlotsToAdd));

Added: trunk/Source/_javascript_Core/runtime/CommonSlowPathsExceptions.cpp (0 => 153360)


--- trunk/Source/_javascript_Core/runtime/CommonSlowPathsExceptions.cpp	                        (rev 0)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPathsExceptions.cpp	2013-07-26 00:22:14 UTC (rev 153360)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2013 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 "CommonSlowPathsExceptions.h"
+
+#include "CallFrame.h"
+#include "CodeBlock.h"
+#include "JITExceptions.h"
+#include "LLIntCommon.h"
+
+namespace JSC { namespace CommonSlowPaths {
+
+void interpreterThrowInCaller(ExecState* exec, ReturnAddressPtr pc)
+{
+    VM* vm = &exec->vm();
+    NativeCallFrameTracer tracer(vm, exec);
+#if LLINT_SLOW_PATH_TRACING
+    dataLog("Throwing exception ", vm->exception, ".\n");
+#endif
+    genericThrow(
+        vm, exec, vm->exception,
+        exec->codeBlock()->bytecodeOffset(exec, pc));
+}
+
+} } // namespace JSC::LLInt

Added: trunk/Source/_javascript_Core/runtime/CommonSlowPathsExceptions.h (0 => 153360)


--- trunk/Source/_javascript_Core/runtime/CommonSlowPathsExceptions.h	                        (rev 0)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPathsExceptions.h	2013-07-26 00:22:14 UTC (rev 153360)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2013 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 CommonSlowPathExceptions_h
+#define CommonSlowPathExceptions_h
+
+#include <wtf/Platform.h>
+
+#include "MacroAssemblerCodeRef.h"
+
+namespace JSC {
+
+class ExecState;
+
+namespace CommonSlowPaths {
+
+// Throw the currently active exception in the context of the caller's call frame.
+void interpreterThrowInCaller(ExecState* callerFrame, ReturnAddressPtr);
+
+} } // namespace JSC::CommonSlowPaths
+
+#endif // CommonSlowPathExceptions_h
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to