Browse Source

tools: minor performance improvement

PR-URL: https://github.com/nodejs/node/pull/16125
Reviewed-By: Anna Henningsen <anna@addaleax.net>
v9.x-staging
Anna Henningsen 7 years ago
parent
commit
80bd2a240b
No known key found for this signature in database GPG Key ID: 9C63F3A6CD2AD8F9
  1. 4
      tools/genv8constants.py

4
tools/genv8constants.py

@ -84,10 +84,10 @@ for line in pipe:
# 6-character margin, 2-characters + 1 space for each field
idx = 6 + i * 3;
octetstr = line[idx:idx+3]
if not numpattern.match(octetstr):
if curr_octet > octets:
break;
if curr_octet > octets:
if not numpattern.match(octetstr):
break;
curr_val += int('0x%s' % octetstr, 16) << (curr_octet * 8);

Loading…
Cancel
Save