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

Unified Diff: src/compiler/structured-machine-assembler.cc

Issue 505133003: Introduce subclass wrappers for STL containers that make them a lot easier (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/structured-machine-assembler.h ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/structured-machine-assembler.cc
diff --git a/src/compiler/structured-machine-assembler.cc b/src/compiler/structured-machine-assembler.cc
index abf44cd4c05a0a8ee8e8fce65fb06dec0a6057fa..56da5fb1af21a04fe8f15191a1b6d5772e22f69f 100644
--- a/src/compiler/structured-machine-assembler.cc
+++ b/src/compiler/structured-machine-assembler.cc
@@ -306,16 +306,14 @@ void StructuredMachineAssembler::AddBranch(Environment* environment,
StructuredMachineAssembler::Environment::Environment(Zone* zone,
BasicBlock* block,
bool is_dead)
- : block_(block),
- variables_(NodeVector::allocator_type(zone)),
- is_dead_(is_dead) {}
+ : block_(block), variables_(zone), is_dead_(is_dead) {}
StructuredMachineAssembler::IfBuilder::IfBuilder(
StructuredMachineAssembler* smasm)
: smasm_(smasm),
- if_clauses_(IfClauses::allocator_type(smasm_->zone())),
- pending_exit_merges_(EnvironmentVector::allocator_type(smasm_->zone())) {
+ if_clauses_(smasm_->zone()),
+ pending_exit_merges_(smasm_->zone()) {
DCHECK(smasm_->current_environment_ != NULL);
PushNewIfClause();
DCHECK(!IsDone());
@@ -394,9 +392,9 @@ StructuredMachineAssembler::IfBuilder::IfClause::IfClause(
Zone* zone, int initial_environment_size)
: unresolved_list_tail_(NULL),
initial_environment_size_(initial_environment_size),
- expression_states_(ExpressionStates::allocator_type(zone)),
- pending_then_merges_(PendingMergeStack::allocator_type(zone)),
- pending_else_merges_(PendingMergeStack::allocator_type(zone)),
+ expression_states_(zone),
+ pending_then_merges_(zone),
+ pending_else_merges_(zone),
then_environment_(NULL),
else_environment_(NULL) {
PushNewExpressionState();
@@ -439,8 +437,7 @@ void StructuredMachineAssembler::IfBuilder::IfClause::ResolvePendingMerges(
smasm->current_environment_ =
smasm->Copy(unresolved_list_tail_->environment_, truncate_at);
} else {
- EnvironmentVector environments(
- EnvironmentVector::allocator_type(smasm->zone()));
+ EnvironmentVector environments(smasm->zone());
environments.reserve(data.size_);
CopyEnvironments(data, &environments);
DCHECK(static_cast<int>(environments.size()) == data.size_);
@@ -610,8 +607,8 @@ StructuredMachineAssembler::LoopBuilder::LoopBuilder(
StructuredMachineAssembler* smasm)
: smasm_(smasm),
header_environment_(NULL),
- pending_header_merges_(EnvironmentVector::allocator_type(smasm_->zone())),
- pending_exit_merges_(EnvironmentVector::allocator_type(smasm_->zone())) {
+ pending_header_merges_(smasm_->zone()),
+ pending_exit_merges_(smasm_->zone()) {
DCHECK(smasm_->current_environment_ != NULL);
// Create header environment.
header_environment_ = smasm_->CopyForLoopHeader(smasm_->current_environment_);
« no previous file with comments | « src/compiler/structured-machine-assembler.h ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698