OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2765 | 2765 |
2766 HBasicBlock* HGraph::CreateBasicBlock() { | 2766 HBasicBlock* HGraph::CreateBasicBlock() { |
2767 HBasicBlock* result = new(zone()) HBasicBlock(this); | 2767 HBasicBlock* result = new(zone()) HBasicBlock(this); |
2768 blocks_.Add(result, zone()); | 2768 blocks_.Add(result, zone()); |
2769 return result; | 2769 return result; |
2770 } | 2770 } |
2771 | 2771 |
2772 | 2772 |
2773 void HGraph::FinalizeUniqueness() { | 2773 void HGraph::FinalizeUniqueness() { |
2774 DisallowHeapAllocation no_gc; | 2774 DisallowHeapAllocation no_gc; |
2775 ASSERT(!isolate()->optimizing_compiler_thread()->IsOptimizerThread()); | 2775 ASSERT(!OptimizingCompilerThread::IsOptimizerThread(isolate())); |
2776 for (int i = 0; i < blocks()->length(); ++i) { | 2776 for (int i = 0; i < blocks()->length(); ++i) { |
2777 for (HInstructionIterator it(blocks()->at(i)); !it.Done(); it.Advance()) { | 2777 for (HInstructionIterator it(blocks()->at(i)); !it.Done(); it.Advance()) { |
2778 it.Current()->FinalizeUniqueness(); | 2778 it.Current()->FinalizeUniqueness(); |
2779 } | 2779 } |
2780 } | 2780 } |
2781 } | 2781 } |
2782 | 2782 |
2783 | 2783 |
2784 // Block ordering was implemented with two mutually recursive methods, | 2784 // Block ordering was implemented with two mutually recursive methods, |
2785 // HGraph::Postorder and HGraph::PostorderLoopBlocks. | 2785 // HGraph::Postorder and HGraph::PostorderLoopBlocks. |
(...skipping 7337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10123 } else { | 10123 } else { |
10124 CodeStub::Major major_key = info->code_stub()->MajorKey(); | 10124 CodeStub::Major major_key = info->code_stub()->MajorKey(); |
10125 PrintStringProperty("name", CodeStub::MajorName(major_key, false)); | 10125 PrintStringProperty("name", CodeStub::MajorName(major_key, false)); |
10126 PrintStringProperty("method", "stub"); | 10126 PrintStringProperty("method", "stub"); |
10127 } | 10127 } |
10128 PrintLongProperty("date", static_cast<int64_t>(OS::TimeCurrentMillis())); | 10128 PrintLongProperty("date", static_cast<int64_t>(OS::TimeCurrentMillis())); |
10129 } | 10129 } |
10130 | 10130 |
10131 | 10131 |
10132 void HTracer::TraceLithium(const char* name, LChunk* chunk) { | 10132 void HTracer::TraceLithium(const char* name, LChunk* chunk) { |
10133 ASSERT(!FLAG_concurrent_recompilation); | 10133 ASSERT(!chunk->isolate()->concurrent_recompilation_enabled()); |
10134 AllowHandleDereference allow_deref; | 10134 AllowHandleDereference allow_deref; |
10135 AllowDeferredHandleDereference allow_deferred_deref; | 10135 AllowDeferredHandleDereference allow_deferred_deref; |
10136 Trace(name, chunk->graph(), chunk); | 10136 Trace(name, chunk->graph(), chunk); |
10137 } | 10137 } |
10138 | 10138 |
10139 | 10139 |
10140 void HTracer::TraceHydrogen(const char* name, HGraph* graph) { | 10140 void HTracer::TraceHydrogen(const char* name, HGraph* graph) { |
10141 ASSERT(!FLAG_concurrent_recompilation); | 10141 ASSERT(!graph->isolate()->concurrent_recompilation_enabled()); |
10142 AllowHandleDereference allow_deref; | 10142 AllowHandleDereference allow_deref; |
10143 AllowDeferredHandleDereference allow_deferred_deref; | 10143 AllowDeferredHandleDereference allow_deferred_deref; |
10144 Trace(name, graph, NULL); | 10144 Trace(name, graph, NULL); |
10145 } | 10145 } |
10146 | 10146 |
10147 | 10147 |
10148 void HTracer::Trace(const char* name, HGraph* graph, LChunk* chunk) { | 10148 void HTracer::Trace(const char* name, HGraph* graph, LChunk* chunk) { |
10149 Tag tag(this, "cfg"); | 10149 Tag tag(this, "cfg"); |
10150 PrintStringProperty("name", name); | 10150 PrintStringProperty("name", name); |
10151 const ZoneList<HBasicBlock*>* blocks = graph->blocks(); | 10151 const ZoneList<HBasicBlock*>* blocks = graph->blocks(); |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10418 if (ShouldProduceTraceOutput()) { | 10418 if (ShouldProduceTraceOutput()) { |
10419 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 10419 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
10420 } | 10420 } |
10421 | 10421 |
10422 #ifdef DEBUG | 10422 #ifdef DEBUG |
10423 graph_->Verify(false); // No full verify. | 10423 graph_->Verify(false); // No full verify. |
10424 #endif | 10424 #endif |
10425 } | 10425 } |
10426 | 10426 |
10427 } } // namespace v8::internal | 10427 } } // namespace v8::internal |
OLD | NEW |