annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/NewArrayStub.java @ 14101:2ec05c3f773b

fix overzeroing of new storage, refactor zeroing and unroll zeroing of small arrays
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Thu, 06 Mar 2014 18:41:42 -0800
parents 75a67ebd50e8
children 390d72c7cc04
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7147
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 /*
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
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
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
25 import static com.oracle.graal.hotspot.HotSpotGraalRuntime.*;
9513
659bb6cf930c rename: HotSpotSnippetUtils -> HotSpotReplacementsUtil
Doug Simon <doug.simon@oracle.com>
parents: 9418
diff changeset
26 import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.*;
8415
2361bf148c06 rename packages: *snippets* -> *replacements*
Doug Simon <doug.simon@oracle.com>
parents: 7868
diff changeset
27 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
28 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
29 import static com.oracle.graal.hotspot.stubs.StubUtil.*;
7147
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
30
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
31 import com.oracle.graal.api.code.*;
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
32 import com.oracle.graal.api.meta.*;
9671
0b3d19e4e2a2 used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents: 9618
diff changeset
33 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
34 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
35 import com.oracle.graal.hotspot.*;
7147
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
36 import com.oracle.graal.hotspot.meta.*;
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
37 import com.oracle.graal.hotspot.nodes.*;
8415
2361bf148c06 rename packages: *snippets* -> *replacements*
Doug Simon <doug.simon@oracle.com>
parents: 7868
diff changeset
38 import com.oracle.graal.hotspot.replacements.*;
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents: 12054
diff changeset
39 import com.oracle.graal.nodes.StructuredGraph.GuardsStage;
13505
75a67ebd50e8 Introduce a LoweringStage so that lowerings can be conditional on one of the three times that lowering is performed by default
Christian Wimmer <christian.wimmer@oracle.com>
parents: 13261
diff changeset
40 import com.oracle.graal.nodes.spi.*;
8415
2361bf148c06 rename packages: *snippets* -> *replacements*
Doug Simon <doug.simon@oracle.com>
parents: 7868
diff changeset
41 import com.oracle.graal.replacements.*;
9671
0b3d19e4e2a2 used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents: 9618
diff changeset
42 import com.oracle.graal.replacements.Snippet.ConstantParameter;
0b3d19e4e2a2 used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents: 9618
diff changeset
43 import com.oracle.graal.replacements.Snippet.Fold;
9015
92d2bedb5dfc Change of Snippet template and instantiation process
Christian Wimmer <christian.wimmer@oracle.com>
parents: 8637
diff changeset
44 import com.oracle.graal.replacements.SnippetTemplate.Arguments;
92d2bedb5dfc Change of Snippet template and instantiation process
Christian Wimmer <christian.wimmer@oracle.com>
parents: 8637
diff changeset
45 import com.oracle.graal.replacements.SnippetTemplate.SnippetInfo;
7300
2912b72d840a More complete and reusable Word type
Christian Wimmer <christian.wimmer@oracle.com>
parents: 7275
diff changeset
46 import com.oracle.graal.word.*;
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
9418
8d3a7fb9eb5f moved binding of parameter locations to runtime call descriptors from platform specific code to shared code for stubs that are now compiled stubs
Doug Simon <doug.simon@oracle.com>
parents: 9417
diff changeset
50 * called via {@link NewArrayStubCall} from the {@linkplain NewObjectSnippets inline} allocation
8d3a7fb9eb5f moved binding of parameter locations to runtime call descriptors from platform specific code to shared code for stubs that are now compiled stubs
Doug Simon <doug.simon@oracle.com>
parents: 9417
diff changeset
51 * code when TLAB allocation fails. If this stub fails to refill the TLAB or allocate the object, it
8d3a7fb9eb5f moved binding of parameter locations to runtime call descriptors from platform specific code to shared code for stubs that are now compiled stubs
Doug Simon <doug.simon@oracle.com>
parents: 9417
diff changeset
52 * calls out to the HotSpot C++ 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
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents: 12054
diff changeset
56 public NewArrayStub(HotSpotProviders providers, TargetDescription target, HotSpotForeignCallLinkage linkage) {
12054
bba234a1670e grouped provider values/parameters into a Providers object (GRAAL-511)
Doug Simon <doug.simon@oracle.com>
parents: 11732
diff changeset
57 super(providers, target, 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
9015
92d2bedb5dfc Change of Snippet template and instantiation process
Christian Wimmer <christian.wimmer@oracle.com>
parents: 8637
diff changeset
61 protected Arguments makeArguments(SnippetInfo stub) {
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);
9015
92d2bedb5dfc Change of Snippet template and instantiation process
Christian Wimmer <christian.wimmer@oracle.com>
parents: 8637
diff changeset
63
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
64 // RuntimeStub cannot (currently) support oops or metadata embedded in the code so we
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
65 // convert the hub (i.e., Klass*) for int[] to be a naked word. This should be safe since
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
66 // the int[] class will never be unloaded.
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
67 Constant intArrayHub = intArrayType.klass();
12431
7080a96be216 rename: graalRuntime -> runtime, getGraalRuntime -> getRuntime
Doug Simon <doug.simon@oracle.com>
parents: 12429
diff changeset
68 intArrayHub = Constant.forIntegerKind(runtime().getTarget().wordKind, intArrayHub.asLong(), null);
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
69
13505
75a67ebd50e8 Introduce a LoweringStage so that lowerings can be conditional on one of the three times that lowering is performed by default
Christian Wimmer <christian.wimmer@oracle.com>
parents: 13261
diff changeset
70 Arguments args = new Arguments(stub, GuardsStage.FLOATING_GUARDS, LoweringTool.StandardLoweringStage.HIGH_TIER);
9015
92d2bedb5dfc Change of Snippet template and instantiation process
Christian Wimmer <christian.wimmer@oracle.com>
parents: 8637
diff changeset
71 args.add("hub", null);
92d2bedb5dfc Change of Snippet template and instantiation process
Christian Wimmer <christian.wimmer@oracle.com>
parents: 8637
diff changeset
72 args.add("length", null);
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
73 args.addConst("intArrayHub", intArrayHub);
12792
be9c3426daad pass thread register into allocation stubs instead of getting it from the host provider
Doug Simon <doug.simon@oracle.com>
parents: 12431
diff changeset
74 args.addConst("threadRegister", providers.getRegisters().getThreadRegister());
9015
92d2bedb5dfc Change of Snippet template and instantiation process
Christian Wimmer <christian.wimmer@oracle.com>
parents: 8637
diff changeset
75 return args;
7147
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
76 }
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
77
9567
a8b4f26d8485 removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents: 9557
diff changeset
78 @Fold
a8b4f26d8485 removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents: 9557
diff changeset
79 private static boolean logging() {
a8b4f26d8485 removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents: 9557
diff changeset
80 return Boolean.getBoolean("graal.logNewArrayStub");
a8b4f26d8485 removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents: 9557
diff changeset
81 }
a8b4f26d8485 removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents: 9557
diff changeset
82
7147
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
83 /**
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7356
diff changeset
84 * 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
85 * -XX:-UseTLAB).
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7356
diff changeset
86 *
7147
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
87 * @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
88 * @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
89 * @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
90 */
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
91 @Snippet
12792
be9c3426daad pass thread register into allocation stubs instead of getting it from the host provider
Doug Simon <doug.simon@oracle.com>
parents: 12431
diff changeset
92 private static Object newArray(Word hub, int length, @ConstantParameter Word intArrayHub, @ConstantParameter Register threadRegister) {
13261
0ffe9e4bb364 don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents: 12793
diff changeset
93 int layoutHelper = hub.readInt(klassLayoutHelperOffset(), LocationIdentity.FINAL_LOCATION);
7147
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
94 int log2ElementSize = (layoutHelper >> layoutHelperLog2ElementSizeShift()) & layoutHelperLog2ElementSizeMask();
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
95 int headerSize = (layoutHelper >> layoutHelperHeaderSizeShift()) & layoutHelperHeaderSizeMask();
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
96 int elementKind = (layoutHelper >> layoutHelperElementTypeShift()) & layoutHelperElementTypeMask();
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
97 int sizeInBytes = computeArrayAllocationSize(length, wordSize(), headerSize, log2ElementSize);
9567
a8b4f26d8485 removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents: 9557
diff changeset
98 if (logging()) {
9671
0b3d19e4e2a2 used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents: 9618
diff changeset
99 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
100 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
101 printf("newArray: array size %d\n", sizeInBytes);
0b3d19e4e2a2 used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents: 9618
diff changeset
102 printf("newArray: hub=%p\n", hub.rawValue());
9567
a8b4f26d8485 removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents: 9557
diff changeset
103 }
7147
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
104
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
105 // 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
106 Word thread = registerAsWord(threadRegister);
7254
9e155cd2bb2f enable tlab stub for array allocation
Lukas Stadler <lukas.stadler@jku.at>
parents: 7253
diff changeset
107 if (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
108 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
109 if (memory.notEqual(0)) {
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: allocated new array at %p\n", memory.rawValue());
9567
a8b4f26d8485 removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents: 9557
diff changeset
112 }
14101
2ec05c3f773b fix overzeroing of new storage, refactor zeroing and unroll zeroing of small arrays
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 13505
diff changeset
113 return verifyObject(formatArray(hub, sizeInBytes, length, headerSize, memory, Word.unsigned(arrayPrototypeMarkWord()), true, false));
7147
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
114 }
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
115 }
9567
a8b4f26d8485 removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents: 9557
diff changeset
116 if (logging()) {
9671
0b3d19e4e2a2 used static import for methods in StubUtil
Doug Simon <doug.simon@oracle.com>
parents: 9618
diff changeset
117 printf("newArray: calling new_array_c\n");
9567
a8b4f26d8485 removed Stub.log(...) methods
Doug Simon <doug.simon@oracle.com>
parents: 9557
diff changeset
118 }
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
119
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
120 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
121 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
122 return verifyObject(getAndClearObjectResult(thread));
7147
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
123 }
9351
4bf3af9abdfb generalized support for C runtime calls
Doug Simon <doug.simon@oracle.com>
parents: 9340
diff changeset
124
9737
34c892fdfb6d moved responsibility for determining if a foreign call has a side effect to the runtime
Doug Simon <doug.simon@oracle.com>
parents: 9736
diff changeset
125 public static final ForeignCallDescriptor NEW_ARRAY_C = descriptorFor(NewArrayStub.class, "newArrayC");
9351
4bf3af9abdfb generalized support for C runtime calls
Doug Simon <doug.simon@oracle.com>
parents: 9340
diff changeset
126
9872
4391fd907278 use StubForeignCallNode within stubs, instead of ForeignCallNode
Lukas Stadler <lukas.stadler@jku.at>
parents: 9793
diff changeset
127 @NodeIntrinsic(StubForeignCallNode.class)
9735
2e4f035186cf rename: Descriptor -> ForeignCallDescriptor
Doug Simon <doug.simon@oracle.com>
parents: 9688
diff changeset
128 public static native void newArrayC(@ConstantNodeParameter ForeignCallDescriptor newArrayC, Word thread, Word hub, int length);
7147
88d626e2c2a8 added TLAB fast refill stub for array allocation
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
129 }