Mercurial > hg > graal-jvmci-8
diff src/share/vm/graal/graalCompiler.cpp @ 10409:36bcc10e01c0
merge fixes
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 19 Jun 2013 15:37:32 +0200 |
parents | a323a9e20f9d |
children | 4b88e5c93f04 |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompiler.cpp Wed Jun 19 10:45:56 2013 +0200 +++ b/src/share/vm/graal/graalCompiler.cpp Wed Jun 19 15:37:32 2013 +0200 @@ -136,7 +136,7 @@ } else { length = _deopted_leaf_graph_count; } - elements = new jlong[length]; + elements = NEW_C_HEAP_ARRAY(jlong, length, mtCompiler); for (int i = 0; i < length; i++) { elements[i] = _deopted_leaf_graphs[i]; } @@ -146,7 +146,7 @@ for (int i = 0; i < length; i++) { array->long_at_put(i, elements[i]); } - delete elements; + FREE_C_HEAP_ARRAY(jlong, elements, mtCompiler); return array; } @@ -171,7 +171,8 @@ ResourceMark rm; JavaThread::current()->set_is_compiling(true); Handle holder = GraalCompiler::createHotSpotResolvedObjectType(method, CHECK); - VMToCompiler::compileMethod(method(), holder, entry_bci, blocking, method->graal_priority()); + MethodCounters* mcs = method->method_counters(); + VMToCompiler::compileMethod(method(), holder, entry_bci, blocking, mcs->graal_priority()); JavaThread::current()->set_is_compiling(false); } @@ -223,7 +224,8 @@ // We have to lock the cpool to keep the oop from being resolved // while we are accessing it. But we must release the lock before // calling up into Java. - MonitorLockerEx ml(cp->lock()); + oop cplock = cp->lock(); + ObjectLocker ol(cplock, THREAD, cplock != NULL); constantTag tag = cp->tag_at(index); if (tag.is_klass()) { // The klass has been inserted into the constant pool