2008-09-07 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 7 Sep 2008 23:23:42 +0000 (23:23 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 7 Sep 2008 23:23:42 +0000 (23:23 +0000)
        Reviewed by Dan Bernstein.

        - rename IA32MacroAssembler class to X86Assembler

        We otherwise call the platform X86, and also, I don't see any macros.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * masm/IA32MacroAsm.h: Removed.
        * masm/MacroAssembler.h:
        (KJS::MacroAssembler::MacroAssembler):
        * masm/MacroAssemblerWin.cpp:
        (KJS::MacroAssembler::emitRestoreArgumentReference):
        * masm/X86Assembler.h: Copied from masm/IA32MacroAsm.h.
        (KJS::X86Assembler::X86Assembler):
        * wrec/WREC.cpp:
        (KJS::WRECGenerator::generateNonGreedyQuantifier):
        (KJS::WRECGenerator::generateGreedyQuantifier):
        (KJS::WRECGenerator::generateParentheses):
        (KJS::WRECGenerator::generateBackreference):
        (KJS::WRECGenerator::gernerateDisjunction):
        * wrec/WREC.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36261 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/masm/MacroAssembler.h
JavaScriptCore/masm/MacroAssemblerWin.cpp
JavaScriptCore/masm/X86Assembler.h [moved from JavaScriptCore/masm/IA32MacroAsm.h with 99% similarity]
JavaScriptCore/wrec/WREC.cpp
JavaScriptCore/wrec/WREC.h

index b0035ac..4469c7c 100644 (file)
@@ -1,3 +1,28 @@
+2008-09-07  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Dan Bernstein.
+        
+        - rename IA32MacroAssembler class to X86Assembler
+        
+        We otherwise call the platform X86, and also, I don't see any macros.
+
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * masm/IA32MacroAsm.h: Removed.
+        * masm/MacroAssembler.h:
+        (KJS::MacroAssembler::MacroAssembler):
+        * masm/MacroAssemblerWin.cpp:
+        (KJS::MacroAssembler::emitRestoreArgumentReference):
+        * masm/X86Assembler.h: Copied from masm/IA32MacroAsm.h.
+        (KJS::X86Assembler::X86Assembler):
+        * wrec/WREC.cpp:
+        (KJS::WRECGenerator::generateNonGreedyQuantifier):
+        (KJS::WRECGenerator::generateGreedyQuantifier):
+        (KJS::WRECGenerator::generateParentheses):
+        (KJS::WRECGenerator::generateBackreference):
+        (KJS::WRECGenerator::gernerateDisjunction):
+        * wrec/WREC.h:
+
 2008-09-07  Cameron Zwarich  <cwzwarich@webkit.org>
 
         Not reviewed.
index e080f39..d90dd7f 100644 (file)
                        Name="masm"\r
                        >\r
                        <File\r
-                               RelativePath="..\..\masm\IA32MacroAsm.h"\r
+                               RelativePath="..\..\masm\X86Assembler.h"\r
                                >\r
                        </File>\r
                        <File\r
index ef2746a..2947c59 100644 (file)
@@ -79,7 +79,7 @@
                8613F45B0E3A433E00C948FD /* SamplingTool.h in Headers */ = {isa = PBXBuildFile; fileRef = 8613F4590E3A433E00C948FD /* SamplingTool.h */; };
                8683B02E0E636482004C19EE /* CTI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8683B02B0E636482004C19EE /* CTI.cpp */; };
                8683B02F0E636482004C19EE /* CTI.h in Headers */ = {isa = PBXBuildFile; fileRef = 8683B02C0E636482004C19EE /* CTI.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               869081410E640C89000D36ED /* IA32MacroAsm.h in Headers */ = {isa = PBXBuildFile; fileRef = 869081400E640C89000D36ED /* IA32MacroAsm.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               869081410E640C89000D36ED /* X86Assembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 869081400E640C89000D36ED /* X86Assembler.h */; settings = {ATTRIBUTES = (Private, ); }; };
                869083150E6518D7000D36ED /* WREC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 869083130E6518D7000D36ED /* WREC.cpp */; };
                869083160E6518D7000D36ED /* WREC.h in Headers */ = {isa = PBXBuildFile; fileRef = 869083140E6518D7000D36ED /* WREC.h */; settings = {ATTRIBUTES = (Private, ); }; };
                905B02AE0E28640F006DF882 /* RefCountedLeakCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 905B02AD0E28640F006DF882 /* RefCountedLeakCounter.cpp */; };
                8613F4590E3A433E00C948FD /* SamplingTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SamplingTool.h; path = VM/SamplingTool.h; sourceTree = "<group>"; };
                8683B02B0E636482004C19EE /* CTI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CTI.cpp; path = VM/CTI.cpp; sourceTree = "<group>"; };
                8683B02C0E636482004C19EE /* CTI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CTI.h; path = VM/CTI.h; sourceTree = "<group>"; };
-               869081400E640C89000D36ED /* IA32MacroAsm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IA32MacroAsm.h; sourceTree = "<group>"; };
+               869081400E640C89000D36ED /* X86Assembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X86Assembler.h; sourceTree = "<group>"; };
                869083130E6518D7000D36ED /* WREC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WREC.cpp; sourceTree = "<group>"; };
                869083140E6518D7000D36ED /* WREC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WREC.h; sourceTree = "<group>"; };
                905B02AD0E28640F006DF882 /* RefCountedLeakCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RefCountedLeakCounter.cpp; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                A763F79C0E70E0FE00BC151E /* MacroAssembler.h */,
