29 // Implementation of AbstractAssembler |
29 // Implementation of AbstractAssembler |
30 // |
30 // |
31 // The AbstractAssembler is generating code into a CodeBuffer. To make code generation faster, |
31 // The AbstractAssembler is generating code into a CodeBuffer. To make code generation faster, |
32 // the assembler keeps a copy of the code buffers boundaries & modifies them when |
32 // the assembler keeps a copy of the code buffers boundaries & modifies them when |
33 // emitting bytes rather than using the code buffers accessor functions all the time. |
33 // emitting bytes rather than using the code buffers accessor functions all the time. |
34 // The code buffer is updated via set_code_end(...) after emiting a whole instruction. |
34 // The code buffer is updated via set_code_end(...) after emitting a whole instruction. |
35 |
35 |
36 AbstractAssembler::AbstractAssembler(CodeBuffer* code) { |
36 AbstractAssembler::AbstractAssembler(CodeBuffer* code) { |
37 if (code == NULL) return; |
37 if (code == NULL) return; |
38 CodeSection* cs = code->insts(); |
38 CodeSection* cs = code->insts(); |
39 cs->clear_mark(); // new assembler kills old mark |
39 cs->clear_mark(); // new assembler kills old mark |