Commit 3ed1f280 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[csa] Switch {VariableList} to be a std::vector.

R=cbruni@chromium.org
BUG=v8:7109

Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I076b5b7760a454680de0e4247eb625a964905652
Reviewed-on: https://chromium-review.googlesource.com/796431Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49760}
parent 1228c556
......@@ -6,7 +6,6 @@
#include "src/builtins/builtins.h"
#include "src/code-stub-assembler.h"
#include "src/frame-constants.h"
#include "src/zone/zone-list-inl.h" // TODO(mstarzinger): Temporary cycle breaker.
namespace v8 {
namespace internal {
......
......@@ -8,7 +8,6 @@
#include "src/builtins/builtins-utils-gen.h"
#include "src/code-stub-assembler.h"
#include "src/zone/zone-list-inl.h" // TODO(mstarzinger): Temporary cycle breaker.
namespace v8 {
namespace internal {
......
......@@ -8,7 +8,6 @@
#include "src/builtins/builtins.h"
#include "src/code-factory.h"
#include "src/code-stub-assembler.h"
#include "src/zone/zone-list-inl.h" // TODO(mstarzinger): Temporary cycle breaker.
namespace v8 {
namespace internal {
......
......@@ -8029,8 +8029,8 @@ Node* CodeStubAssembler::BuildFastLoop(
? MachineType::PointerRepresentation()
: MachineRepresentation::kTaggedSigned;
VARIABLE(var, index_rep, start_index);
VariableList vars_copy(vars, zone());
vars_copy.Add(&var, zone());
VariableList vars_copy(vars.begin(), vars.end(), zone());
vars_copy.push_back(&var);
Label loop(this, vars_copy);
Label after_loop(this);
// Introduce an explicit second check of the termination condition before the
......@@ -8291,7 +8291,7 @@ Node* CodeStubAssembler::RelationalComparison(Operation op, Node* lhs,
// Initialize the type feedback to None. The current feedback is combined
// with the previous feedback.
var_type_feedback->Bind(SmiConstant(CompareOperationFeedback::kNone));
loop_variable_list.Add(var_type_feedback, zone());
loop_variable_list.push_back(var_type_feedback);
}
Label loop(this, loop_variable_list);
Goto(&loop);
......@@ -8850,7 +8850,7 @@ Node* CodeStubAssembler::Equal(Node* left, Node* right, Node* context,
// Initialize the type feedback to None. The current feedback is combined
// with the previous feedback.
var_type_feedback->Bind(SmiConstant(CompareOperationFeedback::kNone));
loop_variable_list.Add(var_type_feedback, zone());
loop_variable_list.push_back(var_type_feedback);
}
Label loop(this, loop_variable_list);
Goto(&loop);
......
......@@ -252,7 +252,7 @@ class Node;
class RawMachineAssembler;
class RawMachineLabel;
typedef ZoneList<CodeAssemblerVariable*> CodeAssemblerVariableList;
typedef ZoneVector<CodeAssemblerVariable*> CodeAssemblerVariableList;
typedef std::function<void()> CodeAssemblerCallback;
......@@ -1157,7 +1157,7 @@ class CodeAssemblerLabel {
CodeAssembler* assembler,
const CodeAssemblerVariableList& merged_variables,
CodeAssemblerLabel::Type type = CodeAssemblerLabel::kNonDeferred)
: CodeAssemblerLabel(assembler, merged_variables.length(),
: CodeAssemblerLabel(assembler, merged_variables.size(),
&(merged_variables[0]), type) {}
CodeAssemblerLabel(
CodeAssembler* assembler, size_t count,
......
......@@ -41,6 +41,11 @@ class ZoneVector : public std::vector<T, ZoneAllocator<T>> {
ZoneVector(size_t size, T def, Zone* zone)
: std::vector<T, ZoneAllocator<T>>(size, def, ZoneAllocator<T>(zone)) {}
// Constructs a new vector and fills it with the contents of the given
// initializer list.
ZoneVector(std::initializer_list<T> list, Zone* zone)
: std::vector<T, ZoneAllocator<T>>(list, ZoneAllocator<T>(zone)) {}
// Constructs a new vector and fills it with the contents of the range
// [first, last).
template <class InputIt>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment