equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
884 |
884 |
885 const TypeInstPtr* tp = phase->type(n)->isa_instptr(); |
885 const TypeInstPtr* tp = phase->type(n)->isa_instptr(); |
886 if (!tp || tp->klass() != phase->C->env()->Class_klass()) return NULL; |
886 if (!tp || tp->klass() != phase->C->env()->Class_klass()) return NULL; |
887 |
887 |
888 Node* adr = n->in(MemNode::Address); |
888 Node* adr = n->in(MemNode::Address); |
889 // First load from OopHandle |
889 // First load from OopHandle: ((OopHandle)mirror)->resolve(); may need barrier. |
890 if (adr->Opcode() != Op_LoadP || !phase->type(adr)->isa_rawptr()) return NULL; |
890 if (adr->Opcode() != Op_LoadP || !phase->type(adr)->isa_rawptr()) return NULL; |
891 adr = adr->in(MemNode::Address); |
891 adr = adr->in(MemNode::Address); |
892 |
892 |
893 intptr_t off = 0; |
893 intptr_t off = 0; |
894 Node* k = AddPNode::Ideal_base_and_offset(adr, phase, off); |
894 Node* k = AddPNode::Ideal_base_and_offset(adr, phase, off); |