• Dan Elphick's avatar
    [CSA] Tnodify CodeAssembler::Parameter · 74a9b9c4
    Dan Elphick authored
    CodeAssembler::Parameter now takes a Type template parameter and
    performs a checked cast to it. There is also UncheckedParameter which
    returns a TNode but doesn't check the cast. The original Parameter
    method is still there as UntypedParameter.
    
    Parameter<T>(x) in many cases replaces CAST(Parameter(x)), where the
    cast is performed inside Parameter. Since Parameter is not a macro,
    this means it cannot see the original expression or its file name and
    line number. So the error messages are vaguely useful, Parameter<T>()
    takes a SourceLocation parameter which with a default value of
    SourceLocation::Current(), which at least gives us the file name and
    line number for the error message.
    
    Bug: v8:6949, v8:10933
    Change-Id: I27157bec7dc7462210c1eb9c430c0180217d25c1
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2435106Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
    Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
    Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
    Commit-Queue: Dan Elphick <delphick@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70264}
    74a9b9c4
builtins-sharedarraybuffer-gen.cc 31.2 KB