src/cpu/ppc/vm/ppc.ad

changeset 8427
c3d0bd36ab28
parent 7836
37a5a1341478
child 8446
6021c95f5944
     1.1 --- a/src/cpu/ppc/vm/ppc.ad	Mon Mar 14 12:35:48 2016 +0300
     1.2 +++ b/src/cpu/ppc/vm/ppc.ad	Thu Apr 21 16:19:33 2016 +0300
     1.3 @@ -1171,7 +1171,7 @@
     1.4    // Start the stub.
     1.5    address stub = __ start_a_stub(Compile::MAX_stubs_size/2);
     1.6    if (stub == NULL) {
     1.7 -    Compile::current()->env()->record_out_of_memory_failure();
     1.8 +    ciEnv::current()->record_failure("CodeCache is full");
     1.9      return;
    1.10    }
    1.11  
    1.12 @@ -1249,7 +1249,7 @@
    1.13  
    1.14      // Emit the trampoline stub which will be related to the branch-and-link below.
    1.15      CallStubImpl::emit_trampoline_stub(_masm, entry_point_toc_offset, offsets.insts_call_instruction_offset);
    1.16 -    if (Compile::current()->env()->failing()) { return offsets; } // Code cache may be full.
    1.17 +    if (ciEnv::current()->failing()) { return offsets; } // Code cache may be full.
    1.18      __ relocate(rtype);
    1.19    }
    1.20  
    1.21 @@ -3488,7 +3488,7 @@
    1.22  
    1.23          // Emit the trampoline stub which will be related to the branch-and-link below.
    1.24          CallStubImpl::emit_trampoline_stub(_masm, entry_point_toc_offset, start_offset);
    1.25 -        if (Compile::current()->env()->failing()) { return; } // Code cache may be full.
    1.26 +        if (ciEnv::current()->failing()) { return; } // Code cache may be full.
    1.27          __ relocate(_optimized_virtual ?
    1.28                      relocInfo::opt_virtual_call_type : relocInfo::static_call_type);
    1.29        }
    1.30 @@ -3501,7 +3501,11 @@
    1.31        __ bl(__ pc());  // Emits a relocation.
    1.32  
    1.33        // The stub for call to interpreter.
    1.34 -      CompiledStaticCall::emit_to_interp_stub(cbuf);
    1.35 +      address stub = CompiledStaticCall::emit_to_interp_stub(cbuf);
    1.36 +      if (stub == NULL) {
    1.37 +        ciEnv::current()->record_failure("CodeCache is full"); 
    1.38 +        return;
    1.39 +      }
    1.40      }
    1.41    %}
    1.42  
    1.43 @@ -3546,7 +3550,11 @@
    1.44  
    1.45      assert(_method, "execute next statement conditionally");
    1.46      // The stub for call to interpreter.
    1.47 -    CompiledStaticCall::emit_to_interp_stub(cbuf);
    1.48 +    address stub = CompiledStaticCall::emit_to_interp_stub(cbuf);
    1.49 +    if (stub == NULL) {
    1.50 +      ciEnv::current()->record_failure("CodeCache is full"); 
    1.51 +      return;
    1.52 +    }
    1.53  
    1.54      // Restore original sp.
    1.55      __ ld(R11_scratch1, 0, R1_SP); // Load caller sp.

mercurial