Mercurial > hg > graal-compiler
comparison src/share/vm/ci/ciMethodBlocks.cpp @ 1930:2d26b0046e0d
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Tue, 30 Nov 2010 14:53:30 +0100 |
parents | 0e35fa8ebccd |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1484:6b7001391c97 | 1930:2d26b0046e0d |
---|---|
1 /* | 1 /* |
2 * Copyright 2006-2009 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright (c) 2006, 2009, 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. |
14 * | 14 * |
15 * You should have received a copy of the GNU General Public License version | 15 * You should have received a copy of the GNU General Public License version |
16 * 2 along with this work; if not, write to the Free Software Foundation, | 16 * 2 along with this work; if not, write to the Free Software Foundation, |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
18 * | 18 * |
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 * CA 95054 USA or visit www.sun.com if you need additional information or | 20 * or visit www.oracle.com if you need additional information or have any |
21 * have any questions. | 21 * questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "incls/_precompiled.incl" | 25 #include "incls/_precompiled.incl" |
26 #include "incls/_ciMethodBlocks.cpp.incl" | 26 #include "incls/_ciMethodBlocks.cpp.incl" |
250 | 250 |
251 ciMethodBlocks::ciMethodBlocks(Arena *arena, ciMethod *meth): _method(meth), | 251 ciMethodBlocks::ciMethodBlocks(Arena *arena, ciMethod *meth): _method(meth), |
252 _arena(arena), _num_blocks(0), _code_size(meth->code_size()) { | 252 _arena(arena), _num_blocks(0), _code_size(meth->code_size()) { |
253 int block_estimate = _code_size / 8; | 253 int block_estimate = _code_size / 8; |
254 | 254 |
255 _blocks = new(_arena) GrowableArray<ciBlock *>(block_estimate); | 255 _blocks = new(_arena) GrowableArray<ciBlock *>(_arena, block_estimate, 0, NULL); |
256 int b2bsize = _code_size * sizeof(ciBlock **); | 256 int b2bsize = _code_size * sizeof(ciBlock **); |
257 _bci_to_block = (ciBlock **) arena->Amalloc(b2bsize); | 257 _bci_to_block = (ciBlock **) arena->Amalloc(b2bsize); |
258 Copy::zero_to_words((HeapWord*) _bci_to_block, b2bsize / sizeof(HeapWord)); | 258 Copy::zero_to_words((HeapWord*) _bci_to_block, b2bsize / sizeof(HeapWord)); |
259 | 259 |
260 // create initial block covering the entire method | 260 // create initial block covering the entire method |