Mercurial > hg > graal-jvmci-8
comparison src/share/vm/ci/ciMethodHandle.cpp @ 2117:70427f06ea47
7010913: JSR 292 ciMethodHandle does not handle MethodHandleCompiler exceptions properly
Reviewed-by: kvn, never
author | twisti |
---|---|
date | Mon, 10 Jan 2011 03:58:07 -0800 |
parents | f95d63e2154a |
children | 4124a5a27707 |
comparison
equal
deleted
inserted
replaced
2116:d810e9a3fc33 | 2117:70427f06ea47 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2009, 2011, 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. |
36 // ciMethodHandle::get_adapter | 36 // ciMethodHandle::get_adapter |
37 // | 37 // |
38 // Return an adapter for this MethodHandle. | 38 // Return an adapter for this MethodHandle. |
39 ciMethod* ciMethodHandle::get_adapter(bool is_invokedynamic) const { | 39 ciMethod* ciMethodHandle::get_adapter(bool is_invokedynamic) const { |
40 VM_ENTRY_MARK; | 40 VM_ENTRY_MARK; |
41 | |
42 Handle h(get_oop()); | 41 Handle h(get_oop()); |
43 methodHandle callee(_callee->get_methodOop()); | 42 methodHandle callee(_callee->get_methodOop()); |
44 MethodHandleCompiler mhc(h, callee, is_invokedynamic, THREAD); | 43 // We catch all exceptions here that could happen in the method |
45 methodHandle m = mhc.compile(CHECK_NULL); | 44 // handle compiler and stop the VM. |
45 MethodHandleCompiler mhc(h, callee, is_invokedynamic, CATCH); | |
46 methodHandle m = mhc.compile(CATCH); | |
46 return CURRENT_ENV->get_object(m())->as_method(); | 47 return CURRENT_ENV->get_object(m())->as_method(); |
47 } | 48 } |
48 | 49 |
49 | 50 |
50 // ------------------------------------------------------------------ | 51 // ------------------------------------------------------------------ |