Commit a9eff909 authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by Commit Bot

[compiler] Use vector to hold translation array

ZoneChunkList has more overhead than a simple ZoneVector for storing
uint8_t bytes.

Bug: v8:9684
Change-Id: I5e22286f2628ae2010086e9d82cadbebb176dbee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2661459Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72525}
parent 527754fb
...@@ -55,7 +55,9 @@ Handle<TranslationArray> TranslationArrayBuilder::ToTranslationArray( ...@@ -55,7 +55,9 @@ Handle<TranslationArray> TranslationArrayBuilder::ToTranslationArray(
Factory* factory) { Factory* factory) {
Handle<TranslationArray> result = Handle<TranslationArray> result =
factory->NewByteArray(Size(), AllocationType::kOld); factory->NewByteArray(Size(), AllocationType::kOld);
contents_.CopyTo(result->GetDataStartAddress());
memcpy(result->GetDataStartAddress(), contents_.data(),
contents_.size() * sizeof(uint8_t));
return result; return result;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "src/deoptimizer/translation-opcode.h" #include "src/deoptimizer/translation-opcode.h"
#include "src/objects/fixed-array.h" #include "src/objects/fixed-array.h"
#include "src/wasm/value-type.h" #include "src/wasm/value-type.h"
#include "src/zone/zone-chunk-list.h" #include "src/zone/zone-containers.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
...@@ -103,7 +103,7 @@ class TranslationArrayBuilder { ...@@ -103,7 +103,7 @@ class TranslationArrayBuilder {
Zone* zone() const { return zone_; } Zone* zone() const { return zone_; }
ZoneChunkList<uint8_t> contents_; ZoneVector<uint8_t> contents_;
Zone* const zone_; Zone* const zone_;
}; };
......
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