@@ -196,20 +196,6 @@ macro_rules! make_func {
196
196
197
197
/// Defines an associated function within a given type.
198
198
/// <sup>**[tt-call]**</sup>
199
- macro_rules! make_impl_func {
200
- {
201
- type = [ { $type: ty } ]
202
- lifetime = [ { $( $( $life: lifetime ) ,+ ) ? } ]
203
- $( $rest: tt ) *
204
- } => {
205
- impl $( < $( $life ) ,+ > ) ? $type {
206
- make_func! {
207
- $( $rest ) *
208
- }
209
- }
210
- } ;
211
- }
212
-
213
199
/// Defines an associated function for `JitState` for each `jit_entry`.
214
200
macro_rules! jit_entry {
215
201
( $entry: ident( $enum_in: ident $( , $inarg: ident ) * )
@@ -220,9 +206,7 @@ macro_rules! jit_entry {
220
206
tt_call! {
221
207
macro = [ { jit_signature } ]
222
208
suffix = [ { $entry } ]
223
- ~~> make_impl_func! {
224
- type = [ { JitState <' j> } ]
225
- lifetime = [ { ' j } ]
209
+ ~~> make_func! {
226
210
func = [ { $entry } ]
227
211
body = [ {
228
212
JitNode {
@@ -244,9 +228,7 @@ macro_rules! jit_entry {
244
228
tt_call! {
245
229
macro = [ { jit_signature } ]
246
230
suffix = [ { $invokes } ]
247
- ~~> make_impl_func! {
248
- type = [ { JitState <' j> } ]
249
- lifetime = [ { ' j } ]
231
+ ~~> make_func! {
250
232
func = [ { $entry } ]
251
233
body = [ { self . $invokes( jit_code_t:: $enum, std:: ptr:: null_mut( ) $( , $outarg ) * ) } ]
252
234
rettype = [ { JitNode <' j> } ]
@@ -264,9 +246,7 @@ macro_rules! jit_entry {
264
246
tt_call! {
265
247
macro = [ { jit_signature } ]
266
248
suffix = [ { $invokes } ]
267
- ~~> make_impl_func! {
268
- type = [ { JitState <' j> } ]
269
- lifetime = [ { ' j } ]
249
+ ~~> make_func! {
270
250
func = [ { $entry } ]
271
251
body = [ { self . $invokes( jit_code_t:: $enum $( , $outarg ) * ) } ]
272
252
rettype = [ { JitNode <' j> } ]
@@ -278,7 +258,11 @@ macro_rules! jit_entry {
278
258
}
279
259
280
260
macro_rules! jit_entries {
281
- ( $( $tokens: tt ) * ) => { $( $tokens ) * } ;
261
+ ( $( $tokens: tt ) * ) => {
262
+ impl <' j> JitState <' j> {
263
+ $( $tokens ) *
264
+ }
265
+ } ;
282
266
}
283
267
284
268
include ! ( concat!( env!( "OUT_DIR" ) , "/entries.rs" ) ) ;
0 commit comments