Bug 1824255 - Update glsl to 6.0.2. r=emilio,supply-chain-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D173488
This commit is contained in:
Mike Hommey 2023-03-24 00:13:38 +00:00
Родитель 2a3e4f2928
Коммит b6972306c0
10 изменённых файлов: 49 добавлений и 147 удалений

25
Cargo.lock сгенерированный
Просмотреть файл

@ -194,7 +194,7 @@ dependencies = [
"askama_escape",
"mime",
"mime_guess",
"nom 7.1.3",
"nom",
"proc-macro2",
"quote",
"serde",
@ -392,7 +392,7 @@ dependencies = [
"libudev",
"log",
"memoffset 0.6.99",
"nom 7.1.3",
"nom",
"nss-gk-api",
"pkcs11-bindings",
"rand 0.8.5",
@ -613,7 +613,7 @@ name = "builtins-static"
version = "0.1.0"
dependencies = [
"bindgen 0.63.0",
"nom 7.1.3",
"nom",
"pkcs11-bindings",
"smallvec",
]
@ -730,7 +730,7 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
dependencies = [
"nom 7.1.3",
"nom",
]
[[package]]
@ -1404,7 +1404,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9313f104b590510b46fc01c0a324fc76505c13871454d3c48490468d04c8d395"
dependencies = [
"libc",
"nom 7.1.3",
"nom",
]
[[package]]
@ -2371,11 +2371,11 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "glsl"
version = "6.0.1"
version = "6.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd49bbe5e12dd5aed9d66a84899af422f3d4fcfdd20b2294c8b4ade11500b05"
checksum = "65c80dbf169ac31dbe6e0a69a7cef0b09ec9805f955da206ff1ee2e47895f836"
dependencies = [
"nom 6.99.99",
"nom",
]
[[package]]
@ -3812,13 +3812,6 @@ dependencies = [
"libc",
]
[[package]]
name = "nom"
version = "6.99.99"
dependencies = [
"nom 7.1.3",
]
[[package]]
name = "nom"
version = "7.1.3"
@ -6384,7 +6377,7 @@ version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e79c5206e1f43a2306fd64bdb95025ee4228960f2e6c5a8b173f3caaf807741"
dependencies = [
"nom 7.1.3",
"nom",
]
[[package]]

Просмотреть файл

@ -127,9 +127,6 @@ bindgen = { path = "build/rust/bindgen" }
# Patch memoffset 0.6 to 0.7
memoffset = { path = "build/rust/memoffset" }
# Patch nom 6 to 7
nom = { path = "build/rust/nom" }
# Patch nix 0.24 to 0.25
nix = { path = "build/rust/nix" }

Просмотреть файл

@ -1,15 +0,0 @@
[package]
name = "nom"
version = "6.99.99"
edition = "2018"
license = "MPL-2.0"
[lib]
path = "lib.rs"
[dependencies.nom]
version = "7"
default-features = false
[features]
std = ["nom/std"]

Просмотреть файл

@ -1,26 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Strict minimum to make glsl happy.
pub use nom::{branch, bytes, character, combinator, error, sequence, Err, IResult, ParseTo};
pub mod multi {
use nom::multi::fold_many0 as nom_fold_many0;
pub use nom::multi::{many0, many1, separated_list0};
pub fn fold_many0<I, O, E, F, G, R>(
f: F,
init: R,
g: G,
) -> impl FnMut(I) -> nom::IResult<I, R, E>
where
I: Clone + nom::InputLength,
F: nom::Parser<I, O, E>,
G: FnMut(R, O) -> R,
E: nom::error::ParseError<I>,
R: Clone,
{
nom_fold_many0(f, move || init.clone(), g)
}
}

Просмотреть файл

@ -1017,6 +1017,12 @@ who = "Mike Hommey <mh+mozilla@glandium.org>"
criteria = "safe-to-deploy"
delta = "0.3.0 -> 0.3.1"
[[audits.glsl]]
who = "Mike Hommey <mh+mozilla@glandium.org>"
criteria = "safe-to-deploy"
delta = "6.0.1 -> 6.0.2"
notes = "I'm the author of the changes in this version of the crate."
[[audits.goblin]]
who = "Jan-Erik Rediger <jrediger@mozilla.com>"
criteria = "safe-to-deploy"

2
third_party/rust/glsl/.cargo-checksum.json поставляемый
Просмотреть файл

@ -1 +1 @@
{"files":{"CHANGELOG.md":"57518a2fe0c2b48c9f50e8cb807d9f7438059cbc54c60c35c27edc4fbd96164a","Cargo.toml":"25f4f4a5805ae0d1d82ad8b3a025c5d1d7e7be0cf3515874dbbfab3b76eee2b5","LICENSE":"09719a44ba10012b20e7a36e7f2e7806a89476813668b66067e0e5dbcc9ce34c","README.md":"56863e436aadfd5e66bacb46f0d78da148dc47a4362bb233b433befe84898793","data/tests/buffer_block_0.glsl":"335b2b5360635eb0a1c994e44a33787d43ea6ce84da4c0a795e7526da64b37bd","data/tests/layout_buffer_block_0.glsl":"d64c27188cd27b7fc81413e8afe621d6f44ddcdeddb115d62661358b2131e8a3","src/lib.rs":"6dbcee8beb9a09a2b49bf648ab949be24066ba27f54e3d01fad57c7cee3edc28","src/parse_tests.rs":"1ddcffb3eeb5cbf473194633a042b7833b40629745a55d35e2ff0a7578d11870","src/parser.rs":"1fd9a6d2110fb25e5ccf038354b1215b1fd129bbf68c37c1b52e8ac6c154704b","src/parsers.rs":"bf04b1f899008e29d564be094e012068e6feb08e9f52f05c8f3b0f2727dc3903","src/parsers/nom_helpers.rs":"f8c961f4e791da141120f992695bc9875f4827a3a5906c3dc338c09a5f649999","src/syntax.rs":"56f4cc3f93657fdb64b9fb400ef38a9beef793d0d2fe71337d998393f816a439","src/transpiler/glsl.rs":"e3b44be9b10c19ac2a4ad50e1ec81d60d19551e626e8c443d033f229c24ac97a","src/transpiler/mod.rs":"244cc5d9ab4c6e6ac4a30d42df81f4718b79fe653cc04e138071ae5905aa9e28","src/transpiler/spirv.rs":"8c777f0f5717a3e269f9062b187da3e66706705a81a392f6aeea0630ed498deb","src/visitor.rs":"ba02f44cb840bc8aa5c4a384da708805df21de602f091d0702f9738f6527b2e4","tests/incorrect_statement.rs":"6b182e705421450d016d6a078cf8fcc0b748bf6208dfbf2fd3474467261241fd","tests/left_associativity.rs":"29790670aa699e0e1a98bcb4464e642c35bcf92ecfa5da712550cdc9ac9b8ead","tests/missing_zero_float.rs":"1bb2fa7c55354ecec8fb5e82b1cb821b052c2047c32edc030ed0e529d77af3d2"},"package":"1fd49bbe5e12dd5aed9d66a84899af422f3d4fcfdd20b2294c8b4ade11500b05"}
{"files":{"CHANGELOG.md":"668a1459ea4feb4099a2d357ea3ba4f79883f17263434ff6b62f7252e85eb48a","Cargo.toml":"b5827f1e73a80ebe684853fca3e4573d4fd0267d0b4b4c7abee5015bc628b1a9","LICENSE":"09719a44ba10012b20e7a36e7f2e7806a89476813668b66067e0e5dbcc9ce34c","README.md":"56863e436aadfd5e66bacb46f0d78da148dc47a4362bb233b433befe84898793","data/tests/buffer_block_0.glsl":"335b2b5360635eb0a1c994e44a33787d43ea6ce84da4c0a795e7526da64b37bd","data/tests/layout_buffer_block_0.glsl":"d64c27188cd27b7fc81413e8afe621d6f44ddcdeddb115d62661358b2131e8a3","src/lib.rs":"6dbcee8beb9a09a2b49bf648ab949be24066ba27f54e3d01fad57c7cee3edc28","src/parse_tests.rs":"1ddcffb3eeb5cbf473194633a042b7833b40629745a55d35e2ff0a7578d11870","src/parser.rs":"1fd9a6d2110fb25e5ccf038354b1215b1fd129bbf68c37c1b52e8ac6c154704b","src/parsers.rs":"0ba6f11633bde917347655cd4410ed15c59f78d257f29bdfde5c0baac5f18c93","src/parsers/nom_helpers.rs":"1773e52b4f2625bb669c935bcb36dbacf73d992e2954d85f0eda12cb5c2e0e35","src/syntax.rs":"56f4cc3f93657fdb64b9fb400ef38a9beef793d0d2fe71337d998393f816a439","src/transpiler/glsl.rs":"e3b44be9b10c19ac2a4ad50e1ec81d60d19551e626e8c443d033f229c24ac97a","src/transpiler/mod.rs":"244cc5d9ab4c6e6ac4a30d42df81f4718b79fe653cc04e138071ae5905aa9e28","src/transpiler/spirv.rs":"8c777f0f5717a3e269f9062b187da3e66706705a81a392f6aeea0630ed498deb","src/visitor.rs":"ba02f44cb840bc8aa5c4a384da708805df21de602f091d0702f9738f6527b2e4","tests/incorrect_statement.rs":"6b182e705421450d016d6a078cf8fcc0b748bf6208dfbf2fd3474467261241fd","tests/left_associativity.rs":"29790670aa699e0e1a98bcb4464e642c35bcf92ecfa5da712550cdc9ac9b8ead","tests/missing_zero_float.rs":"1bb2fa7c55354ecec8fb5e82b1cb821b052c2047c32edc030ed0e529d77af3d2"},"package":"65c80dbf169ac31dbe6e0a69a7cef0b09ec9805f955da206ff1ee2e47895f836"}

67
third_party/rust/glsl/CHANGELOG.md поставляемый
Просмотреть файл

@ -1,71 +1,10 @@
# Changelog
<!-- vim-markdown-toc GFM -->
# 6.0.2
* [6.0.1](#601)
* [6.0](#60)
* [5.0.2](#502)
* [5.0.1](#501)
* [5.0.0](#500)
* [Migration guide](#migration-guide)
* [4.1.1](#411)
* [4.1](#41)
* [4.0.3](#403)
* [4.0.2](#402)
* [4.0.1](#401)
* [4.0](#40)
* [Major changes](#major-changes)
* [3.0](#30)
* [Major changes](#major-changes-1)
* [Patch changes](#patch-changes)
* [2.0.1](#201)
* [2.0](#20)
* [Major changes](#major-changes-2)
* [Patch changes](#patch-changes-1)
* [1.2](#12)
* [Deprecations](#deprecations)
* [Minor changes](#minor-changes)
* [1.1.1](#111)
* [1.1](#11)
* [1.0.2](#102)
* [1.0.1](#101)
* [1.0](#10)
* [0.13.5](#0135)
* [0.13.4](#0134)
* [0.13.3](#0133)
* [0.13.2](#0132)
* [0.13.1](#0131)
* [0.13](#013)
* [0.12](#012)
* [0.11](#011)
* [0.10.1](#0101)
* [0.10](#010)
* [0.9.2](#092)
* [0.9.1](#091)
* [0.9](#09)
* [0.8.1](#081)
* [0.8](#08)
* [0.7.2](#072)
* [0.7.1](#071)
* [0.7](#07)
* [0.6.5](#065)
* [0.6.4](#064)
* [0.6.3](#063)
* [0.6.2](#062)
* [0.6.1](#061)
* [0.6](#06)
* [0.5](#05)
* [0.4.2](#042)
* [0.4.1](#041)
* [0.4](#04)
* [0.3.1](#031)
* [0.3](#03)
* [0.2.2](#022)
* [0.2.1](#021)
* [0.2](#02)
* [0.1](#01)
> Mar 23, 2023
<!-- vim-markdown-toc -->
- Switch to `nom-7`.
# 6.0.1

26
third_party/rust/glsl/Cargo.toml поставляемый
Просмотреть файл

@ -3,28 +3,36 @@
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you believe there's an error in this file please file an
# issue against the rust-lang/cargo repository. If you're
# editing this file be aware that the upstream Cargo.toml
# will likely look very different (and much more reasonable)
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
edition = "2018"
name = "glsl"
version = "6.0.1"
version = "6.0.2"
authors = ["Dimitri Sabadie <dimitri.sabadie@gmail.com>"]
description = "A GLSL450/GLSL460 parser."
homepage = "https://github.com/phaazon/glsl"
documentation = "https://docs.rs/glsl"
readme = "README.md"
keywords = ["GLSL", "OpenGL", "SPIR-V", "parser"]
categories = ["parsing", "rendering"]
keywords = [
"GLSL",
"OpenGL",
"SPIR-V",
"parser",
]
categories = [
"parsing",
"rendering",
]
license = "BSD-3-Clause"
repository = "https://github.com/phaazon/glsl"
[dependencies.nom]
version = "6"
version = "7"
features = ["std"]
default-features = false

24
third_party/rust/glsl/src/parsers.rs поставляемый
Просмотреть файл

@ -1123,7 +1123,7 @@ pub fn cond_expr(i: &str) -> ParserResult<syntax::Expr> {
cut(terminated(char(':'), blank)),
cut(assignment_expr),
)),
a,
move || a.clone(),
move |acc, (_, b, _, c)| syntax::Expr::Ternary(Box::new(acc), Box::new(b), Box::new(c)),
)(i)
}
@ -1134,7 +1134,7 @@ pub fn logical_or_expr(i: &str) -> ParserResult<syntax::Expr> {
fold_many0(
preceded(delimited(blank, tag("||"), blank), logical_xor_expr),
a,
move || a.clone(),
move |acc, b| syntax::Expr::Binary(syntax::BinaryOp::Or, Box::new(acc), Box::new(b)),
)(i)
}
@ -1145,7 +1145,7 @@ pub fn logical_xor_expr(i: &str) -> ParserResult<syntax::Expr> {
fold_many0(
preceded(delimited(blank, tag("^^"), blank), logical_and_expr),
a,
move || a.clone(),
move |acc, b| syntax::Expr::Binary(syntax::BinaryOp::Xor, Box::new(acc), Box::new(b)),
)(i)
}
@ -1156,7 +1156,7 @@ pub fn logical_and_expr(i: &str) -> ParserResult<syntax::Expr> {
fold_many0(
preceded(delimited(blank, tag("&&"), blank), inclusive_or_expr),
a,
move || a.clone(),
move |acc, b| syntax::Expr::Binary(syntax::BinaryOp::And, Box::new(acc), Box::new(b)),
)(i)
}
@ -1167,7 +1167,7 @@ pub fn inclusive_or_expr(i: &str) -> ParserResult<syntax::Expr> {
fold_many0(
preceded(delimited(blank, char('|'), blank), inclusive_or_expr),
a,
move || a.clone(),
move |acc, b| syntax::Expr::Binary(syntax::BinaryOp::BitOr, Box::new(acc), Box::new(b)),
)(i)
}
@ -1178,7 +1178,7 @@ pub fn exclusive_or_expr(i: &str) -> ParserResult<syntax::Expr> {
fold_many0(
preceded(delimited(blank, char('^'), blank), exclusive_or_expr),
a,
move || a.clone(),
move |acc, b| syntax::Expr::Binary(syntax::BinaryOp::BitXor, Box::new(acc), Box::new(b)),
)(i)
}
@ -1189,7 +1189,7 @@ pub fn and_expr(i: &str) -> ParserResult<syntax::Expr> {
fold_many0(
preceded(delimited(blank, char('&'), blank), and_expr),
a,
move || a.clone(),
move |acc, b| syntax::Expr::Binary(syntax::BinaryOp::BitAnd, Box::new(acc), Box::new(b)),
)(i)
}
@ -1210,7 +1210,7 @@ pub fn equality_expr(i: &str) -> ParserResult<syntax::Expr> {
),
rel_expr,
),
a,
move || a.clone(),
move |acc, (op, b)| syntax::Expr::Binary(op, Box::new(acc), Box::new(b)),
)(i)
}
@ -1233,7 +1233,7 @@ pub fn rel_expr(i: &str) -> ParserResult<syntax::Expr> {
),
shift_expr,
),
a,
move || a.clone(),
move |acc, (op, b)| syntax::Expr::Binary(op, Box::new(acc), Box::new(b)),
)(i)
}
@ -1254,7 +1254,7 @@ pub fn shift_expr(i: &str) -> ParserResult<syntax::Expr> {
),
additive_expr,
),
a,
move || a.clone(),
move |acc, (op, b)| syntax::Expr::Binary(op, Box::new(acc), Box::new(b)),
)(i)
}
@ -1275,7 +1275,7 @@ pub fn additive_expr(i: &str) -> ParserResult<syntax::Expr> {
),
multiplicative_expr,
),
a,
move || a.clone(),
move |acc, (op, b)| syntax::Expr::Binary(op, Box::new(acc), Box::new(b)),
)(i)
}
@ -1297,7 +1297,7 @@ pub fn multiplicative_expr(i: &str) -> ParserResult<syntax::Expr> {
),
unary_expr,
),
a,
move || a.clone(),
move |acc, (op, b)| syntax::Expr::Binary(op, Box::new(acc), Box::new(b)),
)(i)
}

Просмотреть файл

@ -64,7 +64,7 @@ pub fn many0_<'a, A, F>(mut f: F) -> impl FnMut(&'a str) -> ParserResult<'a, ()>
where
F: FnMut(&'a str) -> ParserResult<'a, A>,
{
move |i| fold_many0(&mut f, (), |_, _| ())(i)
move |i| fold_many0(&mut f, || (), |_, _| ())(i)
}
/// Parse a string until the end of line.