Changeset 128015 in webkit
- Timestamp:
- Sep 9, 2012 9:25:23 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r128014 r128015 1 2012-09-09 Mark Lam <mark.lam@apple.com> 2 3 Fixed a few llint C++ interpreter bugs. 4 https://bugs.webkit.org/show_bug.cgi?id=96127. 5 6 Reviewed by Geoffrey Garen. 7 8 * llint/LLIntCLoop.h: 9 CLoop::execute()'s bootstrapOpcodeId does not need a default 10 value. There is no case when this function is called without 11 that parameter being specified. 12 * llint/LowLevelInterpreter.asm: 13 Moved the dispatchAfterCall() call to where it is needed. 14 For the C_LOOP back-end, it generates unreachable code. 15 * llint/LowLevelInterpreter.cpp: 16 #include <wtf/Assertions.h> because LLIntAssembly.h needs it. 17 (JSC): 18 Fixed bug in SIGN_BIT32() macro. 19 Placate a MSVC warning for t0, and t1 being uninitialized. 20 (JSC::CLoop::execute): 21 The bootstrapOpcodeId arg should always be specified. 22 MSVC doesn't like UNUSED_PARAM() for labels. Switch to using 23 the new UNUSED_LABEL() macro. 24 * offlineasm/cloop.rb: 25 * offlineasm/generate_offset_extractor.rb: 26 Resolved a compiler warning found via MSVC. 27 1 28 2012-09-09 Patrick Gansterer <paroga@webkit.org> 2 29 -
trunk/Source/JavaScriptCore/llint/LLIntCLoop.h
r127374 r128015 44 44 public: 45 45 static void initialize(); 46 static JSValue execute(CallFrame*, OpcodeID bootstrapOpcodeId = llint_unused, bool isInitializationPass = false);46 static JSValue execute(CallFrame*, OpcodeID bootstrapOpcodeId, bool isInitializationPass = false); 47 47 48 48 static void* catchRoutineFor(Instruction* catchPCForInterpreter); -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
r127393 r128015 178 178 else 179 179 call callee 180 dispatchAfterCall() 180 181 end 181 dispatchAfterCall()182 182 end) 183 183 end -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
r127970 r128015 37 37 #include "LLIntSlowPaths.h" 38 38 #include "VMInspector.h" 39 #include <wtf/Assertions.h> 39 40 #include <wtf/MathExtras.h> 40 41 … … 98 99 #define OFFLINE_ASM_LOCAL_LABEL(label) label: 99 100 101 102 //============================================================================ 103 // Some utilities: 104 // 100 105 101 106 namespace JSC { … … 117 122 118 123 124 //============================================================================ 125 // The llint C++ interpreter loop: 126 // 127 119 128 JSValue CLoop::execute(CallFrame* callFrame, OpcodeID bootstrapOpcodeId, 120 129 bool isInitializationPass) 121 130 { 122 131 #define CAST reinterpret_cast 123 #define SIGN_BIT32(x) ( x& 0x80000000)132 #define SIGN_BIT32(x) ((x) & 0x80000000) 124 133 125 134 // One-time initialization of our address tables. We have to put this code … … 213 222 CLoopDoubleRegister d0, d1; 214 223 224 #if COMPILER(MSVC) 225 // Keep the compiler happy. We don't really need this, but the compiler 226 // will complain. This makes the warning go away. 227 t0.i = 0; 228 t1.i = 0; 229 #endif 230 215 231 // Instantiate the pseudo JIT stack frame used by the LLINT C Loop backend: 216 232 JITStackFrame jitStackFrame; … … 253 269 Opcode opcode; 254 270 255 if (bootstrapOpcodeId != llint_unused) 256 opcode = LLInt::getOpcode(bootstrapOpcodeId); 271 opcode = LLInt::getOpcode(bootstrapOpcodeId); 257 272 258 273 #if ENABLE(OPCODE_STATS) … … 396 411 397 412 // Keep the compiler happy so that it doesn't complain about unused 398 // labels for the LLInt trampoline glue: 413 // labels for the LLInt trampoline glue. The labels are automatically 414 // emitted by label macros above, and some of them are referenced by 415 // the llint generated code. Since we can't tell ahead of time which 416 // will be referenced and which will be not, we'll just passify the 417 // compiler on all such labels: 399 418 #define LLINT_OPCODE_ENTRY(__opcode, length) \ 400 UNUSED_ PARAM(&&__opcode);419 UNUSED_LABEL(__opcode); 401 420 FOR_EACH_LLINT_NATIVE_HELPER(LLINT_OPCODE_ENTRY) 402 421 #undef LLINT_OPCODE_ENTRY -
trunk/Source/JavaScriptCore/offlineasm/cloop.rb
r127941 r128015 173 173 if base.is_a? RegisterID and base.name == "sp" 174 174 offsetValue = "#{offset.value}" 175 "( assert(#{offsetValue} == offsetof(JITStackFrame, globalData)), &sp->globalData)"175 "(ASSERT(#{offsetValue} == offsetof(JITStackFrame, globalData)), &sp->globalData)" 176 176 elsif offset.value == 0 177 177 "#{base.clValue(:int8Ptr)}" … … 237 237 if base.is_a? RegisterID and base.name == "sp" 238 238 offsetValue = "(#{index.clValue(:int32)} << #{scaleShift}) + #{offset.clValue})" 239 "( assert(#{offsetValue} == offsetof(JITStackFrame, globalData)), &sp->globalData)"239 "(ASSERT(#{offsetValue} == offsetof(JITStackFrame, globalData)), &sp->globalData)" 240 240 else 241 241 "#{base.clValue(:int8Ptr)} + (#{index.clValue(:int32)} << #{scaleShift}) + #{offset.clValue}" -
trunk/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb
r122650 r128015 43 43 OFFSET_MAGIC_NUMBERS.each { 44 44 | number | 45 $output.puts " #{number},"45 $output.puts "unsigned(#{number})," 46 46 } 47 47 end … … 121 121 OFFSET_HEADER_MAGIC_NUMBERS.each { 122 122 | number | 123 $output.puts " #{number},"123 $output.puts "unsigned(#{number})," 124 124 } 125 125 -
trunk/Source/WTF/ChangeLog
r128014 r128015 1 2012-09-09 Mark Lam <mark.lam@apple.com> 2 3 Fixed ASSERT() and ASSERT_AT() macros so that they can be used in 4 comma expressions. Also, added UNUSED_LABEL(). 5 https://bugs.webkit.org/show_bug.cgi?id=96127. 6 7 Reviewed by Geoffrey Garen. 8 9 * wtf/Assertions.h: 10 * wtf/UnusedParam.h: Added UNUSED_LABEL(). Removed an obsolete comment. 11 1 12 2012-09-09 Patrick Gansterer <paroga@webkit.org> 2 13 -
trunk/Source/WTF/wtf/Assertions.h
r127941 r128015 169 169 #ifndef CRASH 170 170 #if COMPILER(CLANG) 171 #define CRASH() do { \ 172 WTFReportBacktrace(); \ 173 WTFInvokeCrashHook(); \ 174 *(int *)(uintptr_t)0xbbadbeef = 0; \ 175 __builtin_trap(); \ 176 } while (0) 177 #else 178 #define CRASH() do { \ 179 WTFReportBacktrace(); \ 180 WTFInvokeCrashHook(); \ 181 *(int *)(uintptr_t)0xbbadbeef = 0; \ 182 ((void(*)())0)(); /* More reliable, but doesn't say BBADBEEF */ \ 183 } while (0) 171 #define CRASH() \ 172 (WTFReportBacktrace(), \ 173 WTFInvokeCrashHook(), \ 174 (*(int *)(uintptr_t)0xbbadbeef = 0), \ 175 __builtin_trap()) 176 #else 177 #define CRASH() \ 178 (WTFReportBacktrace(), \ 179 WTFInvokeCrashHook(), \ 180 (*(int *)(uintptr_t)0xbbadbeef = 0), \ 181 ((void(*)())0)() /* More reliable, but doesn't say BBADBEEF */ \ 182 ) 184 183 #endif 185 184 #endif … … 245 244 #else 246 245 247 #define ASSERT(assertion) do \ 248 if (!(assertion)) { \ 249 WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion); \ 250 CRASH(); \ 251 } \ 252 while (0) 253 254 #define ASSERT_AT(assertion, file, line, function) do \ 255 if (!(assertion)) { \ 256 WTFReportAssertionFailure(file, line, function, #assertion); \ 257 CRASH(); \ 258 } \ 259 while (0) 246 #define ASSERT(assertion) \ 247 (!(assertion) ? \ 248 (WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion), \ 249 CRASH()) : \ 250 (void)0) 251 252 #define ASSERT_AT(assertion, file, line, function) \ 253 (!(assertion) ? \ 254 (WTFReportAssertionFailure(file, line, function, #assertion), \ 255 CRASH()) : \ 256 (void)0) 260 257 261 258 #define ASSERT_NOT_REACHED() do { \ -
trunk/Source/WTF/wtf/UnusedParam.h
r111778 r128015 22 22 #define WTF_UnusedParam_h 23 23 24 /* don't use this for C++, it should only be used in plain C files or25 ObjC methods, where leaving off the parameter name is not allowed. */26 27 24 #include <wtf/Platform.h> 28 25 … … 35 32 #endif 36 33 34 /* This is to keep the compiler from complaining when for local labels are 35 declared but not referenced. For example, this can happen with code that 36 works with auto-generated code. 37 */ 38 #if COMPILER(MSVC) 39 #define UNUSED_LABEL(label) if (false) goto label 40 #else 41 #define UNUSED_LABEL(label) UNUSED_PARAM(&& label) 42 #endif 43 37 44 #endif /* WTF_UnusedParam_h */
Note: See TracChangeset
for help on using the changeset viewer.