|
@@ -114,7 +114,7 @@ let field_access ctx mode f fh e pfield =
|
|
let is_set = match mode with MSet _ -> true | _ -> false in
|
|
let is_set = match mode with MSet _ -> true | _ -> false in
|
|
check_no_closure_meta ctx f fh mode pfield;
|
|
check_no_closure_meta ctx f fh mode pfield;
|
|
let bypass_accessor = if ctx.bypass_accessor > 0 then (ctx.bypass_accessor <- ctx.bypass_accessor - 1; true) else false in
|
|
let bypass_accessor = if ctx.bypass_accessor > 0 then (ctx.bypass_accessor <- ctx.bypass_accessor - 1; true) else false in
|
|
- let make_access inline = FieldAccess.create e f fh inline pfull in
|
|
|
|
|
|
+ let make_access inline = FieldAccess.create e f fh (inline && ctx.allow_inline) pfull in
|
|
match f.cf_kind with
|
|
match f.cf_kind with
|
|
| Method m ->
|
|
| Method m ->
|
|
let normal () = AKField(make_access false) in
|
|
let normal () = AKField(make_access false) in
|
|
@@ -130,7 +130,7 @@ let field_access ctx mode f fh e pfield =
|
|
in
|
|
in
|
|
let default () =
|
|
let default () =
|
|
match m, mode with
|
|
match m, mode with
|
|
- | MethInline, _ when ctx.g.doinline ->
|
|
|
|
|
|
+ | MethInline, _ when ctx.g.doinline && ctx.allow_inline ->
|
|
AKField (make_access true)
|
|
AKField (make_access true)
|
|
| MethMacro, MGet ->
|
|
| MethMacro, MGet ->
|
|
display_error ctx.com "Macro functions must be called immediately" pfield; normal()
|
|
display_error ctx.com "Macro functions must be called immediately" pfield; normal()
|
|
@@ -204,7 +204,7 @@ let field_access ctx mode f fh e pfield =
|
|
if ctx.untyped then normal false else AKNo f.cf_name)
|
|
if ctx.untyped then normal false else AKNo f.cf_name)
|
|
| AccNormal | AccNo ->
|
|
| AccNormal | AccNo ->
|
|
normal false
|
|
normal false
|
|
- | AccCall when ctx.in_display && DisplayPosition.display_position#enclosed_in pfull ->
|
|
|
|
|
|
+ | AccCall when (not ctx.allow_inline) || (ctx.in_display && DisplayPosition.display_position#enclosed_in pfull) ->
|
|
normal false
|
|
normal false
|
|
| AccCall ->
|
|
| AccCall ->
|
|
let m = (match mode with MSet _ -> "set_" | _ -> "get_") ^ f.cf_name in
|
|
let m = (match mode with MSet _ -> "set_" | _ -> "get_") ^ f.cf_name in
|