[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/+/2661459 Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#72525}
This commit is contained in:
parent
527754fbae
commit
a9eff909e9
@ -55,7 +55,9 @@ Handle<TranslationArray> TranslationArrayBuilder::ToTranslationArray(
|
||||
Factory* factory) {
|
||||
Handle<TranslationArray> result =
|
||||
factory->NewByteArray(Size(), AllocationType::kOld);
|
||||
contents_.CopyTo(result->GetDataStartAddress());
|
||||
|
||||
memcpy(result->GetDataStartAddress(), contents_.data(),
|
||||
contents_.size() * sizeof(uint8_t));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "src/deoptimizer/translation-opcode.h"
|
||||
#include "src/objects/fixed-array.h"
|
||||
#include "src/wasm/value-type.h"
|
||||
#include "src/zone/zone-chunk-list.h"
|
||||
#include "src/zone/zone-containers.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
@ -103,7 +103,7 @@ class TranslationArrayBuilder {
|
||||
|
||||
Zone* zone() const { return zone_; }
|
||||
|
||||
ZoneChunkList<uint8_t> contents_;
|
||||
ZoneVector<uint8_t> contents_;
|
||||
Zone* const zone_;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user