Mercurial > hg > graal-compiler
comparison src/share/vm/utilities/array.hpp @ 18041:52b4284cb496
Merge with jdk8u20-b26
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 16:02:50 +0200 |
parents | 4ca6dc0799b6 78bbf4d43a14 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
17606:45d7b2c7029d | 18041:52b4284cb496 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 2014, 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. |
56 initialize(esize, length); | 56 initialize(esize, length); |
57 } | 57 } |
58 | 58 |
59 void initialize(size_t esize, int length) { | 59 void initialize(size_t esize, int length) { |
60 assert(length >= 0, "illegal length"); | 60 assert(length >= 0, "illegal length"); |
61 assert(_data == NULL, "must be new object"); | 61 assert(StressRewriter || _data == NULL, "must be new object"); |
62 _length = length; | 62 _length = length; |
63 _data = resource_allocate_bytes(esize * length); | 63 _data = resource_allocate_bytes(esize * length); |
64 DEBUG_ONLY(init_nesting();) | 64 DEBUG_ONLY(init_nesting();) |
65 } | 65 } |
66 | 66 |
373 // Note, this offset don't have to be wordSize aligned. | 373 // Note, this offset don't have to be wordSize aligned. |
374 static int base_offset_in_bytes() { return (int) (offset_of(Array<T>, _data)); }; | 374 static int base_offset_in_bytes() { return (int) (offset_of(Array<T>, _data)); }; |
375 | 375 |
376 // FIXME: How to handle this? | 376 // FIXME: How to handle this? |
377 void print_value_on(outputStream* st) const { | 377 void print_value_on(outputStream* st) const { |
378 st->print("Array<T>(" INTPTR_FORMAT ")", this); | 378 st->print("Array<T>(" INTPTR_FORMAT ")", p2i(this)); |
379 } | 379 } |
380 | 380 |
381 #ifndef PRODUCT | 381 #ifndef PRODUCT |
382 void print(outputStream* st) { | 382 void print(outputStream* st) { |
383 for (int i = 0; i< _length; i++) { | 383 for (int i = 0; i< _length; i++) { |