Changeset 153071 in webkit
- Timestamp:
- Jul 23, 2013 5:41:46 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r152982 r153071 1 2013-07-23 Mark Lam <mark.lam@apple.com> 2 3 Removed unused sourceOffset from JSTokenLocation. 4 https://bugs.webkit.org/show_bug.cgi?id=118996. 5 6 Reviewed by Geoffrey Garen. 7 8 This also removes the assertion reported in the bug because it is now 9 moot, thereby resolving the assertion failure issue on Windows. 10 11 * bytecompiler/NodesCodegen.cpp: 12 (JSC::ArrayNode::toArgumentList): 13 (JSC::ApplyFunctionCallDotNode::emitBytecode): 14 * parser/Lexer.cpp: 15 (JSC::::lex): 16 * parser/Lexer.h: 17 (JSC::::lexExpectIdentifier): 18 * parser/Nodes.h: 19 * parser/Parser.cpp: 20 (JSC::::Parser): 21 (JSC::::parseFunctionInfo): 22 (JSC::::parseExpressionOrLabelStatement): 23 (JSC::::parseMemberExpression): 24 * parser/Parser.h: 25 (JSC::::parse): 26 * parser/ParserTokens.h: 27 (JSC::JSTokenLocation::JSTokenLocation): 28 1 29 2013-07-22 Alex Christensen <achristensen@apple.com> 2 30 -
trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
r152494 r153071 203 203 } 204 204 205 ArgumentListNode* ArrayNode::toArgumentList(VM* vm, int lineNumber, int startPosition , unsigned sourceOffset) const205 ArgumentListNode* ArrayNode::toArgumentList(VM* vm, int lineNumber, int startPosition) const 206 206 { 207 207 ASSERT(!m_elision && !m_optional); … … 209 209 if (!ptr) 210 210 return 0; 211 JSTokenLocation location (sourceOffset);211 JSTokenLocation location; 212 212 location.line = lineNumber; 213 213 location.startOffset = startPosition; 214 location.sourceOffset = sourceOffset;215 214 ArgumentListNode* head = new (vm) ArgumentListNode(location, ptr->value()); 216 215 ArgumentListNode* tail = head; … … 550 549 ASSERT(m_args->m_listNode->m_next->m_expr->isSimpleArray()); 551 550 ASSERT(!m_args->m_listNode->m_next->m_next); 552 m_args->m_listNode = static_cast<ArrayNode*>(m_args->m_listNode->m_next->m_expr)->toArgumentList(generator.vm(), 0, 0 , 0);551 m_args->m_listNode = static_cast<ArrayNode*>(m_args->m_listNode->m_next->m_expr)->toArgumentList(generator.vm(), 0, 0); 553 552 RefPtr<RegisterID> realFunction = generator.emitMove(generator.tempDestination(dst), base.get()); 554 553 CallArguments callArguments(generator, m_args); -
trunk/Source/JavaScriptCore/parser/Lexer.cpp
r152494 r153071 1324 1324 1325 1325 tokenLocation->startOffset = currentOffset(); 1326 tokenLocation->sourceOffset = m_sourceOffset;1327 1326 ASSERT(currentOffset() >= currentLineStartOffset()); 1328 1327 -
trunk/Source/JavaScriptCore/parser/Lexer.h
r152494 r153071 371 371 tokenLocation->startOffset = offsetFromSourcePtr(start); 372 372 tokenLocation->endOffset = currentOffset(); 373 tokenLocation->sourceOffset = m_sourceOffset;374 373 ASSERT(tokenLocation->startOffset >= tokenLocation->lineStartOffset); 375 374 m_lastToken = IDENT; -
trunk/Source/JavaScriptCore/parser/Nodes.h
r152494 r153071 457 457 ArrayNode(const JSTokenLocation&, int elision, ElementNode*); 458 458 459 ArgumentListNode* toArgumentList(VM*, int, int , unsigned) const;459 ArgumentListNode* toArgumentList(VM*, int, int) const; 460 460 461 461 private: -
trunk/Source/JavaScriptCore/parser/Parser.cpp
r152494 r153071 83 83 m_arena = m_vm->parserArena.get(); 84 84 m_lexer->setCode(source, m_arena); 85 m_token.m_location.sourceOffset = source.startOffset();86 85 m_token.m_location.endOffset = source.startOffset(); 87 86 m_token.m_location.lineStartOffset = source.startOffset(); … … 862 861 // If we're in a strict context, the cached function info must say it was strict too. 863 862 ASSERT(!strictMode() || cachedInfo->strictMode); 864 JSTokenLocation endLocation (m_source->startOffset());863 JSTokenLocation endLocation; 865 864 866 865 endLocation.line = cachedInfo->closeBraceLine; … … 967 966 */ 968 967 Vector<LabelInfo> labels; 969 JSTokenLocation location (m_source->startOffset());968 JSTokenLocation location; 970 969 do { 971 970 int start = tokenStart(); … … 1635 1634 int expressionLineStart = tokenLineStart(); 1636 1635 int newCount = 0; 1637 JSTokenLocation location (m_source->startOffset());1636 JSTokenLocation location; 1638 1637 while (match(NEW)) { 1639 1638 next(); -
trunk/Source/JavaScriptCore/parser/Parser.h
r152494 r153071 1037 1037 RefPtr<ParsedNode> result; 1038 1038 if (m_sourceElements) { 1039 JSTokenLocation endLocation (m_source->startOffset());1039 JSTokenLocation endLocation; 1040 1040 endLocation.line = m_lexer->lastLineNumber(); 1041 1041 endLocation.lineStartOffset = m_lexer->currentLineStartOffset(); -
trunk/Source/JavaScriptCore/parser/ParserTokens.h
r152497 r153071 162 162 163 163 struct JSTokenLocation { 164 JSTokenLocation( unsigned _sourceOffset = UINT_MAX) : line(0), lineStartOffset(0), startOffset(0), sourceOffset(_sourceOffset) { }164 JSTokenLocation() : line(0), lineStartOffset(0), startOffset(0) { } 165 165 JSTokenLocation(const JSTokenLocation& location) 166 166 { … … 169 169 startOffset = location.startOffset; 170 170 endOffset = location.endOffset; 171 sourceOffset = location.sourceOffset;172 ASSERT(sourceOffset != UINT_MAX);173 171 } 174 175 ALWAYS_INLINE unsigned lineStartPosition() const { ASSERT(sourceOffset != UINT_MAX); return lineStartOffset - sourceOffset; }176 ALWAYS_INLINE unsigned startPosition() const { ASSERT(sourceOffset != UINT_MAX); return startOffset - sourceOffset; }177 ALWAYS_INLINE unsigned endPosition() const { ASSERT(sourceOffset != UINT_MAX); return endOffset - sourceOffset; }178 172 179 173 int line; … … 181 175 unsigned startOffset; 182 176 unsigned endOffset; 183 unsigned sourceOffset;184 177 }; 185 178
Note: See TracChangeset
for help on using the changeset viewer.