@Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) { b.addPush(JavaKind.Int, new CEntryPointLeaveNode(LeaveAction.DetachThread)); return true; } });
@Override public void lower(CEntryPointLeaveNode node, LoweringTool tool) { Arguments args; switch (node.getLeaveAction()) { case Leave: args = new Arguments(returnFromJavaToC, node.graph().getGuardsStage(), tool.getLoweringStage()); break; case DetachThread: args = new Arguments(detachThread, node.graph().getGuardsStage(), tool.getLoweringStage()); break; case TearDownIsolate: args = new Arguments(tearDownIsolate, node.graph().getGuardsStage(), tool.getLoweringStage()); break; case ExceptionAbort: args = new Arguments(reportException, node.graph().getGuardsStage(), tool.getLoweringStage()); args.add("exception", node.getException()); break; default: throw shouldNotReachHere(); } template(node, args).instantiate(providers.getMetaAccess(), node, SnippetTemplate.DEFAULT_REPLACER, args); }
@Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) { b.addPush(JavaKind.Int, new CEntryPointLeaveNode(LeaveAction.Leave)); return true; } });
@Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) { b.addPush(JavaKind.Int, new CEntryPointLeaveNode(LeaveAction.TearDownIsolate)); return true; } });
kit.append(new CEntryPointLeaveNode(LeaveAction.Leave)); kit.createReturn(result, (result != null) ? result.getStackKind() : JavaKind.Void); assert graph.verify();
kit.createJavaCallWithExceptionAndUnwind(InvokeKind.Special, enumExceptionCtor.next(), enumException, enumExceptionMessage); assert !enumExceptionCtor.hasNext(); kit.append(new CEntryPointLeaveNode(LeaveAction.ExceptionAbort, enumException)); kit.append(new DeadEndNode()); kit.endIf();
kit.append(new CEntryPointLeaveNode(LeaveAction.Leave)); JavaKind returnKind = isSetter ? JavaKind.Void : fieldKind; kit.createReturn(returnValue, returnKind);
kit.append(new CEntryPointLeaveNode(LeaveAction.Leave)); kit.createReturn(returnValue, returnKind);
private void generateExceptionHandler(HostedProviders providers, SubstrateGraphKit kit, ExceptionObjectNode exception, JavaKind returnKind) { if (entryPointData.getExceptionHandler() == CEntryPoint.FatalExceptionHandler.class) { kit.append(new CEntryPointLeaveNode(LeaveAction.ExceptionAbort, exception)); kit.append(new DeadEndNode()); } else { kit.append(new CEntryPointLeaveNode(LeaveAction.ExceptionAbort, kit.exceptionObject())); kit.append(new DeadEndNode()); kit.endInvokeWithException();