@@ -196,19 +196,19 @@ func (c *compiler) NilNode(_ *ast.NilNode) {
196
196
197
197
func (c * compiler ) IdentifierNode (node * ast.IdentifierNode ) {
198
198
if c .mapEnv {
199
- c .emit (OpEnvFast , c .addConstant (node .Value ))
199
+ c .emit (OpLoadFast , c .addConstant (node .Value ))
200
200
} else if len (node .FieldIndex ) > 0 {
201
- c .emit (OpEnvField , c .addConstant (& runtime.Field {
201
+ c .emit (OpLoadField , c .addConstant (& runtime.Field {
202
202
Index : node .FieldIndex ,
203
203
Path : []string {node .Value },
204
204
}))
205
205
} else if node .Method {
206
- c .emit (OpEnvMethod , c .addConstant (& runtime.Method {
206
+ c .emit (OpLoadMethod , c .addConstant (& runtime.Method {
207
207
Name : node .Value ,
208
208
Index : node .MethodIndex ,
209
209
}))
210
210
} else {
211
- c .emit (OpEnvConst , c .addConstant (node .Value ))
211
+ c .emit (OpLoadConst , c .addConstant (node .Value ))
212
212
}
213
213
if node .Deref {
214
214
c .emit (OpDeref )
@@ -454,7 +454,7 @@ func (c *compiler) MemberNode(node *ast.MemberNode) {
454
454
}
455
455
index = append (ident .FieldIndex , index ... )
456
456
path = append ([]string {ident .Value }, path ... )
457
- c .emitLocation (ident .Location (), OpEnvField , c .addConstant (
457
+ c .emitLocation (ident .Location (), OpLoadField , c .addConstant (
458
458
& runtime.Field {Index : index , Path : path },
459
459
))
460
460
goto deref
0 commit comments