Commit 7221681b authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

[cleanup] Replace ZoneList with ZoneChunkList in regexp-macro-assembler

R=jgruber@chromium.org

Bug: v8:7754
Change-Id: Iec5f0a3f4f948a5f55c112324f4db68c69df2dbd
Reviewed-on: https://chromium-review.googlesource.com/1145061Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#54580}
parent c43380fe
......@@ -99,7 +99,7 @@ RegExpMacroAssemblerX64::RegExpMacroAssemblerX64(Isolate* isolate, Zone* zone,
: NativeRegExpMacroAssembler(isolate, zone),
masm_(isolate, nullptr, kRegExpCodeSize, CodeObjectRequired::kYes),
no_root_array_scope_(&masm_),
code_relative_fixup_positions_(4, zone),
code_relative_fixup_positions_(zone),
mode_(mode),
num_registers_(registers_to_save),
num_saved_registers_(registers_to_save),
......@@ -1304,8 +1304,7 @@ void RegExpMacroAssemblerX64::Push(Immediate value) {
void RegExpMacroAssemblerX64::FixupCodeRelativePositions() {
for (int i = 0, n = code_relative_fixup_positions_.length(); i < n; i++) {
int position = code_relative_fixup_positions_[i];
for (int position : code_relative_fixup_positions_) {
// The position succeeds a relative label offset from position.
// Patch the relative offset to be relative to the Code object pointer
// instead.
......@@ -1317,7 +1316,7 @@ void RegExpMacroAssemblerX64::FixupCodeRelativePositions() {
+ Code::kHeaderSize
- kHeapObjectTag);
}
code_relative_fixup_positions_.Clear();
code_relative_fixup_positions_.Rewind(0);
}
......
......@@ -8,6 +8,7 @@
#include "src/macro-assembler.h"
#include "src/regexp/regexp-macro-assembler.h"
#include "src/x64/assembler-x64.h"
#include "src/zone/zone-chunk-list.h"
namespace v8 {
namespace internal {
......@@ -215,7 +216,7 @@ class RegExpMacroAssemblerX64: public NativeRegExpMacroAssembler {
void BranchOrBacktrack(Condition condition, Label* to);
void MarkPositionForCodeRelativeFixup() {
code_relative_fixup_positions_.Add(masm_.pc_offset(), zone());
code_relative_fixup_positions_.push_back(masm_.pc_offset());
}
void FixupCodeRelativePositions();
......@@ -254,7 +255,7 @@ class RegExpMacroAssemblerX64: public NativeRegExpMacroAssembler {
MacroAssembler masm_;
NoRootArrayScope no_root_array_scope_;
ZoneList<int> code_relative_fixup_positions_;
ZoneChunkList<int> code_relative_fixup_positions_;
// Which mode to generate code for (LATIN1 or UC16).
Mode mode_;
......
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