Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/sharedRuntime.cpp @ 1138:dd57230ba8fe
6893268: additional dynamic language related optimizations in C2
Summary: C2 needs some additional optimizations to be able to handle MethodHandle invokes and invokedynamic instructions at the best performance.
Reviewed-by: kvn, never
author | twisti |
---|---|
date | Tue, 05 Jan 2010 15:21:25 +0100 |
parents | e66fd840cb6b |
children | 4ce7240d622c |
comparison
equal
deleted
inserted
replaced
1137:97125851f396 | 1138:dd57230ba8fe |
---|---|
2143 // Return argument 0 register. In the LP64 build pointers | 2143 // Return argument 0 register. In the LP64 build pointers |
2144 // take 2 registers, but the VM wants only the 'main' name. | 2144 // take 2 registers, but the VM wants only the 'main' name. |
2145 return regs.first(); | 2145 return regs.first(); |
2146 } | 2146 } |
2147 | 2147 |
2148 VMRegPair *SharedRuntime::find_callee_arguments(symbolOop sig, bool is_static, int* arg_size) { | 2148 VMRegPair *SharedRuntime::find_callee_arguments(symbolOop sig, bool has_receiver, int* arg_size) { |
2149 // This method is returning a data structure allocating as a | 2149 // This method is returning a data structure allocating as a |
2150 // ResourceObject, so do not put any ResourceMarks in here. | 2150 // ResourceObject, so do not put any ResourceMarks in here. |
2151 char *s = sig->as_C_string(); | 2151 char *s = sig->as_C_string(); |
2152 int len = (int)strlen(s); | 2152 int len = (int)strlen(s); |
2153 *s++; len--; // Skip opening paren | 2153 *s++; len--; // Skip opening paren |
2155 while( *(--t) != ')' ) ; // Find close paren | 2155 while( *(--t) != ')' ) ; // Find close paren |
2156 | 2156 |
2157 BasicType *sig_bt = NEW_RESOURCE_ARRAY( BasicType, 256 ); | 2157 BasicType *sig_bt = NEW_RESOURCE_ARRAY( BasicType, 256 ); |
2158 VMRegPair *regs = NEW_RESOURCE_ARRAY( VMRegPair, 256 ); | 2158 VMRegPair *regs = NEW_RESOURCE_ARRAY( VMRegPair, 256 ); |
2159 int cnt = 0; | 2159 int cnt = 0; |
2160 if (!is_static) { | 2160 if (has_receiver) { |
2161 sig_bt[cnt++] = T_OBJECT; // Receiver is argument 0; not in signature | 2161 sig_bt[cnt++] = T_OBJECT; // Receiver is argument 0; not in signature |
2162 } | 2162 } |
2163 | 2163 |
2164 while( s < t ) { | 2164 while( s < t ) { |
2165 switch( *s++ ) { // Switch on signature character | 2165 switch( *s++ ) { // Switch on signature character |