• Russ Cox's avatar
    gc: fix order of evaluation · ee9bfb02
    Russ Cox authored
    Pulling function calls out to happen before the
    expression being evaluated was causing illegal
    reorderings even without inlining; with inlining
    it got worse.  This CL adds a separate ordering pass
    to move things with a fixed order out of expressions
    and into the statement sequence, where they will
    not be reordered by walk.
    
    Replaces lvd's CL 5534079.
    
    Fixes #2740.
    
    R=lvd
    CC=golang-dev
    https://golang.org/cl/5569062
    ee9bfb02
order.c 6.46 KB