OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/hydrogen.h" | 5 #include "src/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 3457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3468 | 3468 |
3469 HBasicBlock* HGraph::CreateBasicBlock() { | 3469 HBasicBlock* HGraph::CreateBasicBlock() { |
3470 HBasicBlock* result = new(zone()) HBasicBlock(this); | 3470 HBasicBlock* result = new(zone()) HBasicBlock(this); |
3471 blocks_.Add(result, zone()); | 3471 blocks_.Add(result, zone()); |
3472 return result; | 3472 return result; |
3473 } | 3473 } |
3474 | 3474 |
3475 | 3475 |
3476 void HGraph::FinalizeUniqueness() { | 3476 void HGraph::FinalizeUniqueness() { |
3477 DisallowHeapAllocation no_gc; | 3477 DisallowHeapAllocation no_gc; |
3478 DCHECK(!OptimizingCompilerThread::IsOptimizerThread(isolate())); | |
3479 for (int i = 0; i < blocks()->length(); ++i) { | 3478 for (int i = 0; i < blocks()->length(); ++i) { |
3480 for (HInstructionIterator it(blocks()->at(i)); !it.Done(); it.Advance()) { | 3479 for (HInstructionIterator it(blocks()->at(i)); !it.Done(); it.Advance()) { |
3481 it.Current()->FinalizeUniqueness(); | 3480 it.Current()->FinalizeUniqueness(); |
3482 } | 3481 } |
3483 } | 3482 } |
3484 } | 3483 } |
3485 | 3484 |
3486 | 3485 |
3487 int HGraph::SourcePositionToScriptPosition(SourcePosition pos) { | 3486 int HGraph::SourcePositionToScriptPosition(SourcePosition pos) { |
3488 return (FLAG_hydrogen_track_positions && !pos.IsUnknown()) | 3487 return (FLAG_hydrogen_track_positions && !pos.IsUnknown()) |
(...skipping 9463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12952 if (ShouldProduceTraceOutput()) { | 12951 if (ShouldProduceTraceOutput()) { |
12953 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12952 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12954 } | 12953 } |
12955 | 12954 |
12956 #ifdef DEBUG | 12955 #ifdef DEBUG |
12957 graph_->Verify(false); // No full verify. | 12956 graph_->Verify(false); // No full verify. |
12958 #endif | 12957 #endif |
12959 } | 12958 } |
12960 | 12959 |
12961 } } // namespace v8::internal | 12960 } } // namespace v8::internal |
OLD | NEW |