comparison src/share/vm/oops/method.cpp @ 13731:9161ed8ce796

Add graal-specific option -XX:+GPUOffload to trigger all GPU offload functionality. Cleanup function to decide GPU offload. Exclude GPU sources from nongraal builds.
author S.Bharadwaj Yadavalli <bharadwaj.yadavalli@oracle.com>
date Wed, 22 Jan 2014 16:06:47 -0500
parents 7d815ba553e0
children 4062efea018b
comparison
equal deleted inserted replaced
13730:168976cae9ce 13731:9161ed8ce796
2023 guarantee(constMethod()->is_constMethod(), "should be ConstMethod*"); 2023 guarantee(constMethod()->is_constMethod(), "should be ConstMethod*");
2024 MethodData* md = method_data(); 2024 MethodData* md = method_data();
2025 guarantee(md == NULL || 2025 guarantee(md == NULL ||
2026 md->is_methodData(), "should be method data"); 2026 md->is_methodData(), "should be method data");
2027 } 2027 }
2028
2029 #ifdef GRAAL
2030
2031 // Return true if the name of the method indicates that this is a
2032 // lambda method other than <init>. Lambda method is one with a name
2033 // that starts with lambda$ and is synthetic.
2034
2035 bool Method::is_lambda() const {
2036 Symbol * klass_name = method_holder()->name();
2037 Symbol * method_name = name();
2038 ResourceMark rm;
2039 if (klass_name != NULL) {
2040 if (klass_name != NULL && method_name != NULL) {
2041 const char* lambdaPrefix = "lambda$main$";
2042 char* methodPrefix = strstr(method_name->as_C_string(), lambdaPrefix);
2043 if (methodPrefix != 0) {
2044 if ((strncmp(lambdaPrefix, methodPrefix, strlen(lambdaPrefix)) == 0) && is_synthetic()) {
2045 return true;
2046 }
2047 }
2048 }
2049 }
2050 return false;
2051 }
2052 #endif