Mercurial > hg > graal-compiler
annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/NewArrayStub.java @ 21556:48c1ebd24120
renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 27 May 2015 00:36:16 +0200 |
parents | 5324104ac4f3 |
children | 0e095e2c24e2 |
rev | line source |
---|---|
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
1 /* |
18362
ea0fbb571466
Use pointer stamps in LoadHub and LoadMethod.
Roland Schatz <roland.schatz@oracle.com>
parents:
18232
diff
changeset
|
2 * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
4 * |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
8 * |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
14 * |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
18 * |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
21 * questions. |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
22 */ |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
23 package com.oracle.graal.hotspot.stubs; |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
24 |
21556
48c1ebd24120
renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21551
diff
changeset
|
25 import com.oracle.jvmci.code.Register; |
48c1ebd24120
renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21551
diff
changeset
|
26 import com.oracle.jvmci.meta.ForeignCallDescriptor; |
9513
659bb6cf930c
rename: HotSpotSnippetUtils -> HotSpotReplacementsUtil
Doug Simon <doug.simon@oracle.com>
parents:
9418
diff
changeset
|
27 import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.*; |
8415
2361bf148c06
rename packages: *snippets* -> *replacements*
Doug Simon <doug.simon@oracle.com>
parents:
7868
diff
changeset
|
28 import static com.oracle.graal.hotspot.replacements.NewObjectSnippets.*; |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
29 import static com.oracle.graal.hotspot.stubs.NewInstanceStub.*; |
9671
0b3d19e4e2a2
used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents:
9618
diff
changeset
|
30 import static com.oracle.graal.hotspot.stubs.StubUtil.*; |
21551
5324104ac4f3
moved com.oracle.graal.hotspot.jvmci classes to com.oracle.jvmci.hotspot module (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21529
diff
changeset
|
31 import static com.oracle.jvmci.hotspot.HotSpotMetaAccessProvider.*; |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
32 |
18370
6713fef8c859
Make the @Fold annotation a top-level interface in the api project. It is not tied to the Snippet class where it was located before.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
18362
diff
changeset
|
33 import com.oracle.graal.api.replacements.*; |
9671
0b3d19e4e2a2
used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents:
9618
diff
changeset
|
34 import com.oracle.graal.graph.Node.ConstantNodeParameter; |
0b3d19e4e2a2
used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents:
9618
diff
changeset
|
35 import com.oracle.graal.graph.Node.NodeIntrinsic; |
8627
75db7afee829
implemented lazy installation of replacements (GRAAL-137)
Doug Simon <doug.simon@oracle.com>
parents:
8415
diff
changeset
|
36 import com.oracle.graal.hotspot.*; |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
37 import com.oracle.graal.hotspot.meta.*; |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
38 import com.oracle.graal.hotspot.nodes.*; |
18481
f91e40c4bb47
Create separate stamps for Klass* and Method*, and make them hotspot specific.
Roland Schatz <roland.schatz@oracle.com>
parents:
18401
diff
changeset
|
39 import com.oracle.graal.hotspot.nodes.type.*; |
8415
2361bf148c06
rename packages: *snippets* -> *replacements*
Doug Simon <doug.simon@oracle.com>
parents:
7868
diff
changeset
|
40 import com.oracle.graal.hotspot.replacements.*; |
18401
e7ab82e7cc37
Move metaspace pointer handling to hotspot specific WordTypeRewriter.
Roland Schatz <roland.schatz@oracle.com>
parents:
18380
diff
changeset
|
41 import com.oracle.graal.hotspot.word.*; |
19775
14e703edb2ab
use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents:
18481
diff
changeset
|
42 import com.oracle.graal.nodes.*; |
8415
2361bf148c06
rename packages: *snippets* -> *replacements*
Doug Simon <doug.simon@oracle.com>
parents:
7868
diff
changeset
|
43 import com.oracle.graal.replacements.*; |
9671
0b3d19e4e2a2
used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents:
9618
diff
changeset
|
44 import com.oracle.graal.replacements.Snippet.ConstantParameter; |
7300
2912b72d840a
More complete and reusable Word type
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7275
diff
changeset
|
45 import com.oracle.graal.word.*; |
21551
5324104ac4f3
moved com.oracle.graal.hotspot.jvmci classes to com.oracle.jvmci.hotspot module (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21529
diff
changeset
|
46 import com.oracle.jvmci.hotspot.*; |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
47 |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
48 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7356
diff
changeset
|
49 * Stub implementing the fast path for TLAB refill during instance class allocation. This stub is |
19864
82f65fca8da6
Fix javadoc.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19775
diff
changeset
|
50 * called from the {@linkplain NewObjectSnippets inline} allocation code when TLAB allocation fails. |
82f65fca8da6
Fix javadoc.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19775
diff
changeset
|
51 * If this stub fails to refill the TLAB or allocate the object, it calls out to the HotSpot C++ |
82f65fca8da6
Fix javadoc.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19775
diff
changeset
|
52 * runtime to complete the allocation. |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
53 */ |
9617
c1ef2bf6848e
removed the requirement that a compiled stub is implemented by a snippet
Doug Simon <doug.simon@oracle.com>
parents:
9576
diff
changeset
|
54 public class NewArrayStub extends SnippetStub { |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
55 |
19775
14e703edb2ab
use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents:
18481
diff
changeset
|
56 public NewArrayStub(HotSpotProviders providers, HotSpotForeignCallLinkage linkage) { |
14e703edb2ab
use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents:
18481
diff
changeset
|
57 super("newArray", providers, linkage); |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
58 } |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
59 |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
60 @Override |
19775
14e703edb2ab
use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents:
18481
diff
changeset
|
61 protected Object[] makeConstArgs() { |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12054
diff
changeset
|
62 HotSpotResolvedObjectType intArrayType = (HotSpotResolvedObjectType) providers.getMetaAccess().lookupJavaType(int[].class); |
19775
14e703edb2ab
use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents:
18481
diff
changeset
|
63 int count = method.getSignature().getParameterCount(false); |
14e703edb2ab
use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents:
18481
diff
changeset
|
64 Object[] args = new Object[count]; |
14e703edb2ab
use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents:
18481
diff
changeset
|
65 assert checkConstArg(2, "intArrayHub"); |
14e703edb2ab
use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents:
18481
diff
changeset
|
66 assert checkConstArg(3, "threadRegister"); |
14e703edb2ab
use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents:
18481
diff
changeset
|
67 args[2] = ConstantNode.forConstant(KlassPointerStamp.klassNonNull(), intArrayType.klass(), null); |
14e703edb2ab
use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents:
18481
diff
changeset
|
68 args[3] = providers.getRegisters().getThreadRegister(); |
9015
92d2bedb5dfc
Change of Snippet template and instantiation process
Christian Wimmer <christian.wimmer@oracle.com>
parents:
8637
diff
changeset
|
69 return args; |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
70 } |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
71 |
9567
a8b4f26d8485
removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents:
9557
diff
changeset
|
72 @Fold |
a8b4f26d8485
removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents:
9557
diff
changeset
|
73 private static boolean logging() { |
a8b4f26d8485
removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents:
9557
diff
changeset
|
74 return Boolean.getBoolean("graal.logNewArrayStub"); |
a8b4f26d8485
removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents:
9557
diff
changeset
|
75 } |
a8b4f26d8485
removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents:
9557
diff
changeset
|
76 |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
77 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7356
diff
changeset
|
78 * Re-attempts allocation after an initial TLAB allocation failed or was skipped (e.g., due to |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7356
diff
changeset
|
79 * -XX:-UseTLAB). |
14766
390d72c7cc04
SnippetCounters: HotSpot stubs are not allowed to embed oops, thus exclude them in stubs
Bernhard Urban <bernhard.urban@jku.at>
parents:
14101
diff
changeset
|
80 * |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
81 * @param hub the hub of the object to be allocated |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
82 * @param length the length of the array |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
83 * @param intArrayHub the hub for {@code int[].class} |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
84 */ |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
85 @Snippet |
18401
e7ab82e7cc37
Move metaspace pointer handling to hotspot specific WordTypeRewriter.
Roland Schatz <roland.schatz@oracle.com>
parents:
18380
diff
changeset
|
86 private static Object newArray(KlassPointer hub, int length, @ConstantParameter KlassPointer intArrayHub, @ConstantParameter Register threadRegister) { |
18380
ed0fce2e999a
Fold klass._java_mirror._klass into klass and improve stamps from layout_helper
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
18370
diff
changeset
|
87 int layoutHelper = loadKlassLayoutHelperIntrinsic(hub); |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
88 int log2ElementSize = (layoutHelper >> layoutHelperLog2ElementSizeShift()) & layoutHelperLog2ElementSizeMask(); |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
89 int headerSize = (layoutHelper >> layoutHelperHeaderSizeShift()) & layoutHelperHeaderSizeMask(); |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
90 int elementKind = (layoutHelper >> layoutHelperElementTypeShift()) & layoutHelperElementTypeMask(); |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
91 int sizeInBytes = computeArrayAllocationSize(length, wordSize(), headerSize, log2ElementSize); |
9567
a8b4f26d8485
removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents:
9557
diff
changeset
|
92 if (logging()) { |
9671
0b3d19e4e2a2
used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents:
9618
diff
changeset
|
93 printf("newArray: element kind %d\n", elementKind); |
0b3d19e4e2a2
used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents:
9618
diff
changeset
|
94 printf("newArray: array length %d\n", length); |
0b3d19e4e2a2
used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents:
9618
diff
changeset
|
95 printf("newArray: array size %d\n", sizeInBytes); |
18401
e7ab82e7cc37
Move metaspace pointer handling to hotspot specific WordTypeRewriter.
Roland Schatz <roland.schatz@oracle.com>
parents:
18380
diff
changeset
|
96 printf("newArray: hub=%p\n", hub.asWord().rawValue()); |
9567
a8b4f26d8485
removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents:
9557
diff
changeset
|
97 } |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
98 |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
99 // check that array length is small enough for fast path. |
12793
af7fb87fc62e
pass thread register into all stubs instead of getting it from the host provider
Doug Simon <doug.simon@oracle.com>
parents:
12792
diff
changeset
|
100 Word thread = registerAsWord(threadRegister); |
15634
172484b8f800
don't deopt on large array allocations
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
15085
diff
changeset
|
101 if (length >= 0 && length <= MAX_ARRAY_FAST_PATH_ALLOCATION_LENGTH) { |
12793
af7fb87fc62e
pass thread register into all stubs instead of getting it from the host provider
Doug Simon <doug.simon@oracle.com>
parents:
12792
diff
changeset
|
102 Word memory = refillAllocate(thread, intArrayHub, sizeInBytes, logging()); |
7701
47467b2c3fc5
Use equal() and notEqual() instead of == and != to compare words
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7556
diff
changeset
|
103 if (memory.notEqual(0)) { |
9567
a8b4f26d8485
removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents:
9557
diff
changeset
|
104 if (logging()) { |
9671
0b3d19e4e2a2
used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents:
9618
diff
changeset
|
105 printf("newArray: allocated new array at %p\n", memory.rawValue()); |
9567
a8b4f26d8485
removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents:
9557
diff
changeset
|
106 } |
14766
390d72c7cc04
SnippetCounters: HotSpot stubs are not allowed to embed oops, thus exclude them in stubs
Bernhard Urban <bernhard.urban@jku.at>
parents:
14101
diff
changeset
|
107 return verifyObject(formatArray(hub, sizeInBytes, length, headerSize, memory, Word.unsigned(arrayPrototypeMarkWord()), true, false, false)); |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
108 } |
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
109 } |
9567
a8b4f26d8485
removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents:
9557
diff
changeset
|
110 if (logging()) { |
9671
0b3d19e4e2a2
used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents:
9618
diff
changeset
|
111 printf("newArray: calling new_array_c\n"); |
9567
a8b4f26d8485
removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents:
9557
diff
changeset
|
112 } |
9338
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9015
diff
changeset
|
113 |
12793
af7fb87fc62e
pass thread register into all stubs instead of getting it from the host provider
Doug Simon <doug.simon@oracle.com>
parents:
12792
diff
changeset
|
114 newArrayC(NEW_ARRAY_C, thread, hub, length); |
af7fb87fc62e
pass thread register into all stubs instead of getting it from the host provider
Doug Simon <doug.simon@oracle.com>
parents:
12792
diff
changeset
|
115 handlePendingException(thread, true); |
af7fb87fc62e
pass thread register into all stubs instead of getting it from the host provider
Doug Simon <doug.simon@oracle.com>
parents:
12792
diff
changeset
|
116 return verifyObject(getAndClearObjectResult(thread)); |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
117 } |
9351
4bf3af9abdfb
generalized support for C runtime calls
Doug Simon <doug.simon@oracle.com>
parents:
9340
diff
changeset
|
118 |
18401
e7ab82e7cc37
Move metaspace pointer handling to hotspot specific WordTypeRewriter.
Roland Schatz <roland.schatz@oracle.com>
parents:
18380
diff
changeset
|
119 public static final ForeignCallDescriptor NEW_ARRAY_C = newDescriptor(NewArrayStub.class, "newArrayC", void.class, Word.class, KlassPointer.class, int.class); |
9351
4bf3af9abdfb
generalized support for C runtime calls
Doug Simon <doug.simon@oracle.com>
parents:
9340
diff
changeset
|
120 |
9872
4391fd907278
use StubForeignCallNode within stubs, instead of ForeignCallNode
Lukas Stadler <lukas.stadler@jku.at>
parents:
9793
diff
changeset
|
121 @NodeIntrinsic(StubForeignCallNode.class) |
18401
e7ab82e7cc37
Move metaspace pointer handling to hotspot specific WordTypeRewriter.
Roland Schatz <roland.schatz@oracle.com>
parents:
18380
diff
changeset
|
122 public static native void newArrayC(@ConstantNodeParameter ForeignCallDescriptor newArrayC, Word thread, KlassPointer hub, int length); |
7147
88d626e2c2a8
added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
123 } |