- 31 Jan, 2022 1 commit
-
-
Manos Koukoutos authored
Since inheritance depth of every type is known in the isorecursive hybrid type system, rtts with depth are removed. This enables simplification of type checks in Liftoff and Turbofan, as well as decoding of object allocation instructions. Bug: v8:7748 Change-Id: I6b52579b584191d92644de1c6e805d9f054641d3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3422626Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#78860}
-
- 27 Jan, 2022 2 commits
-
-
Manos Koukoutos authored
This CL replaces the equirecursive type system for wasm-gc with the isorecursive hybrid type system presented here: https://github.com/WebAssembly/gc/issues/257. In broad strokes, this includes the following changes: - In the module decoder, remove equirecursive types. Implement recursive type groups, subtype definitions, and function/struct/array definitions. Treat nominal modules as syntactic sugar of an isorecursive module, where all types belong in the same recursive group. - Remove rtt.sub and all related infrastructure. - Change subtyping to work with explicit supertypes only. - Add ValidSubtypeDefinition in subtyping, to check that subtype declarations are valid during decoding. - Remove the subtyping cache. - Add support for functions to have specific signature index in WasmModuleBuilder and in test-gc.cc. - Adapt tests. Current restrictions: - Recursive groups are not stored beyond decoding. - Type canonicalization is not implemented. No tests relying on types being considered identical post-canonicalization. - No cross-module subtyping is possible. Tests relying on cross-module subtyping have been commented out. Bug: v8:7748 Change-Id: I69fd04ecc5611f6230c95d5c89d1c520163fffae Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3416239Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#78816}
-
Manos Koukoutos authored
Changes: - Introduce {TypeDefinition} for wasm modules. - Introduce an enum {TypeDefinition::Kind} to represent the three different definition types. - Collapse the {types}, {type_kinds} and {supertypes} vectors into a single vector of {TypeDefinition}s. - Use {TypeDefinition} in WasmModuleBuilder. - Drive-by: Remove {kNullIndex} in WasmModuleBuilder. - Drive-by: Tidy-up wasm-module.h. Change-Id: I97c2c268bcad745176243c693cf169bfa5714f94 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3416233Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#78813}
-
- 13 Dec, 2021 1 commit
-
-
Manos Koukoutos authored
Since the reftypes proposal has shipped, we remove the respective flag and the code that handled its absence. We maintain a WasmFeature for reftypes for feature detection purposes. We remove the flag declaration from tests, and adapt some tests that make no sense without the flag. Bug: v8:7581 Change-Id: Icf2f8d0feae8f30ec68d5560f1e7ee5959481483 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3329781Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#78351}
-
- 05 Nov, 2021 1 commit
-
-
Manos Koukoutos authored
We enable struct.new and array.init initializer expressions in the JS testcase generated by --wasm-fuzzer-gen-test. We needed to make some changes in the WasmInitExpr class, and to implement a new interface for the WasmFullDecoder, which constructs a WasmInitExpr. Changes: - Make WasmInitExpr a ZoneObject. Use a pointer for its operands_ field. This is needed so WasmInitExpr is trivially copiable, and thus usable as a Value type in WasmFullDecoder. - Implement a WasmFullDecoder interface in wasm-fuzzer-common that constructs a WasmInitExpr. Use it to decode initializers in the module generated by the fuzzer. - Change AppendInitExpr to take a WasmInitExpr as argument. - Fix an issue with printing of struct definitions. - Change initializer expression used for structs to struct.new_with_rtt. This is consistent with the currently used structural types. Bug: v8:11954 Change-Id: I65a87cc98701a54f32500be192b3b6eef2ff6c8c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3257712Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#77730}
-
- 28 Sep, 2021 1 commit
-
-
Maria Tîmbur authored
Because there can be fewer function signatures than there are functions a new ForceAddSignature function was added which does not deduplicate. Bug: v8:11954 Change-Id: Ib028de47962dd1e797ead1b1f05a4e6815029487 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3186431 Commit-Queue: Maria Tîmbur <mtimbur@google.com> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#77126}
-
- 24 Sep, 2021 1 commit
-
-
Andreas Haas authored
NameSectionKindCode::kFunction got shadowed by WasmCompilationResult::Kind::kFunction. NameSectionKindCode is not used often, so this CL just adds "Code" to all fields of this enum. R=clemensb@chromium.org Bug: v8:12244 Change-Id: I87155a43084b868f6c118ddc2e44cb9c35b4249b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181535Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#77049}
-
- 20 Sep, 2021 1 commit
-
-
Manos Koukoutos authored
Bug: v8:7748 Change-Id: I5b6d8bf0b6dbf88c4762f4d61fb468c3e2898201 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3168621Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#76927}
-
- 15 Sep, 2021 1 commit
-
-
Jakob Kummerow authored
Per https://github.com/WebAssembly/gc/issues/234, this implements "nominal" type definitions with explicit supertypes, and statically typed RTT-less instructions for allocation and testing/casting. This should be fully backwards compatible with existing Wasm modules. Spec: https://bit.ly/3cWcm6Q ("version 4") Bug: v8:7748 Change-Id: Id5a1399b368fdfad22036cfd66f1bef593e640f7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3144916 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#76844}
-
- 31 Aug, 2021 1 commit
-
-
Manos Koukoutos authored
WasmModuleBuilder is a class that is used to build Wasm modules in the asm.js parser, in the fuzzer, as well as some tests. When it comes to Wasm tables, WasmModuleBuilder currently supports only basic tables (before the reftypes proposal) using an ad-hoc indirect-function index vector. This CL adds proper support for element sections and tables that use them in the full potential of the reftypes extension. The new functionality will only be used in the fuzzer and potentially some tests in the future. Along this, we drop some functionality from WasmModuleBuilder that was only used in tests and is redundant with the new architecture. Additionally, we remove tables other than externref and funcref from the fuzzer (which were not supported properly or used anyway). We will reintroduce them at a later time. Bug: v8:11954 Change-Id: I0a4f6e7b63b6e3d9f7da03b5202fbf14d8678332 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3122162 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#76597}
-
- 27 Aug, 2021 1 commit
-
-
Manos Koukoutos authored
WriteInitializerExpressions did not emit the final 'end' opcode, and expected call sites to do so, which they did not do consistently. We move this functionality to WriteInitializerExpression. Change-Id: Idf42272a3dbdfd0d7f22675731e193584f75c41f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3122159 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#76532}
-
- 29 Jul, 2021 1 commit
-
-
Thibaud Michaud authored
The JS API constructor was renamed to "WebAssembly.Tag" to match the spec: https://github.com/WebAssembly/exception-handling/issues/159 Rename "exception" to "tag" throughout the codebase for consistency with the JS API, and to match the spec terminology (e.g. "tag section"). R=clemensb@chromium.org,nicohartmann@chromium.org Bug: v8:11992 Change-Id: I63f9f3101abfeefd49117461bd59c594ca5dab70 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3053583Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#75994}
-
- 07 Jul, 2021 1 commit
-
-
Manos Koukoutos authored
Changes: - Add reference types and simd to GetValueType(). - Generalize BlockScope to handle reference types. Add EmitValueType() to WasmFunctionBuilder. - Constrain local_op and global_op to non-simd numeric types. - Add GenerateOneOf() for functions that need a heap type. Add GenerateOptRef(). Add ref_null, get_local_opt_ref as options for GenerateOptRef(). - Remove the numeric conversion logic from ConsumeAndGenerate. Bug: v8:11954 Change-Id: Idebae4a537326bdc03ac2f5e9c69a519f196938c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3009456 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#75614}
-
- 18 Jun, 2021 1 commit
-
-
Dan Elphick authored
The adding of base:: was mostly prepared using git grep and sed: git grep -l <pattern> | grep -v base/vector.h | \ xargs sed -i 's/\b<pattern>\b/base::<pattern>/ with lots of manual clean-ups due to the resulting v8::internal::base::Vectors. #includes were fixed using: git grep -l "src/utils/vector.h" | \ axargs sed -i 's!src/utils/vector.h!src/base/vector.h!' Bug: v8:11879 Change-Id: I3e6d622987fee4478089c40539724c19735bd625 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968412Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#75243}
-
- 14 Jun, 2021 1 commit
-
-
Manos Koukoutos authored
Bug: v8:7748 Change-Id: I3fa510b4dc35d3f58532ecbbeecd79d2826ff667 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2951722 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#75115}
-
- 09 Jun, 2021 1 commit
-
-
Manos Koukoutos authored
- Add support for packed types. - Emit arguments first in wasm-module-builder.cc. Bug: v8:7748 Change-Id: I358ca13db4332e026ee5850de6f629822bc92b04 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2948887Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/master@{#75061}
-
- 08 Jun, 2021 1 commit
-
-
Manos Koukoutos authored
Changes: - Add struct.new_with_rtt as a new WasmInitExpr. Parse it in consume_init_expr(). Add it to InstanceBuilder::EvaluateInitExpression(). - Change WasmInitExpr::operand_ to vector operands_. - In consume_init_expr(), use parsed over hard-coded opcode length. - Improve WasmStruct::WasmStructPrint slightly. - Add Factory::NewWasmStruct(). - Add WasmValue::CopyToWithSystemEndianness. - In wasm-module-builder.js, generalize emit_init_expr for expressions with operands. Add missing init. expression types. - Add tests. Bug: v8:7748 Change-Id: Ica12378d202730aff1b57c7d4240aa00ef124f8e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2940893 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#75006}
-
- 02 Jun, 2021 1 commit
-
-
Jakob Kummerow authored
This instruction is a non-standard V8-only experiment for now, hidden behind the --experimental-wasm-gc-experiments flag. The motivation is to provide a way to set up non-canonicalized RTT hierarchies, to enable expressing the type system of Java-like languages in terms of WasmGC constructs. Bug: v8:7748 Change-Id: Idf1c18e9944c983f40f1e01b2032ee5fdc2fd81b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2930478Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#74920}
-
- 05 May, 2021 1 commit
-
-
Manos Koukoutos authored
Main changes: - Allow global.get in elements segments with expressions-as-elements. - Allow element segments with types other than funcref. Detailed changes: - Move WasmInitExpr to its own file. Add stream opearator << support. - Simplify type of PrintCollection. - Make WasmElemSegment use an array of WasmInitExpr's over the previous ad-hoc implementation. Move null_index to WasmModuleBuilder. - Refactor consume_element_segment_header. Make it return a WasmElemSegment. - Refactor consume_element_expr. Make it return a WasmInitExpr. - Refactor DecodeElementSection. Make it invoke consume_element_segment_header, then populate its element array. - Update module-instantiate.cc to handle global.get elements. - Fix bug in wasm-objects.cc where the wrong type index was passed into module()->has_signature() - Adapt and add tests. Change-Id: I5abfbe424dbb750ee2dca59f91c451ffcb79f95f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2857959 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#74374}
-
- 22 Mar, 2021 1 commit
-
-
Manos Koukoutos authored
This is a more canonical type name, and is in line with {kVoidCode}. Change-Id: Iaae9524b6fb6ecaafd63ce81cf30e3d01ca3e525 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2775565 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/master@{#73557}
-
- 05 Mar, 2021 1 commit
-
-
Manos Koukoutos authored
This adds the possibility to define non-nullable function tables of heap types kFunc and user-defined functions. When such table is defined, it is obligatory to provide an initializer expression after its limits. Currently, this can only be a function reference. Changes: - Change WasmTableObject::raw_type to encode the whole entry type. - Restructure call_indirect to load the signature only if needed, and do null checks only if needed. - Add the requirement to provide an initializer expression for non-nullable tables in module-decoder. - Rename "global initializer" -> "initializer expression" everywhere. - Add table initialization in module-instantiate. - Edit both the C++ and JS WasmModuleBuilder. - Add and slightly improve tests. - Format wasm-module-builder.js. Bug: v8:9495 Change-Id: I7453ee7d567afd5b5fe48a4f1653513787cfe99a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732673 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#73215}
-
- 22 Feb, 2021 1 commit
-
-
Clemens Backes authored
Backends do not care about the concrete type, they only need to know the "kind" (e.g. "ref" or "i32"). In order to prepare Liftoff to use the value kind instead of the value type for all stored data, this CL moves the kind out of the ValueType and makes it a top-level enum. R=manoskouk@chromium.org Bug: v8:11477 Change-Id: I489d6c5207e6ff1b66e2afbe78a156d66df27eb3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2707169 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#72896}
-
- 17 Feb, 2021 1 commit
-
-
Thibaud Michaud authored
R=ahaas@chromium.org Bug: v8:8091 Change-Id: Ie3450c2a55d2fd272efc6c69632cf52a9aede597 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2699259 Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#72817}
-
- 01 Feb, 2021 1 commit
-
-
Manos Koukoutos authored
Changes: - Remove an obsolete TODO from wasm-module-builder. - Replace CHECK with gTest's EXPECT in unittests. - Remove setting of --experimental-wasm-liftoff-extern-ref in wasm-gc. - Test test-gc/JSAccess with Liftoff. - Remove useless #undef's from module-decoder-unittest. Change-Id: I11b4a3dde9683cc9c7d1eb89b1a63e1859505aad Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659063 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#72455}
-
- 28 Jan, 2021 1 commit
-
-
Manos Koukoutos authored
As per the latest wasm-gc spec, rtts now have optional depth, with (rtt n type) <: (rtt type) for every depth n. Liftoff compilation for type checks without depth are not supported yet. Bug: v8:7748 Change-Id: I4971875e6a42db6d333b61ca5e2996e875f39f60 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649043Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/master@{#72395}
-
- 27 Jan, 2021 1 commit
-
-
Manos Koukoutos authored
This is a reland of b77deeca Changes compared to original: Add explicit narrowing casts in tests for MSVC. Original change's description: > [wasm-gc] Remove abstract rtts > > In the latest wasm-gc spec, rtts of abstract types are no longer > allowed. Consequently, canonical rtts of concrete types always have > a depth of 0. > > Changes: > - Change the immediate argument of rtts to a type index over a heap > type. Abstract it with TypeIndexImmediate in function body decoding. > This affects: > value_type.h, read_value_type(), decoding of relevant opcodes, > wasm subtyping, WasmInitExpr, consume_init_expr(), and > wasm-module-builder.cc. > - In function-body-decoder-impl.h, update rtt.canon to always produce > an rtt of depth 0. > - Pass a unit32_t type index over a HeapType to all rtt-related > utilities. > - Remove infrastructure for abstract-type rtts from the wasm compilers, > setup-heap-internal.cc, roots.h, and module-instantiate.cc. > - Remove ObjectReferenceKnowledge::rtt_is_i31. Remove related branches > from ref.test, ref.cast and br_on_cast implementations in the wasm > compilers. > - Remove unused 'parent' field from WasmTypeInfo. > - Make the parent argument optional in NewWasmTypeInfo, CreateStructMap, > and CreateArrayMap. > - Use more convenient arguments in IsHeapSubtypeOf. > - Update tests. > > Bug: v8:7748 > Change-Id: Ib45efe0741e6558c9b291fc8b4a75ae303146bdc > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642248 > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Cr-Commit-Position: refs/heads/master@{#72321} Bug: v8:7748 Change-Id: I22b204b486fd185077cd6c7f15d492f5143f48fe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650207 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#72355}
-
- 26 Jan, 2021 2 commits
-
-
Clemens Backes authored
This reverts commit b77deeca. Reason for revert: MSVC compile fails: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win64%20-%20msvc/16535/overview Original change's description: > [wasm-gc] Remove abstract rtts > > In the latest wasm-gc spec, rtts of abstract types are no longer > allowed. Consequently, canonical rtts of concrete types always have > a depth of 0. > > Changes: > - Change the immediate argument of rtts to a type index over a heap > type. Abstract it with TypeIndexImmediate in function body decoding. > This affects: > value_type.h, read_value_type(), decoding of relevant opcodes, > wasm subtyping, WasmInitExpr, consume_init_expr(), and > wasm-module-builder.cc. > - In function-body-decoder-impl.h, update rtt.canon to always produce > an rtt of depth 0. > - Pass a unit32_t type index over a HeapType to all rtt-related > utilities. > - Remove infrastructure for abstract-type rtts from the wasm compilers, > setup-heap-internal.cc, roots.h, and module-instantiate.cc. > - Remove ObjectReferenceKnowledge::rtt_is_i31. Remove related branches > from ref.test, ref.cast and br_on_cast implementations in the wasm > compilers. > - Remove unused 'parent' field from WasmTypeInfo. > - Make the parent argument optional in NewWasmTypeInfo, CreateStructMap, > and CreateArrayMap. > - Use more convenient arguments in IsHeapSubtypeOf. > - Update tests. > > Bug: v8:7748 > Change-Id: Ib45efe0741e6558c9b291fc8b4a75ae303146bdc > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642248 > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Cr-Commit-Position: refs/heads/master@{#72321} TBR=ulan@chromium.org,jkummerow@chromium.org,manoskouk@chromium.org Change-Id: I2f0d97f1a34f7c81c5a97d7c37925cb84c66eea3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:7748 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650206Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#72322}
-
Manos Koukoutos authored
In the latest wasm-gc spec, rtts of abstract types are no longer allowed. Consequently, canonical rtts of concrete types always have a depth of 0. Changes: - Change the immediate argument of rtts to a type index over a heap type. Abstract it with TypeIndexImmediate in function body decoding. This affects: value_type.h, read_value_type(), decoding of relevant opcodes, wasm subtyping, WasmInitExpr, consume_init_expr(), and wasm-module-builder.cc. - In function-body-decoder-impl.h, update rtt.canon to always produce an rtt of depth 0. - Pass a unit32_t type index over a HeapType to all rtt-related utilities. - Remove infrastructure for abstract-type rtts from the wasm compilers, setup-heap-internal.cc, roots.h, and module-instantiate.cc. - Remove ObjectReferenceKnowledge::rtt_is_i31. Remove related branches from ref.test, ref.cast and br_on_cast implementations in the wasm compilers. - Remove unused 'parent' field from WasmTypeInfo. - Make the parent argument optional in NewWasmTypeInfo, CreateStructMap, and CreateArrayMap. - Use more convenient arguments in IsHeapSubtypeOf. - Update tests. Bug: v8:7748 Change-Id: Ib45efe0741e6558c9b291fc8b4a75ae303146bdc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642248 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#72321}
-
- 16 Nov, 2020 1 commit
-
-
Jakob Kummerow authored
- allow arrays to be allocated in LargeObjectSpace - check requested array allocation length against maximum - fix array element offsets for pointer-typed elements - fix GC handling of arrays when there are forwarding pointers - module builder: fix rtt.sub global initializer expressions - debug printing: print "UNIMPLEMENTED" instead of crashing - WasmGCTester: make some exceptions easier to diagnose Bug: v8:7748, chromium:1141376 Change-Id: Ie0281658748f3dd5e5d90d85bab78f0ea2fc3865 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534815Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#71208}
-
- 05 Oct, 2020 1 commit
-
-
Manos Koukoutos authored
This was not happening when there was no need to typecheck the entry. Additional changes: - Add tests with null table entries for typed and untyped function tables. - Allow AddIndirectFunctionTable in wasm-run-utils to specify table type. - Add possibility to define tables in test-gc.cc. - Merge trapTableOutOfBounds with trapInvalidFunc. - Use trapTableOutOfBounds in call_indirect as appropriate. - Fix emission of table types in wasm-module-builder.cc. Bug: v8:9495 Change-Id: I4a857ff4378e5a87dc0646d94b4c75635a43c55b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2442622Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/master@{#70311}
-
- 24 Sep, 2020 1 commit
-
-
Clemens Backes authored
This is a first small step for implementing the memory64 proposal: 1. Add a feature flag. 2. Add the 0x04 and 0x05 limits flag for memory64. 3. Read memory limits as LEB-encoded u64 (instead of u32) if a memory64 limit flag was read. 4. Unify {MaximumFlag} and {MemoryFlag}, which was used inconsistently before. 5. Add test for memory limits encoded with >5 bytes. 6. Move some macros from module-decoder-unittest.cc to wasm-macro-gen.h. Note that still the same limits for the maximum number of pages applies as before, i.e. you cannot specify a memory >4GB yet. But you can encode that small number in >5 bytes. R=manoskouk@chromium.org Bug: v8:10949 Change-Id: I90a4f08426ae714a67440281785eb00cfc24a349 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2423712 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/master@{#70110}
-
- 24 Jul, 2020 1 commit
-
-
Ng Zhi An authored
Using uint8_t[] causes decay to pointer issue, which manifests in copying garbage values in the call to WriteLittleEndianValue. Change it to use a std::array, which doesn't have the decaying behavior. Also add a regression test from comment#6 of the linked bug. Bug: v8:10731 Change-Id: I4a1ca69fe99806642e9931625ca7aeab6663f955 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2316465Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Bill Budge <bbudge@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#69052}
-
- 21 Jul, 2020 1 commit
-
-
Ng Zhi An authored
v128.const (kExprS128) is the only constant expression supported (similar to the other value types). Bug: v8:10731 Change-Id: I9b11b47a851903dfd79d3590eff67b615057f81c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2308389 Commit-Queue: Zhi An Ng <zhin@chromium.org> Reviewed-by: Bill Budge <bbudge@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#68975}
-
- 15 Jul, 2020 1 commit
-
-
Jakob Kummerow authored
In addition to decoding them, we also have to evaluate the initializer instructions when instantiating a module. Drive-by fix: use "big-endian" encoding (prefix comes first) when emitting initializers in the module builder. Bug: v8:7748 Change-Id: Idfa0f5db298a8f6c6100fc09e1984e4a2e170e4a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2298004 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#68866}
-
- 10 Jul, 2020 2 commits
-
-
Jakob Kummerow authored
Bug: v8:7748 Change-Id: I925be7942f4825aeac7364bc7c899b6bef8001c3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284985 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#68811}
-
Igor Sheludko authored
... by migrating old-style code MyObject* obj = new (zone) MyObject(...) to the new style MyObject* obj = zone->New<MyObject>(...) Bug: v8:10689 Change-Id: I2fc4a44ea05e4d087565811f343893f0e97dc660 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2288857 Commit-Queue: Igor Sheludko <ishell@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#68789}
-
- 09 Jul, 2020 2 commits
-
-
Manos Koukoutos authored
Motivation: With rtt.sub now allowed in constant expressions, we have to generalize WasmInitExpr to be able to handle expressions with operands. This is the second CL that prepares the ground for this change. Changes: - Remove the error from read-value-type when reading a generic rtt. - Add validation for HeapTypeImmediate in ModuleDecoder. Use it to validate null constants immediates, which was missing. Add tests. - Change ValueType::name to print rtt depths as integers. - Move global initializer building in wasm-module-builder to its own function. Bug: v8:7748 Change-Id: Ic041e1c7d032f2a1063a21fec1bfe96cb0d8120e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284983 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#68767}
-
Manos Koukoutos authored
Motivation: With rtt.sub now allowed in constant expressions, we have to generalize WasmInitExpr to be able to handle expressions with operands. This CL prepares the ground for this change and adds no functionality. Changes: - ValueType::heap_representation and HeapType::representation now return HeapType::Representation. - Add ValueType::is_rtt(). - WasmInitExpr: - Make kind private. Rename val -> operator, make it private. Add accessors. - Rename kGlobalIndex -> kGlobalGet. - Squash global_index and function_index into index. - Add heap_type Immediate. Use it for RefNullConst. TypeOf in module-decoder.cc can now fully determine the type of a WasmInitExpr. - Add class constructors/static method constructors for each Operator kind. - Delete copy constructor. WasmInitExpr will use std::unique_ptr for its operands. - consume_init_expr now uses a stack. - A few minor improvements. Bug: v8:7748 Change-Id: I3ba3ee7ac2d6bc58e887790c37110ceb80658985 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284483 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#68759}
-
- 01 Jul, 2020 1 commit
-
-
Manos Koukoutos authored
Motivation: We used to approximate s33/i33 value parsing by first checking for specific negative codes, and then parsing an u32 value if that failed. This is not correct in all cases. Changes: - Implement i33 parsing in Decoder. - Factor out parsing of heap types into read_heap_type. - Introduce HeapType::kBottom. - Introduce helper functions in WasmFeatures and value_type_reader. - Remove macros from the parsing of value types. - HeapType::code now returns an i32 for compatibility with the i33 requirement. - Introduce HeapType::Repr. - Renamings: HeapType::type() -> representation(), ValueType::heap() -> heap_representation() Bug: v8:7748 Change-Id: I04deabce8837a48af2226411cd706a397f9e5725 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274118 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#68633}
-
- 29 Jun, 2020 1 commit
-
-
Manos Koukoutos authored
Drive-by: Fix ref.is_null calling is_reference_type to typecheck its argument (which would also allow rtts). Bug: v8:7748 Change-Id: I2ad01d0f70ac15d37ac4cc344bd0280a7ca08073 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2264094 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#68572}
-