Changeset 174455 in webkit for trunk/Source/JavaScriptCore
- Timestamp:
- Oct 8, 2014, 9:18:03 AM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/tests/testapi.c
r173018 r174455 124 124 125 125 if (jsLength != (size_t)cfLength) { 126 fprintf(stderr, "assertEqualsAsCharactersPtr failed: jsLength(%ld) != cfLength(%ld)\n", jsLength, cfLength); 126 #if OS(WINDOWS) 127 fprintf(stderr, "assertEqualsAsCharactersPtr failed: jsLength(%Iu) != cfLength(%Iu)\n", jsLength, (size_t)cfLength); 128 #else 129 fprintf(stderr, "assertEqualsAsCharactersPtr failed: jsLength(%zu) != cfLength(%zu)\n", jsLength, (size_t)cfLength); 130 #endif 127 131 failed = 1; 128 132 } -
trunk/Source/JavaScriptCore/ChangeLog
r174411 r174455 1 2014-10-08 Brent Fulgham <[email protected]> 2 3 [Win] Resolve some static analysis warnings in JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=137508 5 6 Reviewed by Geoffrey Garen. 7 8 * API/tests/testapi.c: 9 (assertEqualsAsCharactersPtr): MSVC insists on using %Iu as its format specifier 10 for size_t. Make the format string conditional on Windows. 11 * bytecode/Watchpoint.h: 12 (JSC::InlineWatchpointSet::encodeState): Silence warning about left-shifting 'state' 13 as a 32-bit value before OR-ing it with a 64-bit value. 14 * dfg/DFGFixupPhase.cpp: 15 (JSC::DFG::FixupPhase::fixupNode): Silence warning about operator prescedence 16 causing the || operation to take place before the >= test. 17 * dfg/DFGInPlaceAbstractState.cpp: 18 (JSC::DFG::InPlaceAbstractState::endBasicBlock): Ditto (|| before !=) 19 * testRegExp.cpp: 20 (testOneRegExp): Ditto %Iu format specifier. 21 * yarr/YarrInterpreter.cpp: 22 (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): Silence warning about 23 using a 32-bit value as part of a 64-bit calculation. 24 1 25 2014-10-07 Simon Fraser <[email protected]> 2 26 -
trunk/Source/JavaScriptCore/bytecode/Watchpoint.h
r172129 r174455 290 290 static uintptr_t encodeState(WatchpointState state) 291 291 { 292 return (stat e<< StateShift) | IsThinFlag;292 return (static_cast<uintptr_t>(state) << StateShift) | IsThinFlag; 293 293 } 294 294 -
trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
r174226 r174455 440 440 break; 441 441 } 442 if (node->child1()->shouldSpeculateString() && node->child2()->shouldSpeculateString() && ( GPRInfo::numberOfRegisters >= 7|| isFTL(m_graph.m_plan.mode))) {442 if (node->child1()->shouldSpeculateString() && node->child2()->shouldSpeculateString() && ((GPRInfo::numberOfRegisters >= 7) || isFTL(m_graph.m_plan.mode))) { 443 443 fixEdge<StringUse>(node->child1()); 444 444 fixEdge<StringUse>(node->child2()); … … 470 470 break; 471 471 } 472 if (node->child1()->shouldSpeculateString() && ( GPRInfo::numberOfRegisters >= 8|| isFTL(m_graph.m_plan.mode))) {472 if (node->child1()->shouldSpeculateString() && ((GPRInfo::numberOfRegisters >= 8) || isFTL(m_graph.m_plan.mode))) { 473 473 fixEdge<StringUse>(node->child1()); 474 474 break; 475 475 } 476 if (node->child2()->shouldSpeculateString() && ( GPRInfo::numberOfRegisters >= 8|| isFTL(m_graph.m_plan.mode))) {476 if (node->child2()->shouldSpeculateString() && ((GPRInfo::numberOfRegisters >= 8) || isFTL(m_graph.m_plan.mode))) { 477 477 fixEdge<StringUse>(node->child2()); 478 478 break; -
trunk/Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.cpp
r171613 r174455 195 195 bool changed = false; 196 196 197 if ( mergeMode != DontMerge|| !ASSERT_DISABLED) {197 if ((mergeMode != DontMerge) || !ASSERT_DISABLED) { 198 198 changed |= checkAndSet(block->cfaStructureClobberStateAtTail, m_structureClobberState); 199 199 -
trunk/Source/JavaScriptCore/testRegExp.cpp
r173949 r174455 207 207 if (outVector.size() != regExpTest->expectVector.size()) { 208 208 result = false; 209 if (verbose) 210 printf("Line %d: output vector size mismatch - expected %lu got %lu\n", lineNumber, regExpTest->expectVector.size(), outVector.size()); 209 if (verbose) { 210 #if OS(WINDOWS) 211 printf("Line %d: output vector size mismatch - expected %Iu got %Iu\n", lineNumber, regExpTest->expectVector.size(), outVector.size()); 212 #else 213 printf("Line %d: output vector size mismatch - expected %zu got %zu\n", lineNumber, regExpTest->expectVector.size(), outVector.size()); 214 #endif 215 } 211 216 } else if (outVector.size() % 2) { 212 217 result = false; 213 if (verbose) 214 printf("Line %d: output vector size is odd (%lu), should be even\n", lineNumber, outVector.size()); 218 if (verbose) { 219 #if OS(WINDOWS) 220 printf("Line %d: output vector size is odd (%Iu), should be even\n", lineNumber, outVector.size()); 221 #else 222 printf("Line %d: output vector size is odd (%zu), should be even\n", lineNumber, outVector.size()); 223 #endif 224 } 215 225 } else { 216 226 // Check in pairs since the first value of the pair could be -1 in which case the second doesn't matter. … … 220 230 if (outVector[startIndex] != regExpTest->expectVector[startIndex]) { 221 231 result = false; 222 if (verbose) 223 printf("Line %d: output vector mismatch at index %lu - expected %d got %d\n", lineNumber, startIndex, regExpTest->expectVector[startIndex], outVector[startIndex]); 232 if (verbose) { 233 #if OS(WINDOWS) 234 printf("Line %d: output vector mismatch at index %Iu - expected %d got %d\n", lineNumber, startIndex, regExpTest->expectVector[startIndex], outVector[startIndex]); 235 #else 236 printf("Line %d: output vector mismatch at index %zu - expected %d got %d\n", lineNumber, startIndex, regExpTest->expectVector[startIndex], outVector[startIndex]); 237 #endif 238 } 224 239 } 225 240 if ((i > 0) && (regExpTest->expectVector[startIndex] != -1) && (outVector[startIndex+1] != regExpTest->expectVector[startIndex+1])) { 226 241 result = false; 227 if (verbose) 228 printf("Line %d: output vector mismatch at index %lu - expected %d got %d\n", lineNumber, startIndex+1, regExpTest->expectVector[startIndex+1], outVector[startIndex+1]); 242 if (verbose) { 243 #if OS(WINDOWS) 244 printf("Line %d: output vector mismatch at index %Iu - expected %d got %d\n", lineNumber, startIndex + 1, regExpTest->expectVector[startIndex + 1], outVector[startIndex + 1]); 245 #else 246 printf("Line %d: output vector mismatch at index %zu - expected %d got %d\n", lineNumber, startIndex + 1, regExpTest->expectVector[startIndex + 1], outVector[startIndex + 1]); 247 #endif 248 } 229 249 } 230 250 } -
trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp
r162906 r174455 155 155 ParenthesesDisjunctionContext* allocParenthesesDisjunctionContext(ByteDisjunction* disjunction, unsigned* output, ByteTerm& term) 156 156 { 157 size_t size = sizeof(ParenthesesDisjunctionContext) - sizeof(unsigned) + (term.atom.parenthesesDisjunction->m_numSubpatterns << 1) * sizeof(unsigned) + sizeof(DisjunctionContext) - sizeof(uintptr_t) + disjunction->m_frameSize* sizeof(uintptr_t);157 size_t size = sizeof(ParenthesesDisjunctionContext) - sizeof(unsigned) + (term.atom.parenthesesDisjunction->m_numSubpatterns << 1) * sizeof(unsigned) + sizeof(DisjunctionContext) - sizeof(uintptr_t) + static_cast<size_t>(disjunction->m_frameSize) * sizeof(uintptr_t); 158 158 allocatorPool = allocatorPool->ensureCapacity(size); 159 159 RELEASE_ASSERT(allocatorPool);
Note:
See TracChangeset
for help on using the changeset viewer.