@@ -54,9 +54,7 @@ import { CompilerOptions } from '@vue/compiler-core'
54
54
import { markAttrsAccessed } from './componentRenderUtils'
55
55
import { currentRenderingInstance } from './componentRenderContext'
56
56
import { startMeasure , endMeasure } from './profiling'
57
- import { checkCompatEnabled } from './compat/compatConfig'
58
- import { DeprecationTypes } from './compat/deprecations'
59
- import { compatH } from './compat/renderFn'
57
+ import { convertLegacyRenderFn } from './compat/renderFn'
60
58
61
59
export type Data = Record < string , unknown >
62
60
@@ -96,6 +94,10 @@ export interface ComponentInternalOptions {
96
94
* @internal
97
95
*/
98
96
__hmrId ?: string
97
+ /**
98
+ * Compat build only, for bailing out of certain compatibility behavior
99
+ */
100
+ __isBuiltIn ?: boolean
99
101
/**
100
102
* This one should be exposed so that devtools can make use of it
101
103
*/
@@ -188,6 +190,10 @@ export type InternalRenderFunction = {
188
190
$options : ComponentInternalInstance [ 'ctx' ]
189
191
) : VNodeChild
190
192
_rc ?: boolean // isRuntimeCompiled
193
+
194
+ // __COMPAT__ only
195
+ _compatChecked ?: boolean // v3 and already checked for v2 compat
196
+ _compatWrapped ?: boolean // is wrapped for v2 compat
191
197
}
192
198
193
199
/**
@@ -684,15 +690,8 @@ export function finishComponentSetup(
684
690
) {
685
691
const Component = instance . type as ComponentOptions
686
692
687
- if (
688
- __COMPAT__ &&
689
- Component . render &&
690
- checkCompatEnabled ( DeprecationTypes . RENDER_FUNCTION , instance )
691
- ) {
692
- const originalRender = Component . render
693
- Component . render = function compatRender ( ) {
694
- return originalRender . call ( this , compatH )
695
- }
693
+ if ( __COMPAT__ ) {
694
+ convertLegacyRenderFn ( instance )
696
695
}
697
696
698
697
// template / render function normalization
0 commit comments