Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index bf64f6665c79d4c7274a8d016e7ec2116cd617fa..94e155422ae828c08cfe31e36166755d4c1f0fde 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -556,7 +556,24 @@ Handle<Code> Pipeline::GenerateCode(Linkage* linkage, PipelineData* data) { |
return Handle<Code>::null(); |
} |
ZonePool::Scope zone_scope(data->zone_pool()); |
- RegisterAllocator allocator(zone_scope.zone(), &frame, info(), &sequence); |
+ |
+ const char* debug_name = NULL; |
+#ifdef DEBUG |
+ SmartArrayPointer<char> debug_name_chars; |
+ if (info()->IsStub()) { |
+ if (info()->code_stub() != NULL) { |
+ CodeStub::Major major_key = info()->code_stub()->MajorKey(); |
+ debug_name = CodeStub::MajorName(major_key, false); |
+ } |
+ } else { |
+ AllowHandleDereference allow_deref; |
+ debug_name_chars = info()->function()->debug_name()->ToCString(); |
+ debug_name = debug_name_chars.get(); |
+ } |
+#endif |
Jarin
2014/10/29 12:16:51
Could you extract the code above to a function and
|
+ |
+ RegisterAllocator allocator(zone_scope.zone(), &frame, &sequence, |
+ debug_name); |
if (!allocator.Allocate(data->pipeline_statistics())) { |
info()->AbortOptimization(kNotEnoughVirtualRegistersRegalloc); |
return Handle<Code>::null(); |