Commit fbfd2557 authored by Mythri A's avatar Mythri A Committed by V8 LUCI CQ

Return early when initializing feedback cell for AsmWasm functions

AsmWasmFunctions don't allocate / use feedback vectors.

Bug: chromium:1206289
Change-Id: I970d5eaba6603809a844c2fc5753efba411cd719
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2909854
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74708}
parent 8bcc8247
......@@ -352,6 +352,14 @@ void JSFunction::InitializeFeedbackCell(
Handle<JSFunction> function, IsCompiledScope* is_compiled_scope,
bool reset_budget_for_feedback_allocation) {
Isolate* const isolate = function->GetIsolate();
#if V8_ENABLE_WEBASSEMBLY
// The following checks ensure that the feedback vectors are compatible with
// the feedback metadata. For Asm / Wasm functions we never allocate / use
// feedback vectors, so a mismatch between the metadata and feedback vector is
// harmless. The checks could fail for functions that has has_asm_wasm_broken
// set at runtime (for ex: failed instantiation).
if (function->shared().HasAsmWasmData()) return;
#endif // V8_ENABLE_WEBASSEMBLY
if (function->has_feedback_vector()) {
CHECK_EQ(function->feedback_vector().length(),
......
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