Mercurial > hg > truffle
comparison src/share/vm/runtime/frame.cpp @ 18041:52b4284cb496
Merge with jdk8u20-b26
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 16:02:50 +0200 |
parents | 4ca6dc0799b6 78bbf4d43a14 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
17606:45d7b2c7029d | 18041:52b4284cb496 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2014, 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. |
59 # include "nativeInst_arm.hpp" | 59 # include "nativeInst_arm.hpp" |
60 #endif | 60 #endif |
61 #ifdef TARGET_ARCH_ppc | 61 #ifdef TARGET_ARCH_ppc |
62 # include "nativeInst_ppc.hpp" | 62 # include "nativeInst_ppc.hpp" |
63 #endif | 63 #endif |
64 | |
65 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC | |
64 | 66 |
65 RegisterMap::RegisterMap(JavaThread *thread, bool update_map) { | 67 RegisterMap::RegisterMap(JavaThread *thread, bool update_map) { |
66 _thread = thread; | 68 _thread = thread; |
67 _update_map = update_map; | 69 _update_map = update_map; |
68 clear(); | 70 clear(); |
529 | 531 |
530 jint frame::interpreter_frame_expression_stack_size() const { | 532 jint frame::interpreter_frame_expression_stack_size() const { |
531 // Number of elements on the interpreter expression stack | 533 // Number of elements on the interpreter expression stack |
532 // Callers should span by stackElementWords | 534 // Callers should span by stackElementWords |
533 int element_size = Interpreter::stackElementWords; | 535 int element_size = Interpreter::stackElementWords; |
536 size_t stack_size = 0; | |
534 if (frame::interpreter_frame_expression_stack_direction() < 0) { | 537 if (frame::interpreter_frame_expression_stack_direction() < 0) { |
535 return (interpreter_frame_expression_stack() - | 538 stack_size = (interpreter_frame_expression_stack() - |
536 interpreter_frame_tos_address() + 1)/element_size; | 539 interpreter_frame_tos_address() + 1)/element_size; |
537 } else { | 540 } else { |
538 return (interpreter_frame_tos_address() - | 541 stack_size = (interpreter_frame_tos_address() - |
539 interpreter_frame_expression_stack() + 1)/element_size; | 542 interpreter_frame_expression_stack() + 1)/element_size; |
540 } | 543 } |
544 assert( stack_size <= (size_t)max_jint, "stack size too big"); | |
545 return ((jint)stack_size); | |
541 } | 546 } |
542 | 547 |
543 | 548 |
544 // (frame::interpreter_frame_sender_sp accessor is in frame_<arch>.cpp) | 549 // (frame::interpreter_frame_sender_sp accessor is in frame_<arch>.cpp) |
545 | 550 |
931 // To minimze the overhead of doing that here, we ask the GC to pass down a | 936 // To minimze the overhead of doing that here, we ask the GC to pass down a |
932 // closure that knows how to keep klasses alive given a ClassLoaderData. | 937 // closure that knows how to keep klasses alive given a ClassLoaderData. |
933 cld_f->do_cld(m->method_holder()->class_loader_data()); | 938 cld_f->do_cld(m->method_holder()->class_loader_data()); |
934 } | 939 } |
935 | 940 |
936 #if !defined(PPC) || defined(ZERO) | 941 if (m->is_native() PPC32_ONLY(&& m->is_static())) { |
937 if (m->is_native()) { | 942 f->do_oop(interpreter_frame_temp_oop_addr()); |
938 #ifdef CC_INTERP | 943 } |
939 interpreterState istate = get_interpreterState(); | |
940 f->do_oop((oop*)&istate->_oop_temp); | |
941 #else | |
942 f->do_oop((oop*)( fp() + interpreter_frame_oop_temp_offset )); | |
943 #endif /* CC_INTERP */ | |
944 } | |
945 #else // PPC | |
946 if (m->is_native() && m->is_static()) { | |
947 f->do_oop(interpreter_frame_mirror_addr()); | |
948 } | |
949 #endif // PPC | |
950 | 944 |
951 int max_locals = m->is_native() ? m->size_of_parameters() : m->max_locals(); | 945 int max_locals = m->is_native() ? m->size_of_parameters() : m->max_locals(); |
952 | 946 |
953 Symbol* signature = NULL; | 947 Symbol* signature = NULL; |
954 bool has_receiver = false; | 948 bool has_receiver = false; |