• Daniel Clifford's avatar
    [torque]: Implement structs · 1062ffb9
    Daniel Clifford authored
    Struct are bundles of value types. They are essentially just shorthand
    for passing around a group of individually defined values.
    
    Struct types are declared like this:
    
      struct A {
        x: Smi;
        y: int32;
      }
    
    and can be constructed explicitly like this:
    
      A{0, 0}
    
    Structs can be used wherever other types are used (e.g. variables,
    parameters, return values) except for parameter/return types of
    builtins and runtime functions.
    
    Struct use field access notation to set/get their values like this:
    
      let a: A = A{0, 0};
      let b: Smi = a.x;
      a.y = 0;
    
    Change-Id: I9fd36a6514c37882831256a49a50809c5db75b56
    Reviewed-on: https://chromium-review.googlesource.com/1122133
    Commit-Queue: Daniel Clifford <danno@chromium.org>
    Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54501}
    1062ffb9
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...