- divot -= m_codeBlock->sourceOffset();
- if (divot > ExpressionRangeInfo::MaxDivot) {
- // Overflow has occurred, we can only give line number info for errors for this region
- divot = 0;
- startOffset = 0;
- endOffset = 0;
- } else if (startOffset > ExpressionRangeInfo::MaxOffset) {
- // If the start offset is out of bounds we clear both offsets
- // so we only get the divot marker. Error message will have to be reduced
- // to line and column number.
- startOffset = 0;
- endOffset = 0;
- } else if (endOffset > ExpressionRangeInfo::MaxOffset) {
- // The end offset is only used for additional context, and is much more likely
- // to overflow (eg. function call arguments) so we are willing to drop it without
- // dropping the rest of the range.
- endOffset = 0;
- }
-
- ExpressionRangeInfo info;
- info.instructionOffset = instructions().size();
- info.divotPoint = divot;
- info.startOffset = startOffset;
- info.endOffset = endOffset;
- m_codeBlock->addExpressionInfo(info);
+ unsigned column = divotOffset - lineStart;
+
+ unsigned instructionOffset = instructions().size();
+ if (!m_isBuiltinFunction)
+ m_codeBlock->addExpressionInfo(instructionOffset, divotOffset, startOffset, endOffset, line, column);