feat(compiler-core): more hoisting optimizations (#276)

This commit is contained in:
HcySunYang
2019-10-15 23:41:24 +08:00
committed by Evan You
parent 9a37c4b2c3
commit 68a3879b88
11 changed files with 373 additions and 15 deletions

View File

@@ -79,6 +79,7 @@ describe('isEmptyExpression', () => {
content: '',
type: NodeTypes.SIMPLE_EXPRESSION,
isStatic: true,
isConstant: true,
loc: null as any
})
).toBe(true)
@@ -90,6 +91,7 @@ describe('isEmptyExpression', () => {
content: ' \t ',
type: NodeTypes.SIMPLE_EXPRESSION,
isStatic: true,
isConstant: true,
loc: null as any
})
).toBe(true)
@@ -101,6 +103,7 @@ describe('isEmptyExpression', () => {
content: 'foo',
type: NodeTypes.SIMPLE_EXPRESSION,
isStatic: true,
isConstant: true,
loc: null as any
})
).toBe(false)