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
2463 p1 = p;2463 p1 = p;
2464 h = TOK_HASH_INIT;2464 h = TOK_HASH_INIT;
2465 h = TOK_HASH_FUNC(h, c);2465 h = TOK_HASH_FUNC(h, c);
2466 while (c = *++p, (isidnum_table[c - CH_EOF] & (IS_ID|IS_NUM))2466 isidnum_table['.' - CH_EOF] =
2467 || (c == '.' && (parse_flags & PARSE_FLAG_ASM_FILE)))2467 (parse_flags & PARSE_FLAG_ASM_FILE) ? IS_ID : 0;
2468 while (c = *++p, isidnum_table[c - CH_EOF] & (IS_ID|IS_NUM))
2468 h = TOK_HASH_FUNC(h, c);2469 h = TOK_HASH_FUNC(h, c);
2469 if (c != '\\') {2470 if (c != '\\') {
2470 TokenSym **pts;2471 TokenSym **pts;
@@ -2496,8 +2497,7 @@ maybe_newline: · 25 unmodified lines
2496 p--;2497 p--;
2497 PEEKC(c, p);2498 PEEKC(c, p);
2498 parse_ident_slow:2499 parse_ident_slow:
2499 while ((isidnum_table[c - CH_EOF] & (IS_ID|IS_NUM))2500 while (isidnum_table[c - CH_EOF] & (IS_ID|IS_NUM))
2500 || (c == '.' && (parse_flags & PARSE_FLAG_ASM_FILE)))
2501 {2501 {
2502 cstr_ccat(&tokcstr, c);2502 cstr_ccat(&tokcstr, c);
2503 PEEKC(c, p);2503 PEEKC(c, p);
@@ -2519,6 +2519,8 @@ maybe_newline: · 15 unmodified lines
2519 } else {2519 } else {
2520 cstr_reset(&tokcstr);2520 cstr_reset(&tokcstr);
2521 cstr_ccat(&tokcstr, 'L');2521 cstr_ccat(&tokcstr, 'L');
2522 isidnum_table['.' - CH_EOF] =
2523 (parse_flags & PARSE_FLAG_ASM_FILE) ? IS_ID : 0;
2522 goto parse_ident_slow;2524 goto parse_ident_slow;
2523 }2525 }
2524 }2526 }

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