-                               869081400E640C89000D36ED /* IA32MacroAsm.h */,
+                               869081400E640C89000D36ED /* X86Assembler.h */,
                        );
                        path = masm;
                        sourceTree = "<group>";
                                E124A8F70E555775003091F1 /* OpaqueJSString.h in Headers */,
                                9534AAFB0E5B7A9600B8A45B /* JSProfilerPrivate.h in Headers */,
                                8683B02F0E636482004C19EE /* CTI.h in Headers */,
-                               869081410E640C89000D36ED /* IA32MacroAsm.h in Headers */,
+                               869081410E640C89000D36ED /* X86Assembler.h in Headers */,
                                869083160E6518D7000D36ED /* WREC.h in Headers */,
                                933040040E6A749400786E6A /* SmallStrings.h in Headers */,
                                BCDE3AB80E6C82F5001453A7 /* StructureID.h in Headers */,
index 172dba3..80b6747 100644 (file)
@@ -29,7 +29,7 @@
 
 #if ENABLE(MASM) && PLATFORM(X86)
 
-#include "IA32MacroAsm.h"
+#include "X86Assembler.h"
 
 #if COMPILER(GCC)
 #define WREC_CALL __attribute__ ((regparm (3)))
 
 namespace KJS {
 
-    class MacroAssembler : public IA32MacroAssembler {
+    class MacroAssembler : public X86Assembler {
     public:
         MacroAssembler(JITCodeBuffer* buffer)
-            : IA32MacroAssembler(buffer)
+            : X86Assembler(buffer)
         {
         }
 
index dac1575..1373a53 100644 (file)
@@ -40,7 +40,7 @@ void MacroAssembler::emitConvertToFastCall()
 
 void MacroAssembler::emitRestoreArgumentReference()
 {
-    emitMovl_rm(IA32MacroAssembler::esp, 0, IA32MacroAssembler::esp);
+    emitMovl_rm(esp, 0, esp);
 }
 
 }
similarity index 99%
rename from JavaScriptCore/masm/IA32MacroAsm.h
rename to JavaScriptCore/masm/X86Assembler.h
index 83e76aa..bd9b056 100644 (file)
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef IA32MacroAsm_h
-#define IA32MacroAsm_h
+#ifndef X86Assembler_h
+#define X86Assembler_h
 
 #if ENABLE(MASM) && PLATFORM(X86)
 
@@ -147,7 +147,7 @@ private:
 #define SIB(type, reg, rm) MODRM(type, reg, rm)
 #define CAN_SIGN_EXTEND_8_32(value) (value == ((int)(signed char)value))
 
-class IA32MacroAssembler {
+class X86Assembler {
 public:
     typedef enum {
         eax,
@@ -234,7 +234,7 @@ public:
     
     static const int MAX_INSTRUCTION_SIZE = 16;
 
-    IA32MacroAssembler(JITCodeBuffer* m_buffer)
+    X86Assembler(JITCodeBuffer* m_buffer)
         : m_buffer(m_buffer)
     {
         m_buffer->reset();
@@ -605,7 +605,7 @@ public:
     // Opaque label types
     
     class JmpSrc {
-        friend class IA32MacroAssembler;
+        friend class X86Assembler;
     public:
         JmpSrc()
             : m_offset(-1)
@@ -622,7 +622,7 @@ public:
     };
     
     class JmpDst {
-        friend class IA32MacroAssembler;
+        friend class X86Assembler;
     public:
         JmpDst()
             : m_offset(-1)
@@ -895,4 +895,4 @@ private:
 
 #endif // ENABLE(MASM) && PLATFORM(X86)
 
-#endif // IA32MacroAsm_h
+#endif // X86Assembler_h
index 69fdb28..316cf8a 100644 (file)
@@ -574,7 +574,7 @@ void WRECGenerator::generateNonGreedyQuantifier(JmpSrcVector& failures, Generate
     // (2.1) recursively call to parseAlternative, if it falls through, success!
     m_jit.emitPushl_r(CURR_POS_REG);
     m_parser.parseAlternative(newFailures);
-    m_jit.emitAddl_i8r(4, IA32MacroAssembler::esp);
+    m_jit.emitAddl_i8r(4, X86Assembler::esp);
     m_jit.emitPopl_r(QUANTIFIER_COUNT_REG);
     // (2.2) link failure cases to jump back up to alternativeFailed.
     for (unsigned i = 0; i < newFailures.size(); ++i)
@@ -657,7 +657,7 @@ void WRECGenerator::generateGreedyQuantifier(JmpSrcVector& failures, GenerateAto
     // (2.2) recursively call to parseAlternative, if it falls through, success!
     m_jit.emitPushl_r(CURR_POS_REG);
     m_parser.parseAlternative(newFailures);
-    m_jit.emitAddl_i8r(4, IA32MacroAssembler::esp);
+    m_jit.emitAddl_i8r(4, X86Assembler::esp);
     m_jit.emitPopl_r(QUANTIFIER_COUNT_REG);
     // (2.3) link failure cases to here.
     for (unsigned i = 0; i < newFailures.size(); ++i)
@@ -871,7 +871,7 @@ WRECGenerator::JmpSrc WRECGenerator::generateParentheses(ParenthesesType type)
         m_jit.emitMovl_rm(CURR_VAL_REG, (2 * subpatternId) * sizeof(int), OUTPUT_REG);
         m_jit.emitMovl_rm(CURR_POS_REG, (2 * subpatternId + 1) * sizeof(int), OUTPUT_REG);
     } else if (type == non_capturing)
-        m_jit.emitAddl_i8r(4, IA32MacroAssembler::esp);
+        m_jit.emitAddl_i8r(4, X86Assembler::esp);
     else
         m_jit.emitPopl_r(CURR_POS_REG);
 
@@ -1082,7 +1082,7 @@ void WRECGenerator::generateBackreference(JmpSrcVector& failures, unsigned subpa
     // Success
     m_jit.link(endOfBackRef, m_jit.label());
     m_jit.emitPopl_r(QUANTIFIER_COUNT_REG);
-    m_jit.emitAddl_i8r(4, IA32MacroAssembler::esp);
+    m_jit.emitAddl_i8r(4, X86Assembler::esp);
 }
 
 void WRECGenerator::gernerateDisjunction(JmpSrcVector& successes, JmpSrcVector& failures)
@@ -1095,7 +1095,7 @@ void WRECGenerator::gernerateDisjunction(JmpSrcVector& successes, JmpSrcVector&
         m_jit.link(failures[i], here);
     failures.clear();
     
-    m_jit.emitMovl_mr(IA32MacroAssembler::esp, CURR_POS_REG);
+    m_jit.emitMovl_mr(X86Assembler::esp, CURR_POS_REG);
 }
 
 void WRECGenerator::terminateDisjunction(JmpSrcVector& successes)
index 295c60b..bb919db 100644 (file)
@@ -87,13 +87,13 @@ namespace KJS {
         typedef MacroAssembler::JmpDst JmpDst;
 
         // these regs setup by the params
-        static const IA32MacroAssembler::RegisterID INPUT_REG = IA32MacroAssembler::eax;
-        static const IA32MacroAssembler::RegisterID CURR_POS_REG = IA32MacroAssembler::edx;
-        static const IA32MacroAssembler::RegisterID LENGTH_REG = IA32MacroAssembler::ecx;
+        static const X86Assembler::RegisterID INPUT_REG = X86Assembler::eax;
+        static const X86Assembler::RegisterID CURR_POS_REG = X86Assembler::edx;
+        static const X86Assembler::RegisterID LENGTH_REG = X86Assembler::ecx;
         // CURR_VAL_REG used as a temporary, DISJUNCTION_BEGIN_POS_REG holds the start of the current disjunction - which is the start of the whole match, for the top--level dijunction.
-        static const IA32MacroAssembler::RegisterID CURR_VAL_REG = IA32MacroAssembler::esi;
-        static const IA32MacroAssembler::RegisterID OUTPUT_REG = IA32MacroAssembler::edi;
-        static const IA32MacroAssembler::RegisterID QUANTIFIER_COUNT_REG = IA32MacroAssembler::ebx;
+        static const X86Assembler::RegisterID CURR_VAL_REG = X86Assembler::esi;
+        static const X86Assembler::RegisterID OUTPUT_REG = X86Assembler::edi;
+        static const X86Assembler::RegisterID QUANTIFIER_COUNT_REG = X86Assembler::ebx;
 
         friend class GenerateAtomFunctor;
         friend class GeneratePatternCharacterFunctor;