Changeset 35245 in webkit for trunk/JavaScriptCore/VM/CodeGenerator.h
- Timestamp:
- Jul 18, 2008, 6:44:24 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CodeGenerator.h
r35037 r35245 183 183 } 184 184 185 void emitExpressionInfo(unsigned divot, unsigned startOffset, unsigned endOffset) 186 { 187 divot -= m_codeBlock->sourceOffset; 188 if (divot > ExpressionRangeInfo::MaxDivot) { 189 // Overflow has occurred, we can only give line number info for errors for this region 190 divot = 0; 191 startOffset = 0; 192 endOffset = 0; 193 } else if (startOffset > ExpressionRangeInfo::MaxOffset) { 194 // If the start offset is out of bounds we clear both offsets 195 // so we only get the divot marker. Error message will have to be reduced 196 // to line and column number. 197 startOffset = 0; 198 endOffset = 0; 199 } else if (endOffset > ExpressionRangeInfo::MaxOffset) { 200 // The end offset is only used for additional context, and is much more likely 201 // to overflow (eg. function call arguments) so we are willing to drop it without 202 // dropping the rest of the range. 203 endOffset = 0; 204 } 205 206 ExpressionRangeInfo info; 207 info.instructionOffset = instructions().size(); 208 info.divotPoint = divot; 209 info.startOffset = startOffset; 210 info.endOffset = endOffset; 211 m_codeBlock->expressionInfo.append(info); 212 } 213 185 214 ALWAYS_INLINE bool leftHandSideNeedsCopy(bool rightHasAssignments, bool rightIsPure) 186 215 { … … 245 274 RegisterID* emitPutSetter(RegisterID* base, const Identifier& property, RegisterID* value); 246 275 247 RegisterID* emitCall(RegisterID* dst, RegisterID* func, RegisterID* base, ArgumentsNode* );248 RegisterID* emitCallEval(RegisterID* dst, RegisterID* func, RegisterID* base, ArgumentsNode* );276 RegisterID* emitCall(RegisterID* dst, RegisterID* func, RegisterID* base, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset); 277 RegisterID* emitCallEval(RegisterID* dst, RegisterID* func, RegisterID* base, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset); 249 278 250 279 RegisterID* emitReturn(RegisterID* src) { return emitUnaryNoDstOp(op_ret, src); } … … 313 342 typedef HashMap<RefPtr<UString::Rep>, int, IdentifierRepHash, HashTraits<RefPtr<UString::Rep> >, IdentifierMapIndexHashTraits> IdentifierMap; 314 343 315 RegisterID* emitCall(OpcodeID, RegisterID*, RegisterID*, RegisterID*, ArgumentsNode* );344 RegisterID* emitCall(OpcodeID, RegisterID*, RegisterID*, RegisterID*, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset); 316 345 317 346 // Maps a register index in the symbol table to a RegisterID index in m_locals.
Note:
See TracChangeset
for help on using the changeset viewer.