Changeset 139004 in webkit
- Timestamp:
- Jan 7, 2013 3:49:29 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSBase.h
r138664 r139004 142 142 /* Enable the Objective-C API for platforms with a modern runtime. */ 143 143 #undef JS_OBJC_API_ENABLED 144 #define JS_OBJC_API_ENABLED (defined(__clang__) && defined(__APPLE__) && (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)&& !defined(__i386__))144 #define JS_OBJC_API_ENABLED (defined(__clang__) && defined(__APPLE__) && defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 && !defined(__i386__)) 145 145 146 146 #endif /* JSBase_h */ -
trunk/Source/JavaScriptCore/ChangeLog
r138970 r139004 1 2013-01-07 Filip Pizlo <fpizlo@apple.com> 2 3 Unreviewed, it should be possible to build JSC on ARM. 4 5 * API/JSBase.h: 6 * jit/JITStubs.cpp: 7 (JSC::performPlatformSpecificJITAssertions): 8 (JSC): 9 * jit/JITStubs.h: 10 (JSC): 11 * jit/JITThunks.cpp: 12 (JSC::JITThunks::JITThunks): 13 * jit/JITThunks.h: 14 (JITThunks): 15 * offlineasm/armv7.rb: 16 * runtime/JSGlobalData.cpp: 17 (JSC::JSGlobalData::JSGlobalData): 18 1 19 2013-01-07 Balazs Kilvady <kilvadyb@homejinni.com> 2 20 -
trunk/Source/JavaScriptCore/jit/JITStubs.cpp
r138970 r139004 789 789 #define CTI_SAMPLER 0 790 790 #endif 791 792 void performPlatformSpecificJITAssertions(JSGlobalData* globalData) 793 { 794 if (!globalData->canUseJIT()) 795 return; 796 797 #if CPU(ARM_THUMB2) 798 // Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it contains non POD types), 799 // and the OBJECT_OFFSETOF macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT 800 // macros. 801 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedReturnAddress) == PRESERVED_RETURN_ADDRESS_OFFSET); 802 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR4) == PRESERVED_R4_OFFSET); 803 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR5) == PRESERVED_R5_OFFSET); 804 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR6) == PRESERVED_R6_OFFSET); 805 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR7) == PRESERVED_R7_OFFSET); 806 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR8) == PRESERVED_R8_OFFSET); 807 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR9) == PRESERVED_R9_OFFSET); 808 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR10) == PRESERVED_R10_OFFSET); 809 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR11) == PRESERVED_R11_OFFSET); 810 811 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, stack) == REGISTER_FILE_OFFSET); 812 // The fifth argument is the first item already on the stack. 813 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, unused1) == FIRST_STACK_ARGUMENT); 814 815 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, thunkReturnAddress) == THUNK_RETURN_ADDRESS_OFFSET); 816 817 #elif CPU(ARM_TRADITIONAL) 818 819 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, thunkReturnAddress) == THUNK_RETURN_ADDRESS_OFFSET); 820 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR4) == PRESERVEDR4_OFFSET); 821 822 823 #elif CPU(MIPS) 824 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedGP) == PRESERVED_GP_OFFSET); 825 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedS0) == PRESERVED_S0_OFFSET); 826 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedS1) == PRESERVED_S1_OFFSET); 827 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedS2) == PRESERVED_S2_OFFSET); 828 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedReturnAddress) == PRESERVED_RETURN_ADDRESS_OFFSET); 829 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, thunkReturnAddress) == THUNK_RETURN_ADDRESS_OFFSET); 830 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, stack) == REGISTER_FILE_OFFSET); 831 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, globalData) == GLOBAL_DATA_OFFSET); 832 833 #endif 834 } 791 835 792 836 NEVER_INLINE static void tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, ReturnAddressPtr returnAddress, JSValue baseValue, const PutPropertySlot& slot, StructureStubInfo* stubInfo, bool direct) -
trunk/Source/JavaScriptCore/jit/JITStubs.h
r138970 r139004 292 292 } 293 293 #endif 294 295 void performPlatformSpecificJITAssertions(JSGlobalData*); 294 296 295 297 extern "C" { -
trunk/Source/JavaScriptCore/jit/JITThunks.cpp
r138516 r139004 36 36 namespace JSC { 37 37 38 JITThunks::JITThunks( JSGlobalData* globalData)38 JITThunks::JITThunks() 39 39 : m_hostFunctionStubMap(adoptPtr(new HostFunctionStubMap)) 40 40 { 41 if (!globalData->canUseJIT())42 return;43 44 #if CPU(ARM_THUMB2)45 // Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it contains non POD types),46 // and the OBJECT_OFFSETOF macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT47 // macros.48 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedReturnAddress) == PRESERVED_RETURN_ADDRESS_OFFSET);49 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR4) == PRESERVED_R4_OFFSET);50 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR5) == PRESERVED_R5_OFFSET);51 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR6) == PRESERVED_R6_OFFSET);52 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR7) == PRESERVED_R7_OFFSET);53 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR8) == PRESERVED_R8_OFFSET);54 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR9) == PRESERVED_R9_OFFSET);55 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR10) == PRESERVED_R10_OFFSET);56 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR11) == PRESERVED_R11_OFFSET);57 58 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, stack) == REGISTER_FILE_OFFSET);59 // The fifth argument is the first item already on the stack.60 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, unused1) == FIRST_STACK_ARGUMENT);61 62 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, thunkReturnAddress) == THUNK_RETURN_ADDRESS_OFFSET);63 64 #elif CPU(ARM_TRADITIONAL)65 66 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, thunkReturnAddress) == THUNK_RETURN_ADDRESS_OFFSET);67 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedR4) == PRESERVEDR4_OFFSET);68 69 70 #elif CPU(MIPS)71 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedGP) == PRESERVED_GP_OFFSET);72 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedS0) == PRESERVED_S0_OFFSET);73 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedS1) == PRESERVED_S1_OFFSET);74 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedS2) == PRESERVED_S2_OFFSET);75 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, preservedReturnAddress) == PRESERVED_RETURN_ADDRESS_OFFSET);76 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, thunkReturnAddress) == THUNK_RETURN_ADDRESS_OFFSET);77 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, stack) == REGISTER_FILE_OFFSET);78 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, globalData) == GLOBAL_DATA_OFFSET);79 80 #endif81 41 } 82 42 -
trunk/Source/JavaScriptCore/jit/JITThunks.h
r138516 r139004 47 47 class JITThunks { 48 48 public: 49 JITThunks( JSGlobalData*);49 JITThunks(); 50 50 ~JITThunks(); 51 51 -
trunk/Source/JavaScriptCore/offlineasm/armv7.rb
r133551 r139004 202 202 raise unless operands.size == 2 203 203 raise unless operands[1].register? 204 if operands[0].i s_a? Immediate204 if operands[0].immediate? 205 205 $asm.puts "#{opcode3} #{operands[1].armV7Operand}, #{operands[1].armV7Operand}, #{operands[0].armV7Operand}" 206 206 else … … 236 236 end 237 237 238 if mask.i s_a? Immediateand mask.value == -1238 if mask.immediate? and mask.value == -1 239 239 $asm.puts "tst #{value.armV7Operand}, #{value.armV7Operand}" 240 elsif mask.i s_a? Immediate240 elsif mask.immediate? 241 241 $asm.puts "tst.w #{value.armV7Operand}, #{mask.armV7Operand}" 242 242 else … … 271 271 suffix = "" 272 272 end 273 if operands.size == 3 and operands[0].i s_a? Immediate274 raise unless operands[1]. is_a? RegisterID275 raise unless operands[2]. is_a? RegisterID273 if operands.size == 3 and operands[0].immediate? 274 raise unless operands[1].register? 275 raise unless operands[2].register? 276 276 if operands[0].value == 0 and suffix.empty? 277 277 unless operands[1] == operands[2] … … 281 281 $asm.puts "adds #{operands[2].armV7Operand}, #{operands[1].armV7Operand}, #{operands[0].armV7Operand}" 282 282 end 283 elsif operands.size == 3 and operands[0].i s_a? RegisterID284 raise unless operands[1]. is_a? RegisterID285 raise unless operands[2]. is_a? RegisterID283 elsif operands.size == 3 and operands[0].immediate? 284 raise unless operands[1].register? 285 raise unless operands[2].register? 286 286 $asm.puts "adds #{armV7FlippedOperands(operands)}" 287 287 else 288 if operands[0].i s_a? Immediate288 if operands[0].immediate? 289 289 unless Immediate.new(nil, 0) == operands[0] 290 290 $asm.puts "adds #{armV7FlippedOperands(operands)}" … … 403 403 $asm.puts "push #{operands[0].armV7Operand}" 404 404 when "move" 405 if operands[0].i s_a? Immediate405 if operands[0].immediate? 406 406 armV7MoveImmediate(operands[0].value, operands[1]) 407 407 else -
trunk/Source/JavaScriptCore/runtime/JSGlobalData.cpp
r138604 r139004 235 235 236 236 #if ENABLE(JIT) 237 jitStubs = adoptPtr(new JITThunks(this)); 237 jitStubs = adoptPtr(new JITThunks()); 238 performPlatformSpecificJITAssertions(this); 238 239 #endif 239 240 -
trunk/Source/WTF/ChangeLog
r138970 r139004 1 2013-01-07 Filip Pizlo <fpizlo@apple.com> 2 3 Unreviewed, it should be possible to build JSC on ARM. 4 5 * wtf/FastMalloc.cpp: 6 (WTF::TCMalloc_PageHeap::IncrementalScavenge): 7 1 8 2013-01-07 Balazs Kilvady <kilvadyb@homejinni.com> 2 9 -
trunk/Source/WTF/wtf/FastMalloc.cpp
r138409 r139004 2138 2138 if (!DLL_IsEmpty(&slist->normal)) { 2139 2139 // Release the last span on the normal portion of this list 2140 Span* s = slist->normal.prev ;2140 Span* s = slist->normal.prev(); 2141 2141 DLL_Remove(s); 2142 2142 TCMalloc_SystemRelease(reinterpret_cast<void*>(s->start << kPageShift),
Note: See TracChangeset
for help on using the changeset viewer.