hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp
changeset 46727 6e4a84748e2c
parent 7397 5b173b4ca846
equal deleted inserted replaced
46726:7801367e3cc9 46727:6e4a84748e2c
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * Copyright 2007, 2008 Red Hat, Inc.
     3  * Copyright 2007, 2008 Red Hat, Inc.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5  *
     5  *
     6  * This code is free software; you can redistribute it and/or modify it
     6  * This code is free software; you can redistribute it and/or modify it
     7  * under the terms of the GNU General Public License version 2 only, as
     7  * under the terms of the GNU General Public License version 2 only, as
    65 class SignatureHandlerGeneratorBase : public NativeSignatureIterator {
    65 class SignatureHandlerGeneratorBase : public NativeSignatureIterator {
    66  private:
    66  private:
    67   ffi_cif* _cif;
    67   ffi_cif* _cif;
    68 
    68 
    69  protected:
    69  protected:
    70   SignatureHandlerGeneratorBase(methodHandle method, ffi_cif *cif)
    70   SignatureHandlerGeneratorBase(const methodHandle& method, ffi_cif *cif)
    71     : NativeSignatureIterator(method), _cif(cif) {
    71     : NativeSignatureIterator(method), _cif(cif) {
    72     _cif->nargs = 0;
    72     _cif->nargs = 0;
    73   }
    73   }
    74 
    74 
    75   ffi_cif *cif() const {
    75   ffi_cif *cif() const {
    94 class SignatureHandlerGenerator : public SignatureHandlerGeneratorBase {
    94 class SignatureHandlerGenerator : public SignatureHandlerGeneratorBase {
    95  private:
    95  private:
    96   CodeBuffer* _cb;
    96   CodeBuffer* _cb;
    97 
    97 
    98  public:
    98  public:
    99   SignatureHandlerGenerator(methodHandle method, CodeBuffer* buffer)
    99   SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer)
   100     : SignatureHandlerGeneratorBase(method, (ffi_cif *) buffer->insts_end()),
   100     : SignatureHandlerGeneratorBase(method, (ffi_cif *) buffer->insts_end()),
   101       _cb(buffer) {
   101       _cb(buffer) {
   102     _cb->set_insts_end((address) (cif() + 1));
   102     _cb->set_insts_end((address) (cif() + 1));
   103   }
   103   }
   104 
   104 
   113 class SlowSignatureHandlerGenerator : public SignatureHandlerGeneratorBase {
   113 class SlowSignatureHandlerGenerator : public SignatureHandlerGeneratorBase {
   114  private:
   114  private:
   115   intptr_t *_dst;
   115   intptr_t *_dst;
   116 
   116 
   117  public:
   117  public:
   118   SlowSignatureHandlerGenerator(methodHandle method, intptr_t* buf)
   118   SlowSignatureHandlerGenerator(const methodHandle& method, intptr_t* buf)
   119     : SignatureHandlerGeneratorBase(method, (ffi_cif *) buf) {
   119     : SignatureHandlerGeneratorBase(method, (ffi_cif *) buf) {
   120     _dst = (intptr_t *) (cif() + 1);
   120     _dst = (intptr_t *) (cif() + 1);
   121   }
   121   }
   122 
   122 
   123  private:
   123  private: