History

optimization of the previous patch

compilation speed of the tccboot restored (patch remove testing of the parse_flags in loop)

seyko committed 10 years ago

Commit 5a704451 parent d3e85e81 file · +6 −4Browse files

Unified · Split

tccpp.c+6−4
@@ -2463,8 +2463,9 @@ maybe_newline: · 2462 unmodified lines
24632463 p1 = p;
24642464 h = TOK_HASH_INIT;
24652465 h = TOK_HASH_FUNC(h, c);
2466− while (c = *++p, (isidnum_table[c - CH_EOF] & (IS_ID|IS_NUM))
2467− || (c == '.' && (parse_flags & PARSE_FLAG_ASM_FILE)))
2466+ isidnum_table['.' - CH_EOF] =
2467+ (parse_flags & PARSE_FLAG_ASM_FILE) ? IS_ID : 0;
2468+ while (c = *++p, isidnum_table[c - CH_EOF] & (IS_ID|IS_NUM))
24682469 h = TOK_HASH_FUNC(h, c);
24692470 if (c != '\\') {
24702471 TokenSym **pts;
@@ -2496,8 +2497,7 @@ maybe_newline: · 25 unmodified lines
24962497 p--;
24972498 PEEKC(c, p);
24982499 parse_ident_slow:
2499− while ((isidnum_table[c - CH_EOF] & (IS_ID|IS_NUM))
2500− || (c == '.' && (parse_flags & PARSE_FLAG_ASM_FILE)))
2500+ while (isidnum_table[c - CH_EOF] & (IS_ID|IS_NUM))
25012501 {
25022502 cstr_ccat(&tokcstr, c);
25032503 PEEKC(c, p);
@@ -2519,6 +2519,8 @@ maybe_newline: · 15 unmodified lines
25192519 } else {
25202520 cstr_reset(&tokcstr);
25212521 cstr_ccat(&tokcstr, 'L');
2522+ isidnum_table['.' - CH_EOF] =
2523+ (parse_flags & PARSE_FLAG_ASM_FILE) ? IS_ID : 0;
25222524 goto parse_ident_slow;
25232525 }
25242526 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t