Use uniform object type for node types
Speeds things up by about 9% on io.js 1.3
This commit is contained in:
parent
141905f9fd
commit
6bd1013f2c
@ -627,7 +627,7 @@
|
||||
|
||||
function parseMaybeUnary(noIn) {
|
||||
if (token.type.prefix) {
|
||||
var node = startNode(), update = token.type.isUpdate;
|
||||
var node = startNode(), update = token.type === tt.incDec;
|
||||
node.operator = token.value;
|
||||
node.prefix = true;
|
||||
next();
|
||||
@ -733,7 +733,7 @@
|
||||
|
||||
case tt._null: case tt._true: case tt._false:
|
||||
var node = startNode();
|
||||
node.value = token.type.atomValue;
|
||||
node.value = token.type === tt._null ? null : token.type === tt._true;
|
||||
node.raw = token.type.keyword;
|
||||
next();
|
||||
return finishNode(node, "Literal");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user