• Simon Zünd's avatar
    [torque] Add unsafe cast to Torque. · 9ef4df2f
    Simon Zünd authored
    This CL is a proposal to add "checked" casts (CAST in CSA) to the Torque language.
    The CL adds the "unsafe_cast<>" operator that emits a "CAST".
    
    Example:
    
    let n: Number = ...;
    ...
    if (TaggedIsSmi(n)) {
      let m: Smi = unsafe_cast<Smi>(n);
      ...
    }
    
    The cast wont incur a runtime overhead now.
    
    R=tebbi@chromium.org
    
    Change-Id: I9fca90d1d11e61617ba0270e5022fd66200e2195
    Reviewed-on: https://chromium-review.googlesource.com/1070151
    Commit-Queue: Simon Zünd <szuend@google.com>
    Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53416}
    9ef4df2f
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...