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

Side by Side Diff: src/compiler/code-assembler.cc

Issue 2641863002: [csa] Fix the bound & used condition check for RawMachineLabel and CodeAssemblerLabel. (Closed)
Patch Set: Created 3 years, 11 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/code-assembler.h ('k') | src/compiler/raw-machine-assembler.cc » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/compiler/code-assembler.h" 5 #include "src/compiler/code-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 label_(nullptr) { 712 label_(nullptr) {
713 void* buffer = assembler->zone()->New(sizeof(RawMachineLabel)); 713 void* buffer = assembler->zone()->New(sizeof(RawMachineLabel));
714 label_ = new (buffer) 714 label_ = new (buffer)
715 RawMachineLabel(type == kDeferred ? RawMachineLabel::kDeferred 715 RawMachineLabel(type == kDeferred ? RawMachineLabel::kDeferred
716 : RawMachineLabel::kNonDeferred); 716 : RawMachineLabel::kNonDeferred);
717 for (size_t i = 0; i < vars_count; ++i) { 717 for (size_t i = 0; i < vars_count; ++i) {
718 variable_phis_[vars[i]->impl_] = nullptr; 718 variable_phis_[vars[i]->impl_] = nullptr;
719 } 719 }
720 } 720 }
721 721
722 CodeAssemblerLabel::~CodeAssemblerLabel() { label_->~RawMachineLabel(); }
723
722 void CodeAssemblerLabel::MergeVariables() { 724 void CodeAssemblerLabel::MergeVariables() {
723 ++merge_count_; 725 ++merge_count_;
724 for (auto var : state_->variables_) { 726 for (auto var : state_->variables_) {
725 size_t count = 0; 727 size_t count = 0;
726 Node* node = var->value_; 728 Node* node = var->value_;
727 if (node != nullptr) { 729 if (node != nullptr) {
728 auto i = variable_merges_.find(var); 730 auto i = variable_merges_.find(var);
729 if (i != variable_merges_.end()) { 731 if (i != variable_merges_.end()) {
730 i->second.push_back(node); 732 i->second.push_back(node);
731 count = i->second.size(); 733 count = i->second.size();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 } 820 }
819 } 821 }
820 } 822 }
821 823
822 bound_ = true; 824 bound_ = true;
823 } 825 }
824 826
825 } // namespace compiler 827 } // namespace compiler
826 } // namespace internal 828 } // namespace internal
827 } // namespace v8 829 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-assembler.h ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698