Mercurial > hg > truffle
comparison src/share/vm/graal/graalCompiler.cpp @ 5616:310ed6650682
added check to ensure fast path allocation is never used for types that don't allow it
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 15 Jun 2012 12:04:26 +0200 |
parents | 70f715dfbb41 |
children | 6cb39a47da14 |
comparison
equal
deleted
inserted
replaced
5615:ff7961661b96 | 5616:310ed6650682 |
---|---|
276 HotSpotResolvedJavaType::set_isInstanceClass(obj, klass->oop_is_instance()); | 276 HotSpotResolvedJavaType::set_isInstanceClass(obj, klass->oop_is_instance()); |
277 | 277 |
278 if (klass->oop_is_javaArray()) { | 278 if (klass->oop_is_javaArray()) { |
279 HotSpotResolvedJavaType::set_isArrayClass(obj, true); | 279 HotSpotResolvedJavaType::set_isArrayClass(obj, true); |
280 } else { | 280 } else { |
281 int size = instanceKlass::cast(klass())->size_helper() * HeapWordSize; | |
282 if (!instanceKlass::cast(klass())->can_be_fastpath_allocated()) { | |
283 size = -size; | |
284 } | |
281 HotSpotResolvedJavaType::set_isArrayClass(obj, false); | 285 HotSpotResolvedJavaType::set_isArrayClass(obj, false); |
282 HotSpotResolvedJavaType::set_instanceSize(obj, instanceKlass::cast(klass())->size_helper() * HeapWordSize); | 286 HotSpotResolvedJavaType::set_instanceSize(obj, size); |
283 HotSpotResolvedJavaType::set_hasFinalizer(obj, klass->has_finalizer()); | 287 HotSpotResolvedJavaType::set_hasFinalizer(obj, klass->has_finalizer()); |
284 } | 288 } |
285 | 289 |
286 // TODO replace these with correct values | 290 // TODO replace these with correct values |
287 HotSpotResolvedJavaType::set_hasFinalizableSubclass(obj, false); | 291 HotSpotResolvedJavaType::set_hasFinalizableSubclass(obj, false); |