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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 2142233003: Templatize AstVisitor with its subclass (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast/ast-numbering.h" 10 #include "src/ast/ast-numbering.h"
(...skipping 12115 matching lines...) Expand 10 before | Expand all | Expand 10 after
12126 DCHECK(!HasStackOverflow()); 12126 DCHECK(!HasStackOverflow());
12127 DCHECK(current_block() != NULL); 12127 DCHECK(current_block() != NULL);
12128 DCHECK(current_block()->HasPredecessor()); 12128 DCHECK(current_block()->HasPredecessor());
12129 return Bailout(kSuperReference); 12129 return Bailout(kSuperReference);
12130 } 12130 }
12131 12131
12132 12132
12133 void HOptimizedGraphBuilder::VisitDeclarations( 12133 void HOptimizedGraphBuilder::VisitDeclarations(
12134 ZoneList<Declaration*>* declarations) { 12134 ZoneList<Declaration*>* declarations) {
12135 DCHECK(globals_.is_empty()); 12135 DCHECK(globals_.is_empty());
12136 AstVisitor::VisitDeclarations(declarations); 12136 AstVisitor<HOptimizedGraphBuilder>::VisitDeclarations(declarations);
12137 if (!globals_.is_empty()) { 12137 if (!globals_.is_empty()) {
12138 Handle<FixedArray> array = 12138 Handle<FixedArray> array =
12139 isolate()->factory()->NewFixedArray(globals_.length(), TENURED); 12139 isolate()->factory()->NewFixedArray(globals_.length(), TENURED);
12140 for (int i = 0; i < globals_.length(); ++i) array->set(i, *globals_.at(i)); 12140 for (int i = 0; i < globals_.length(); ++i) array->set(i, *globals_.at(i));
12141 int flags = current_info()->GetDeclareGlobalsFlags(); 12141 int flags = current_info()->GetDeclareGlobalsFlags();
12142 Add<HDeclareGlobals>(array, flags); 12142 Add<HDeclareGlobals>(array, flags);
12143 globals_.Rewind(0); 12143 globals_.Rewind(0);
12144 } 12144 }
12145 } 12145 }
12146 12146
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
13430 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13430 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13431 } 13431 }
13432 13432
13433 #ifdef DEBUG 13433 #ifdef DEBUG
13434 graph_->Verify(false); // No full verify. 13434 graph_->Verify(false); // No full verify.
13435 #endif 13435 #endif
13436 } 13436 }
13437 13437
13438 } // namespace internal 13438 } // namespace internal
13439 } // namespace v8 13439 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698