Bug 832063 - unify Assembler::flush/finish (r=mrosenberg)
authorLuke Wagner <luke@mozilla.com>
Thu, 20 Dec 2012 19:12:24 -0800
changeset 119329 879677a0aa37c0f811a6c4348d5a3dc27aa98984
parent 119328 6e5e10fb6d73dbee1bced3a42eb795bfa98b7c68
child 119330 dcf3f2446544fdb714cf96fbc9176908de9f839f
push id24195
push userMs2ger@gmail.com
push dateSat, 19 Jan 2013 16:10:11 +0000
treeherdermozilla-central@02e12a80aef9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrosenberg
bugs832063
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 832063 - unify Assembler::flush/finish (r=mrosenberg)
js/src/ion/IonLinker.h
js/src/ion/shared/Assembler-x86-shared.h
js/src/ion/x64/Assembler-x64.cpp
js/src/ion/x64/Assembler-x64.h
js/src/ion/x86/Assembler-x86.h
--- a/js/src/ion/IonLinker.h
+++ b/js/src/ion/IonLinker.h
@@ -25,19 +25,16 @@ class Linker
 
     IonCode *fail(JSContext *cx) {
         js_ReportOutOfMemory(cx);
         return NULL;
     }
 
     IonCode *newCode(JSContext *cx, IonCompartment *comp) {
         AssertCanGC();
-#ifndef JS_CPU_ARM
-        masm.flush();
-#endif
         if (masm.oom())
             return fail(cx);
 
         JSC::ExecutablePool *pool;
         size_t bytesNeeded = masm.bytesNeeded() + sizeof(IonCode *) + CodeAlignment;
         if (bytesNeeded >= MAX_BUFFER_SIZE)
             return fail(cx);
 
--- a/js/src/ion/shared/Assembler-x86-shared.h
+++ b/js/src/ion/shared/Assembler-x86-shared.h
@@ -1193,19 +1193,16 @@ class AssemblerX86Shared
 
     uint32_t actualIndex(uint32_t x) {
         return x;
     }
 
     void flushBuffer() {
     }
 
-    void finish() {
-    }
-
     // Patching.
 
     static size_t patchWrite_NearCallSize() {
         return 5;
     }
     static uintptr_t getPointer(uint8_t *instPtr) {
         uintptr_t *ptr = ((uintptr_t *) instPtr) - 1;
         return *ptr;
--- a/js/src/ion/x64/Assembler-x64.cpp
+++ b/js/src/ion/x64/Assembler-x64.cpp
@@ -70,17 +70,17 @@ Assembler::PatchableJumpAddress(IonCode 
 void
 Assembler::PatchJumpEntry(uint8_t *entry, uint8_t *target)
 {
     uint8_t **index = (uint8_t **) (entry + SizeOfExtendedJump - sizeof(void*));
     *index = target;
 }
 
 void
-Assembler::flush()
+Assembler::finish()
 {
     if (!jumps_.length() || oom())
         return;
 
     // Emit the jump table.
     masm.align(16);
     extendedJumpTable_ = masm.size();
 
--- a/js/src/ion/x64/Assembler-x64.h
+++ b/js/src/ion/x64/Assembler-x64.h
@@ -280,17 +280,17 @@ class Assembler : public AssemblerX86Sha
       : extendedJumpTable_(0)
     {
     }
 
     static void TraceJumpRelocations(JSTracer *trc, IonCode *code, CompactBufferReader &reader);
 
     // The buffer is about to be linked, make sure any constant pools or excess
     // bookkeeping has been flushed to the instruction stream.
-    void flush();
+    void finish();
 
     // Copy the assembly code to the given buffer, and perform any pending
     // relocations relying on the target address.
     void executableCopy(uint8_t *buffer);
 
     // Actual assembly emitting functions.
 
     void push(const ImmGCPtr ptr) {
--- a/js/src/ion/x86/Assembler-x86.h
+++ b/js/src/ion/x86/Assembler-x86.h
@@ -222,17 +222,17 @@ class Assembler : public AssemblerX86Sha
     using AssemblerX86Shared::cmpl;
     using AssemblerX86Shared::call;
     using AssemblerX86Shared::push;
 
     static void TraceJumpRelocations(JSTracer *trc, IonCode *code, CompactBufferReader &reader);
 
     // The buffer is about to be linked, make sure any constant pools or excess
     // bookkeeping has been flushed to the instruction stream.
-    void flush() { }
+    void finish() { }
 
     // Copy the assembly code to the given buffer, and perform any pending
     // relocations relying on the target address.
     void executableCopy(uint8_t *buffer);
 
     // Actual assembly emitting functions.
 
     void push(const ImmGCPtr &ptr) {