1. A method for selectively eliminating write barrier code in a system that executes a garbage collection and an application, comprising: obtaining bytecode corresponding to the application and comprising a plurality of instructions; identifying, within the plurality of instructions, a first write operation to a first memory location storing a predetermined value, wherein the first write operation is identified by: determining an initial program state existing before execution of the first write operation; calling a program instruction analysis method for the first write operation taking the initial program state as an input, wherein the program instruction analysis method is based on an instruction type of the first write operation; and analyzing, using the program instruction analysis method the first write operation to generate a final program state resulting from execution of the first write operation; flagging, in response to the first memory location storing the predetermined value, the first write operation; identifying, within the plurality of instructions, a second write operation to a second memory location storing a value other than the predetermined value; and generating runtime binary code from the plurality of instructions by: preventing, in response to flagging the first write operation, generation of write barrier code for the first write operation; generating write barrier code for the second write operation, wherein the garbage collection and the application communicate based on a snapshot-at-the-beginning (SATB) technique.