src/share/vm/asm/assembler.cpp

changeset 4317
6ab62ad83507
parent 4316
1acccb7c0b01
child 4318
cd3d6a6b95d9
     1.1 --- a/src/share/vm/asm/assembler.cpp	Tue Nov 27 17:41:38 2012 -0800
     1.2 +++ b/src/share/vm/asm/assembler.cpp	Fri Nov 30 11:44:05 2012 -0800
     1.3 @@ -56,16 +56,13 @@
     1.4    if (code == NULL)  return;
     1.5    CodeSection* cs = code->insts();
     1.6    cs->clear_mark();   // new assembler kills old mark
     1.7 -  _code_section = cs;
     1.8 -  _code_begin  = cs->start();
     1.9 -  _code_limit  = cs->limit();
    1.10 -  _code_pos    = cs->end();
    1.11 -  _oop_recorder= code->oop_recorder();
    1.12 -  DEBUG_ONLY( _short_branch_delta = 0; )
    1.13 -  if (_code_begin == NULL)  {
    1.14 +  if (cs->start() == NULL)  {
    1.15      vm_exit_out_of_memory(0, err_msg("CodeCache: no room for %s",
    1.16                                       code->name()));
    1.17    }
    1.18 +  _code_section = cs;
    1.19 +  _oop_recorder= code->oop_recorder();
    1.20 +  DEBUG_ONLY( _short_branch_delta = 0; )
    1.21  }
    1.22  
    1.23  void AbstractAssembler::set_code_section(CodeSection* cs) {
    1.24 @@ -73,9 +70,6 @@
    1.25    assert(cs->is_allocated(), "need to pre-allocate this section");
    1.26    cs->clear_mark();  // new assembly into this section kills old mark
    1.27    _code_section = cs;
    1.28 -  _code_begin  = cs->start();
    1.29 -  _code_limit  = cs->limit();
    1.30 -  _code_pos    = cs->end();
    1.31  }
    1.32  
    1.33  // Inform CodeBuffer that incoming code and relocation will be for stubs
    1.34 @@ -83,7 +77,6 @@
    1.35    CodeBuffer*  cb = code();
    1.36    CodeSection* cs = cb->stubs();
    1.37    assert(_code_section == cb->insts(), "not in insts?");
    1.38 -  sync();
    1.39    if (cs->maybe_expand_to_ensure_remaining(required_space)
    1.40        && cb->blob() == NULL) {
    1.41      return NULL;
    1.42 @@ -96,7 +89,6 @@
    1.43  // Should not be called if start_a_stub() returned NULL
    1.44  void AbstractAssembler::end_a_stub() {
    1.45    assert(_code_section == code()->stubs(), "not in stubs?");
    1.46 -  sync();
    1.47    set_code_section(code()->insts());
    1.48  }
    1.49  
    1.50 @@ -105,7 +97,6 @@
    1.51    CodeBuffer*  cb = code();
    1.52    CodeSection* cs = cb->consts();
    1.53    assert(_code_section == cb->insts() || _code_section == cb->stubs(), "not in insts/stubs?");
    1.54 -  sync();
    1.55    address end = cs->end();
    1.56    int pad = -(intptr_t)end & (required_align-1);
    1.57    if (cs->maybe_expand_to_ensure_remaining(pad + required_space)) {
    1.58 @@ -124,12 +115,10 @@
    1.59  // in section cs (insts or stubs).
    1.60  void AbstractAssembler::end_a_const(CodeSection* cs) {
    1.61    assert(_code_section == code()->consts(), "not in consts?");
    1.62 -  sync();
    1.63    set_code_section(cs);
    1.64  }
    1.65  
    1.66  void AbstractAssembler::flush() {
    1.67 -  sync();
    1.68    ICache::invalidate_range(addr_at(0), offset());
    1.69  }
    1.70  

mercurial