equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. |
3 * Copyright 2007, 2008 Red Hat, Inc. |
3 * Copyright 2007, 2008, 2010 Red Hat, Inc. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 * |
5 * |
6 * This code is free software; you can redistribute it and/or modify it |
6 * This code is free software; you can redistribute it and/or modify it |
7 * under the terms of the GNU General Public License version 2 only, as |
7 * under the terms of the GNU General Public License version 2 only, as |
8 * published by the Free Software Foundation. |
8 * published by the Free Software Foundation. |
138 ZeroStack *stack = thread->zero_stack(); |
138 ZeroStack *stack = thread->zero_stack(); |
139 |
139 |
140 int required_words = |
140 int required_words = |
141 (align_size_up(sizeof(ffi_cif), wordSize) >> LogBytesPerWord) + |
141 (align_size_up(sizeof(ffi_cif), wordSize) >> LogBytesPerWord) + |
142 (method->is_static() ? 2 : 1) + method->size_of_parameters() + 1; |
142 (method->is_static() ? 2 : 1) + method->size_of_parameters() + 1; |
143 if (required_words > stack->available_words()) { |
143 |
144 Unimplemented(); |
144 stack->overflow_check(required_words, CHECK_NULL); |
145 } |
|
146 |
145 |
147 intptr_t *buf = (intptr_t *) stack->alloc(required_words * wordSize); |
146 intptr_t *buf = (intptr_t *) stack->alloc(required_words * wordSize); |
148 SlowSignatureHandlerGenerator sshg(methodHandle(thread, method), buf); |
147 SlowSignatureHandlerGenerator sshg(methodHandle(thread, method), buf); |
149 sshg.generate(UCONST64(-1)); |
148 sshg.generate(UCONST64(-1)); |
150 |
149 |