diff options
author | Yiyu Lin <linyiyu1992@gmail.com> | 2023-01-13 15:51:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 16:51:32 +0900 |
commit | a00e432297d2ae119c8e1097aec74badc886f912 (patch) | |
tree | 7380b37245e889e97a8c7b1535a1e31fddb74738 /ops | |
parent | 5707a958ac2b44d573d50260b1d0d40887662011 (diff) |
chore: add `copyright_checker` tool and add the missing copyright (#17285)
Diffstat (limited to 'ops')
-rw-r--r-- | ops/fast_call.rs | 9 | ||||
-rw-r--r-- | ops/optimizer.rs | 13 |
2 files changed, 15 insertions, 7 deletions
diff --git a/ops/fast_call.rs b/ops/fast_call.rs index f2ed8cb2d..b8fdf91bf 100644 --- a/ops/fast_call.rs +++ b/ops/fast_call.rs @@ -1,6 +1,6 @@ -/// Code generation for V8 fast calls. -use crate::optimizer::FastValue; -use crate::optimizer::Optimizer; +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. +//! Code generation for V8 fast calls. + use pmutil::{q, Quote, ToTokensExt}; use proc_macro2::{Span, TokenStream}; use quote::quote; @@ -9,6 +9,9 @@ use syn::{ Ident, ItemFn, ItemImpl, Path, PathArguments, PathSegment, Type, TypePath, }; +use crate::optimizer::FastValue; +use crate::optimizer::Optimizer; + pub(crate) struct FastImplItems { pub(crate) impl_and_fn: TokenStream, pub(crate) decl: TokenStream, diff --git a/ops/optimizer.rs b/ops/optimizer.rs index 2d68a296f..3f22a867b 100644 --- a/ops/optimizer.rs +++ b/ops/optimizer.rs @@ -1,10 +1,13 @@ -/// Optimizer for #[op] -use crate::Op; -use pmutil::{q, Quote}; -use proc_macro2::TokenStream; +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. +//! Optimizer for #[op] + use std::collections::BTreeMap; use std::fmt::Debug; use std::fmt::Formatter; + +use pmutil::{q, Quote}; +use proc_macro2::TokenStream; + use syn::{ parse_quote, punctuated::Punctuated, token::Colon2, AngleBracketedGenericArguments, FnArg, GenericArgument, PatType, Path, @@ -12,6 +15,8 @@ use syn::{ TypeReference, TypeSlice, TypeTuple, }; +use crate::Op; + #[derive(Debug)] pub(crate) enum BailoutReason { // Recoverable errors |