Fix build when the classic interpreter is enabled
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Mar 2012 18:53:51 +0000 (18:53 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Mar 2012 18:53:51 +0000 (18:53 +0000)
commitfb87a3da0cf103a2b8f1d99ad7796c65e9a5fa13
treeae92c77152a5afaa3e9c25e45a2f6449bd30f4b1
parent9ab594ea733f4b727bd5f062787b92724b68c36b
Fix build when the classic interpreter is enabled

Reviewed by Gavin Barraclough.

Fixes the following build error when running the "Generate
Derived Sources" build phase script:

    offlineasm: Parsing JavaScriptCore/llint/LowLevelInterpreter.asm and ../../JSCLLIntOffsetsExtractor and creating assembly file LLIntAssembly.h.
    ./JavaScriptCore/offlineasm/offsets.rb:145:in `offsetsAndConfigurationIndex': unhandled exception
            from JavaScriptCore/offlineasm/asm.rb:131
    Command /bin/sh failed with exit code 1

Gavin's fix in r109674 avoided the #error statement in
JITStubs.h when compiling LLIntOffsetsExtractor.cpp, but it
caused the "Generate Derived Sources" build phase script to fail
when JavaScriptCore/offlineasm/asm.rb was run.  The solution is
to detect when the classic interpreter is being built and simply
exit early from asm.rb in that case.

* llint/LLIntOffsetsExtractor.cpp:
(JSC::LLIntOffsetsExtractor::dummy): Return NULL pointer if the
JIT is disabled.  Note that offsets.rb doesn't care about the
return value here, but instead it cares about finding the magic
values in the binary.  The magic values are no longer present
when the JIT is disabled.
* offlineasm/asm.rb: Catch MissingMagicValuesException and exit
early with a status message.
* offlineasm/offsets.rb:
(MissingMagicValuesException): Add new exception class.
(offsetsAndConfigurationIndex): Throw
MissingMagicValuesException when no magic values are found.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp
Source/JavaScriptCore/offlineasm/asm.rb
Source/JavaScriptCore/offlineasm/offsets.rb