[heap] Experiment: do not return uninitialized fixed arrays in factory.
Factory::NewUninitializedFixedArray is unsafe for GC. If performance allows, we should remove the function. Change-Id: I3f80352797e9768b788c2996c3f29e823c067f74 Reviewed-on: https://chromium-review.googlesource.com/517794 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#46166}
This commit is contained in:
parent
31b88650be
commit
29393cac16
@ -175,10 +175,12 @@ Handle<FixedArray> Factory::NewFixedArrayWithHoles(int size,
|
||||
}
|
||||
|
||||
Handle<FixedArray> Factory::NewUninitializedFixedArray(int size) {
|
||||
CALL_HEAP_FUNCTION(
|
||||
isolate(),
|
||||
isolate()->heap()->AllocateUninitializedFixedArray(size),
|
||||
FixedArray);
|
||||
// TODO(ulan): As an experiment this temporarily returns an initialized fixed
|
||||
// array. After getting canary/performance coverage, either remove the
|
||||
// function or revert to returning uninitilized array.
|
||||
CALL_HEAP_FUNCTION(isolate(),
|
||||
isolate()->heap()->AllocateFixedArray(size, NOT_TENURED),
|
||||
FixedArray);
|
||||
}
|
||||
|
||||
Handle<BoilerplateDescription> Factory::NewBoilerplateDescription(
|
||||
|
Loading…
Reference in New Issue
Block a user