Mercurial > hg > graal-compiler
comparison src/share/vm/c1/c1_Runtime1.cpp @ 4970:33df1aeaebbf
Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 27 Feb 2012 13:10:13 +0100 |
parents | 9d48ccb39292 aa3d708d67c4 |
children | ab906cea36f7 |
comparison
equal
deleted
inserted
replaced
4703:2cfb7fb2dce7 | 4970:33df1aeaebbf |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 2012, 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. |
419 break; | 419 break; |
420 default: ; | 420 default: ; |
421 } | 421 } |
422 bci = branch_bci + offset; | 422 bci = branch_bci + offset; |
423 } | 423 } |
424 | 424 assert(!HAS_PENDING_EXCEPTION, "Should not have any exceptions pending"); |
425 osr_nm = CompilationPolicy::policy()->event(enclosing_method, method, branch_bci, bci, level, nm, THREAD); | 425 osr_nm = CompilationPolicy::policy()->event(enclosing_method, method, branch_bci, bci, level, nm, THREAD); |
426 assert(!HAS_PENDING_EXCEPTION, "Event handler should not throw any exceptions"); | |
426 return osr_nm; | 427 return osr_nm; |
427 } | 428 } |
428 | 429 |
429 JRT_BLOCK_ENTRY(address, Runtime1::counter_overflow(JavaThread* thread, int bci, methodOopDesc* method)) | 430 JRT_BLOCK_ENTRY(address, Runtime1::counter_overflow(JavaThread* thread, int bci, methodOopDesc* method)) |
430 nmethod* osr_nm; | 431 nmethod* osr_nm; |
601 } | 602 } |
602 | 603 |
603 | 604 |
604 JRT_ENTRY(void, Runtime1::throw_range_check_exception(JavaThread* thread, int index)) | 605 JRT_ENTRY(void, Runtime1::throw_range_check_exception(JavaThread* thread, int index)) |
605 NOT_PRODUCT(_throw_range_check_exception_count++;) | 606 NOT_PRODUCT(_throw_range_check_exception_count++;) |
606 Events::log("throw_range_check"); | |
607 char message[jintAsStringSize]; | 607 char message[jintAsStringSize]; |
608 sprintf(message, "%d", index); | 608 sprintf(message, "%d", index); |
609 SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), message); | 609 SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), message); |
610 JRT_END | 610 JRT_END |
611 | 611 |
612 | 612 |
613 JRT_ENTRY(void, Runtime1::throw_index_exception(JavaThread* thread, int index)) | 613 JRT_ENTRY(void, Runtime1::throw_index_exception(JavaThread* thread, int index)) |
614 NOT_PRODUCT(_throw_index_exception_count++;) | 614 NOT_PRODUCT(_throw_index_exception_count++;) |
615 Events::log("throw_index"); | |
616 char message[16]; | 615 char message[16]; |
617 sprintf(message, "%d", index); | 616 sprintf(message, "%d", index); |
618 SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_IndexOutOfBoundsException(), message); | 617 SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_IndexOutOfBoundsException(), message); |
619 JRT_END | 618 JRT_END |
620 | 619 |
899 methodHandle caller_method(THREAD, vfst.method()); | 898 methodHandle caller_method(THREAD, vfst.method()); |
900 // Note that caller_method->code() may not be same as caller_code because of OSR's | 899 // Note that caller_method->code() may not be same as caller_code because of OSR's |
901 // Note also that in the presence of inlining it is not guaranteed | 900 // Note also that in the presence of inlining it is not guaranteed |
902 // that caller_method() == caller_code->method() | 901 // that caller_method() == caller_code->method() |
903 | 902 |
904 | |
905 int bci = vfst.bci(); | 903 int bci = vfst.bci(); |
906 | |
907 Events::log("patch_code @ " INTPTR_FORMAT , caller_frame.pc()); | |
908 | |
909 Bytecodes::Code code = caller_method()->java_code_at(bci); | 904 Bytecodes::Code code = caller_method()->java_code_at(bci); |
910 | 905 |
911 #ifndef PRODUCT | 906 #ifndef PRODUCT |
912 // this is used by assertions in the access_field_patching_id | 907 // this is used by assertions in the access_field_patching_id |
913 BasicType patch_field_type = T_ILLEGAL; | 908 BasicType patch_field_type = T_ILLEGAL; |