Skip to content

Commit

Permalink
Merge r180258 - Fix the C-Loop LLInt build
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=141618

Reviewed by Filip Pizlo.

I broke C-Loop when moving the common code of pow()
to JITOperations because that file is #ifdefed out
when the JITs are disabled.

It would be weird to move it back to MathObject since
the function needs to know about the calling conventions.

To avoid making a mess, I just gave the function its own file
that is used by both the runtime and the JIT.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGAbstractInterpreterInlines.h:
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* runtime/MathCommon.cpp: Added.
(JSC::fdlibmScalbn):
(JSC::fdlibmPow):
(JSC::isDenormal):
(JSC::isEdgeCase):
(JSC::mathPowInternal):
(JSC::operationMathPow):
* runtime/MathCommon.h: Added.
* runtime/MathObject.cpp:
  • Loading branch information
BenjaminPoulain authored and carlosgcampos committed Feb 27, 2015
1 parent ba94a96 commit 56be359
Show file tree
Hide file tree
Showing 11 changed files with 527 additions and 399 deletions.
1 change: 1 addition & 0 deletions Source/JavaScriptCore/CMakeLists.txt
Expand Up @@ -507,6 +507,7 @@ set(JavaScriptCore_RUNTIME_SOURCES
runtime/MapIteratorConstructor.cpp
runtime/MapIteratorPrototype.cpp
runtime/MapPrototype.cpp
runtime/MathCommon.cpp
runtime/MathObject.cpp
runtime/MemoryStatistics.cpp
runtime/NativeErrorConstructor.cpp
Expand Down
41 changes: 41 additions & 0 deletions Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,44 @@
2015-02-18 Csaba Osztrogonác <ossy@webkit.org>

URTBF after r180258 to fix Windows build.

* runtime/MathCommon.cpp:
(JSC::mathPowInternal):

2015-02-18 Benjamin Poulain <benjamin@webkit.org>

Fix the C-Loop LLInt build
https://bugs.webkit.org/show_bug.cgi?id=141618

Reviewed by Filip Pizlo.

I broke C-Loop when moving the common code of pow()
to JITOperations because that file is #ifdefed out
when the JITs are disabled.

It would be weird to move it back to MathObject since
the function needs to know about the calling conventions.

To avoid making a mess, I just gave the function its own file
that is used by both the runtime and the JIT.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGAbstractInterpreterInlines.h:
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* runtime/MathCommon.cpp: Added.
(JSC::fdlibmScalbn):
(JSC::fdlibmPow):
(JSC::isDenormal):
(JSC::isEdgeCase):
(JSC::mathPowInternal):
(JSC::operationMathPow):
* runtime/MathCommon.h: Added.
* runtime/MathObject.cpp:

2015-02-17 Benjamin Poulain <bpoulain@apple.com>

Clean up OSRExit's considerAddingAsFrequentExitSite()
Expand Down
Expand Up @@ -773,6 +773,7 @@
<ClCompile Include="..\runtime\MapIteratorConstructor.cpp" />
<ClCompile Include="..\runtime\MapIteratorPrototype.cpp" />
<ClCompile Include="..\runtime\MapPrototype.cpp" />
<ClCompile Include="..\runtime\MathCommon.cpp" />
<ClCompile Include="..\runtime\MathObject.cpp" />
<ClCompile Include="..\runtime\MemoryStatistics.cpp" />
<ClCompile Include="..\runtime\NativeErrorConstructor.cpp" />
Expand Down Expand Up @@ -1567,6 +1568,7 @@
<ClInclude Include="..\runtime\MapIteratorPrototype.h" />
<ClInclude Include="..\runtime\MapPrototype.h" />
<ClInclude Include="..\runtime\MatchResult.h" />
<ClInclude Include="..\runtime\MathCommon.h" />
<ClInclude Include="..\runtime\MathObject.h" />
<ClInclude Include="..\runtime\MemoryStatistics.h" />
<ClInclude Include="..\runtime\Microtask.h" />
Expand Down Expand Up @@ -1759,4 +1761,4 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
</Project>
</Project>
Expand Up @@ -735,6 +735,9 @@
<ClCompile Include="..\runtime\MapConstructor.cpp">
<Filter>runtime</Filter>
</ClCompile>
<ClCompile Include="..\runtime\MathCommon.cpp">
<Filter>runtime</Filter>
</ClCompile>
<ClCompile Include="..\runtime\MathObject.cpp">
<Filter>runtime</Filter>
</ClCompile>
Expand Down Expand Up @@ -4391,4 +4394,4 @@
<Filter>jit</Filter>
</MASM>
</ItemGroup>
</Project>
</Project>
20 changes: 14 additions & 6 deletions Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Expand Up @@ -897,6 +897,8 @@
2AF7382D18BBBF92008A5A37 /* StructureIDTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AF7382B18BBBF92008A5A37 /* StructureIDTable.h */; settings = {ATTRIBUTES = (Private, ); }; };
371D842D17C98B6E00ECF994 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 371D842C17C98B6E00ECF994 /* libz.dylib */; };
41359CF30FDD89AD00206180 /* DateConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = D21202290AD4310C00ED79B6 /* DateConversion.h */; };
4340A4841A9051AF00D73CCA /* MathCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4340A4821A9051AF00D73CCA /* MathCommon.cpp */; };
4340A4851A9051AF00D73CCA /* MathCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 4340A4831A9051AF00D73CCA /* MathCommon.h */; };
4443AE3316E188D90076F110 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F0EB6105C86C6B00E6DF1B /* Foundation.framework */; };
451539B912DC994500EF7AC4 /* Yarr.h in Headers */ = {isa = PBXBuildFile; fileRef = 451539B812DC994500EF7AC4 /* Yarr.h */; settings = {ATTRIBUTES = (Private, ); }; };
52678F8E1A031009006A306D /* BasicBlockLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52678F8C1A031009006A306D /* BasicBlockLocation.cpp */; };
Expand Down Expand Up @@ -2535,6 +2537,8 @@
2AF7382A18BBBF92008A5A37 /* StructureIDTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StructureIDTable.cpp; sourceTree = "<group>"; };
2AF7382B18BBBF92008A5A37 /* StructureIDTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureIDTable.h; sourceTree = "<group>"; };
371D842C17C98B6E00ECF994 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
4340A4821A9051AF00D73CCA /* MathCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathCommon.cpp; sourceTree = "<group>"; };
4340A4831A9051AF00D73CCA /* MathCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathCommon.h; sourceTree = "<group>"; };
449097EE0F8F81B50076A327 /* FeatureDefines.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FeatureDefines.xcconfig; sourceTree = "<group>"; };
451539B812DC994500EF7AC4 /* Yarr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Yarr.h; path = yarr/Yarr.h; sourceTree = "<group>"; };
45E12D8806A49B0F00E9DF84 /* jsc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsc.cpp; sourceTree = "<group>"; tabWidth = 4; };
Expand Down Expand Up @@ -4203,8 +4207,6 @@
0FB7F38A15ED8E3800F167B2 /* ArrayStorage.h */,
52678F8C1A031009006A306D /* BasicBlockLocation.cpp */,
52678F8D1A031009006A306D /* BasicBlockLocation.h */,
52B717B41A0597E1007AF4F3 /* ControlFlowProfiler.cpp */,
52678F901A04177C006A306D /* ControlFlowProfiler.h */,
147B83AA0E6DB8C9004775A4 /* BatchedTransitionOptimizer.h */,
866739D013BFDE710023D87C /* BigInteger.h */,
BC7952320E15EB5600A898AB /* BooleanConstructor.cpp */,
Expand Down Expand Up @@ -4243,6 +4245,8 @@
0FFC99D0184EC8AD009C10AB /* ConstantMode.h */,
BCA62DFF0E2826310004F30D /* ConstructData.cpp */,
BC8F3CCF0DAF17BA00577A80 /* ConstructData.h */,
52B717B41A0597E1007AF4F3 /* ControlFlowProfiler.cpp */,
52678F901A04177C006A306D /* ControlFlowProfiler.h */,
2A111243192FCE79005EE18D /* CustomGetterSetter.cpp */,
2A111244192FCE79005EE18D /* CustomGetterSetter.h */,
0F2B66B017B6B5AB00A7AE3F /* DataView.cpp */,
Expand Down Expand Up @@ -4306,8 +4310,6 @@
BC9BB95B0E19680600DF8855 /* InternalFunction.cpp */,
BC11667A0E199C05008066DD /* InternalFunction.h */,
86BF642A148DB2B5004DE36A /* Intrinsic.h */,
14DA818F0D99FD2000B0A4FB /* JSLexicalEnvironment.cpp */,
14DA818E0D99FD2000B0A4FB /* JSLexicalEnvironment.h */,
A76140CB182982CB00750624 /* JSArgumentsIterator.cpp */,
A76140CC182982CB00750624 /* JSArgumentsIterator.h */,
93ADFCE60CCBD7AC00D30B08 /* JSArray.cpp */,
Expand Down Expand Up @@ -4343,6 +4345,8 @@
9788FC221471AD0C0068CE2D /* JSDateMath.cpp */,
9788FC231471AD0C0068CE2D /* JSDateMath.h */,
C2A7F687160432D400F76B98 /* JSDestructibleObject.h */,
BC22A39A0E16E14800AF21C8 /* JSEnvironmentRecord.cpp */,
14F252560D08DD8D004ECFFF /* JSEnvironmentRecord.h */,
A7B4ACAE1484C9CE00B38A36 /* JSExportMacros.h */,
0F2B66C117B6B5AB00A7AE3F /* JSFloat32Array.h */,
0F2B66C217B6B5AB00A7AE3F /* JSFloat64Array.h */,
Expand All @@ -4364,6 +4368,8 @@
0F2B66C917B6B5AB00A7AE3F /* JSInt8Array.h */,
0F2B66CA17B6B5AB00A7AE3F /* JSInt16Array.h */,
0F2B66CB17B6B5AB00A7AE3F /* JSInt32Array.h */,
14DA818F0D99FD2000B0A4FB /* JSLexicalEnvironment.cpp */,
14DA818E0D99FD2000B0A4FB /* JSLexicalEnvironment.h */,
65EA4C99092AF9E20093D800 /* JSLock.cpp */,
65EA4C9A092AF9E20093D800 /* JSLock.h */,
A700873F17CBE8EB00C3E643 /* JSMap.cpp */,
Expand Down Expand Up @@ -4421,8 +4427,6 @@
0F2B66D317B6B5AB00A7AE3F /* JSUint8ClampedArray.h */,
0F2B66D417B6B5AB00A7AE3F /* JSUint16Array.h */,
0F2B66D517B6B5AB00A7AE3F /* JSUint32Array.h */,
BC22A39A0E16E14800AF21C8 /* JSEnvironmentRecord.cpp */,
14F252560D08DD8D004ECFFF /* JSEnvironmentRecord.h */,
A7CA3AE117DA41AE006538AF /* JSWeakMap.cpp */,
A7CA3AE217DA41AE006538AF /* JSWeakMap.h */,
1442565F15EDE98D0066A49B /* JSWithScope.cpp */,
Expand All @@ -4444,6 +4448,8 @@
A700873B17CBE8D300C3E643 /* MapPrototype.cpp */,
A700873C17CBE8D300C3E643 /* MapPrototype.h */,
8612E4CB1522918400C836BE /* MatchResult.h */,
4340A4821A9051AF00D73CCA /* MathCommon.cpp */,
4340A4831A9051AF00D73CCA /* MathCommon.h */,
F692A86A0255597D01FF60F7 /* MathObject.cpp */,
F692A86B0255597D01FF60F7 /* MathObject.h */,
90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */,
Expand Down Expand Up @@ -6139,6 +6145,7 @@
0FA7A8EC18B413C80052371D /* Reg.h in Headers */,
BC18C45A0E16F5CD00B34460 /* RegExp.h in Headers */,
A1712B3F11C7B228007A5315 /* RegExpCache.h in Headers */,
4340A4851A9051AF00D73CCA /* MathCommon.h in Headers */,
BCD202C20E1706A7002C7E82 /* RegExpConstructor.h in Headers */,
BCD202D60E170708002C7E82 /* RegExpConstructor.lut.h in Headers */,
A1712B4111C7B235007A5315 /* RegExpKey.h in Headers */,
Expand Down Expand Up @@ -7327,6 +7334,7 @@
14F7256514EE265E00B1652B /* WeakHandleOwner.cpp in Sources */,
A7CA3AE317DA41AE006538AF /* WeakMapConstructor.cpp in Sources */,
A7CA3AEB17DA5168006538AF /* WeakMapData.cpp in Sources */,
4340A4841A9051AF00D73CCA /* MathCommon.cpp in Sources */,
A7CA3AE517DA41AE006538AF /* WeakMapPrototype.cpp in Sources */,
14E84FA014EE1ACC00D6D5D4 /* WeakSet.cpp in Sources */,
2A4EC90B1860D6C20094F782 /* WriteBarrierBuffer.cpp in Sources */,
Expand Down
1 change: 1 addition & 0 deletions Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
Expand Up @@ -32,6 +32,7 @@
#include "GetByIdStatus.h"
#include "GetterSetter.h"
#include "JITOperations.h"
#include "MathCommon.h"
#include "Operations.h"
#include "PutByIdStatus.h"
#include "StringObject.h"
Expand Down

0 comments on commit 56be359

Please sign in to comment.