refactor: fastApply for step invoke
This commit is contained in:
parent
be5fdb1d82
commit
dfb0d94bc2
|
@ -1,5 +1,7 @@
|
||||||
import D from 'debug';
|
import D from 'debug';
|
||||||
|
|
||||||
|
import {fastApply} from '@avocado/core';
|
||||||
|
|
||||||
import {Globals} from './globals';
|
import {Globals} from './globals';
|
||||||
import {TraversalCompiler} from './traversal-compiler';
|
import {TraversalCompiler} from './traversal-compiler';
|
||||||
import {TypeMap} from './types';
|
import {TypeMap} from './types';
|
||||||
|
@ -71,7 +73,8 @@ class Context extends Map {
|
||||||
case 'key':
|
case 'key':
|
||||||
return node[step.key];
|
return node[step.key];
|
||||||
case 'invoke':
|
case 'invoke':
|
||||||
return node(...step.args.map((arg) => arg.get(this)));
|
const args = step.args.map((arg) => arg.get(this));
|
||||||
|
return fastApply(null, node, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user