- 29 May, 2018 1 commit
-
-
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:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#53416}
-
- 24 May, 2018 1 commit
-
-
Tobias Tebbi authored
Change-Id: Ie8bdbcdea8006d3105c419113f9adb2c1d6f162c Reviewed-on: https://chromium-review.googlesource.com/1070203 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#53341}
-
- 22 May, 2018 2 commits
-
-
Tobias Tebbi authored
Change-Id: I80dd313ac3a5809d363adff9cf11ac31b04648dd Reviewed-on: https://chromium-review.googlesource.com/1068876 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#53292}
-
Simon Zünd authored
This CL adds grammar support for function pointers to generic builtins. It also instantiates generic specializations when they are only used in an assignment to a function pointer. Example: builtin GenericBuiltinTest<T: type>(c: Context, param: T): Object { return Null; } let fnptr: builtin(Context, Smi) => Object = GenericBuiltinTest<Smi>; Change-Id: Ib7e5f47ffc05f14eb5d0b789936587263dfb961d Reviewed-on: https://chromium-review.googlesource.com/1068731 Commit-Queue: Simon Zünd <szuend@google.com> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#53284}
-
- 18 May, 2018 1 commit
-
-
Théotime Grohens authored
Change-Id: I79e4ad1cf41ea8888bf6288690203d746a7b7864 Reviewed-on: https://chromium-review.googlesource.com/1065811Reviewed-by:
Daniel Clifford <danno@chromium.org> Commit-Queue: Théotime Grohens <theotime@google.com> Cr-Commit-Position: refs/heads/master@{#53245}
-
- 16 May, 2018 2 commits
-
-
Tobias Tebbi authored
This CL adds the new type expression builtin(Context, ArgType1, ...) => ReturnType and allows to use Torque-defined builtins as values of this type, as well as calling values of this type. The new function pointer types are subtypes of Code. Change-Id: Ib7ba3ce6ef7a8591a4c79230dd189fd25698d5b9 Reviewed-on: https://chromium-review.googlesource.com/1060056 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Daniel Clifford <danno@chromium.org> Cr-Commit-Position: refs/heads/master@{#53217}
-
Daniel Clifford authored
Including specialization, e.g.: // Declare parameterized generic macro GenericMacroTest<T: type>(param: T): Object { return Undefined; } // Declare specialization of generic GenericMacroTest<Object>(param: Object): Object { return param; } ... assert(GenericMacroTest<Smi>(0) == Undefined); assert(GenericMacroTest<Smi>(1) == Undefined); assert(GenericMacroTest<Object>(Null) == Null); assert(GenericMacroTest<Object>(False) == False); ... Known issue: specialization doesn't rigorously checked to verify that specialization signature precisely matches generic declaration. Change-Id: I9d9d96da4c5c8c9a76550844680e9e133a5edaed Reviewed-on: https://chromium-review.googlesource.com/1043986 Commit-Queue: Daniel Clifford <danno@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#53203}
-
- 15 May, 2018 1 commit
-
-
Simon Zünd authored
This CL changes the generated C++ code for LabeledStatementBlocks to only emit labels if they are used. Prior to this CL, when a label was only used on one path of an if constexpr expression, and not at all anywhere else, the try/label construct would BIND a label that was not used, causing a CSA verification error. R=tebbi@chromium.org Change-Id: Ia81a0cd081b84528c95bbdbdb98b9ab51928e13f Reviewed-on: https://chromium-review.googlesource.com/1057247Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Daniel Clifford <danno@chromium.org> Commit-Queue: Simon Zünd <szuend@google.com> Cr-Commit-Position: refs/heads/master@{#53173}
-
- 13 May, 2018 2 commits
-
-
peterwmwong authored
Change-Id: I37ed9115c099f3d17f23a26348a1bbf5f773ee32 Reviewed-on: https://chromium-review.googlesource.com/1056668Reviewed-by:
Daniel Clifford <danno@chromium.org> Commit-Queue: Peter Wong <peter.wm.wong@gmail.com> Cr-Commit-Position: refs/heads/master@{#53136}
-
Daniel Clifford authored
In the process, add a few simple tests for "constexpr" expressions, which identified a few bugs that are also fixed in this CL. Change-Id: I97486c781572642d2b574b92133b1f9cda3db592 Reviewed-on: https://chromium-review.googlesource.com/1055493 Commit-Queue: Daniel Clifford <danno@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#53135}
-