Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: src/hydrogen.cc

Issue 1018853004: Some CompilationInfo-related cleanup. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make ASAN happy. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler.cc ('k') | src/parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3464 matching lines...) Expand 10 before | Expand all | Expand 10 after
3475 DCHECK(!OptimizingCompilerThread::IsOptimizerThread(isolate())); 3475 DCHECK(!OptimizingCompilerThread::IsOptimizerThread(isolate()));
3476 for (int i = 0; i < blocks()->length(); ++i) { 3476 for (int i = 0; i < blocks()->length(); ++i) {
3477 for (HInstructionIterator it(blocks()->at(i)); !it.Done(); it.Advance()) { 3477 for (HInstructionIterator it(blocks()->at(i)); !it.Done(); it.Advance()) {
3478 it.Current()->FinalizeUniqueness(); 3478 it.Current()->FinalizeUniqueness();
3479 } 3479 }
3480 } 3480 }
3481 } 3481 }
3482 3482
3483 3483
3484 int HGraph::SourcePositionToScriptPosition(SourcePosition pos) { 3484 int HGraph::SourcePositionToScriptPosition(SourcePosition pos) {
3485 if (!FLAG_hydrogen_track_positions || pos.IsUnknown()) { 3485 return (info()->is_tracking_positions() && !pos.IsUnknown())
3486 return pos.raw(); 3486 ? info()->start_position_for(pos.inlining_id()) + pos.position()
3487 } 3487 : pos.raw();
3488
3489 return info()->inlined_function_infos()->at(pos.inlining_id())
3490 .start_position + pos.position();
3491 } 3488 }
3492 3489
3493 3490
3494 // Block ordering was implemented with two mutually recursive methods, 3491 // Block ordering was implemented with two mutually recursive methods,
3495 // HGraph::Postorder and HGraph::PostorderLoopBlocks. 3492 // HGraph::Postorder and HGraph::PostorderLoopBlocks.
3496 // The recursion could lead to stack overflow so the algorithm has been 3493 // The recursion could lead to stack overflow so the algorithm has been
3497 // implemented iteratively. 3494 // implemented iteratively.
3498 // At a high level the algorithm looks like this: 3495 // At a high level the algorithm looks like this:
3499 // 3496 //
3500 // Postorder(block, loop_header) : { 3497 // Postorder(block, loop_header) : {
(...skipping 9915 matching lines...) Expand 10 before | Expand all | Expand 10 after
13416 if (ShouldProduceTraceOutput()) { 13413 if (ShouldProduceTraceOutput()) {
13417 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13414 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13418 } 13415 }
13419 13416
13420 #ifdef DEBUG 13417 #ifdef DEBUG
13421 graph_->Verify(false); // No full verify. 13418 graph_->Verify(false); // No full verify.
13422 #endif 13419 #endif
13423 } 13420 }
13424 13421
13425 } } // namespace v8::internal 13422 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698