equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2017, 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. |
393 |
393 |
394 void NodeHash::operator=(const NodeHash& nh) { |
394 void NodeHash::operator=(const NodeHash& nh) { |
395 // Unlock all nodes upon replacement of table. |
395 // Unlock all nodes upon replacement of table. |
396 if (&nh == this) return; |
396 if (&nh == this) return; |
397 if (_table != (Node**)badAddress) clear(); |
397 if (_table != (Node**)badAddress) clear(); |
398 memcpy(this, &nh, sizeof(*this)); |
398 memcpy((void*)this, (void*)&nh, sizeof(*this)); |
399 // Do not increment hash_lock counts again. |
399 // Do not increment hash_lock counts again. |
400 // Instead, be sure we never again use the source table. |
400 // Instead, be sure we never again use the source table. |
401 ((NodeHash*)&nh)->_table = (Node**)badAddress; |
401 ((NodeHash*)&nh)->_table = (Node**)badAddress; |
402 } |
402 } |
403 |
403 |
692 switch (t->base()) { // fast paths |
692 switch (t->base()) { // fast paths |
693 case Type::Half: |
693 case Type::Half: |
694 case Type::Top: return (ConNode*) C->top(); |
694 case Type::Top: return (ConNode*) C->top(); |
695 case Type::Int: return intcon( t->is_int()->get_con() ); |
695 case Type::Int: return intcon( t->is_int()->get_con() ); |
696 case Type::Long: return longcon( t->is_long()->get_con() ); |
696 case Type::Long: return longcon( t->is_long()->get_con() ); |
|
697 default: break; |
697 } |
698 } |
698 if (t->is_zero_type()) |
699 if (t->is_zero_type()) |
699 return zerocon(t->basic_type()); |
700 return zerocon(t->basic_type()); |
700 return uncached_makecon(t); |
701 return uncached_makecon(t); |
701 } |
702 } |
1673 assert(t0->isa_int()->_widen <= t->isa_int()->_widen, "widen increases"); |
1674 assert(t0->isa_int()->_widen <= t->isa_int()->_widen, "widen increases"); |
1674 break; |
1675 break; |
1675 case Type::Long: |
1676 case Type::Long: |
1676 assert(t0->isa_long()->_widen <= t->isa_long()->_widen, "widen increases"); |
1677 assert(t0->isa_long()->_widen <= t->isa_long()->_widen, "widen increases"); |
1677 break; |
1678 break; |
|
1679 default: |
|
1680 break; |
1678 } |
1681 } |
1679 return true; |
1682 return true; |
1680 } |
1683 } |
1681 #endif //ASSERT |
1684 #endif //ASSERT |
1682 |
1685 |