Skip to content

Commit

Permalink
perf(turbo-tasks): Mark a bunch of stuff as local
Browse files Browse the repository at this point in the history
  • Loading branch information
bgw committed Jan 24, 2025
1 parent dd12daa commit 988b79c
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion turbopack/crates/turbopack-css/src/references/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl ValueToString for ImportAssetReference {

#[turbo_tasks::value_impl]
impl CodeGenerateable for ImportAssetReference {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
self: Vc<Self>,
_context: Vc<Box<dyn ChunkingContext>>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl ChunkType for EcmascriptChunkType {
Ok(Vc::upcast(EcmascriptChunk::new(chunking_context, content)))
}

#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn chunk_item_size(
&self,
_chunking_context: Vc<Box<dyn ChunkingContext>>,
Expand Down
2 changes: 1 addition & 1 deletion turbopack/crates/turbopack-ecmascript/src/chunk/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl EcmascriptChunkItemContent {
.cell())
}

#[turbo_tasks::function]
#[turbo_tasks::function(local)]
pub async fn module_factory(&self) -> Result<Vc<Code>> {
let mut args = vec![
"r: __turbopack_require__",
Expand Down
2 changes: 1 addition & 1 deletion turbopack/crates/turbopack-ecmascript/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl SourceMapGenConfig for InlineSourcesContentConfig {
}
}

#[turbo_tasks::function]
#[turbo_tasks::function(local)]
pub async fn parse(
source: ResolvedVc<Box<dyn Source>>,
ty: Value<EcmascriptModuleAssetType>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl AmdDefineWithDependenciesCodeGen {

#[turbo_tasks::value_impl]
impl CodeGenerateable for AmdDefineWithDependenciesCodeGen {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
module_graph: Vc<ModuleGraph>,
Expand Down
6 changes: 3 additions & 3 deletions turbopack/crates/turbopack-ecmascript/src/references/cjs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl ChunkableModuleReference for CjsRequireAssetReference {}

#[turbo_tasks::value_impl]
impl CodeGenerateable for CjsRequireAssetReference {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
module_graph: Vc<ModuleGraph>,
Expand Down Expand Up @@ -242,7 +242,7 @@ impl ChunkableModuleReference for CjsRequireResolveAssetReference {}

#[turbo_tasks::value_impl]
impl CodeGenerateable for CjsRequireResolveAssetReference {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
module_graph: Vc<ModuleGraph>,
Expand Down Expand Up @@ -305,7 +305,7 @@ pub struct CjsRequireCacheAccess {

#[turbo_tasks::value_impl]
impl CodeGenerateable for CjsRequireCacheAccess {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
_module_graph: Vc<ModuleGraph>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl ConstantCondition {

#[turbo_tasks::value_impl]
impl CodeGenerateable for ConstantCondition {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
_module_graph: Vc<ModuleGraph>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl ConstantValue {

#[turbo_tasks::value_impl]
impl CodeGenerateable for ConstantValue {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
_module_graph: Vc<ModuleGraph>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl EsmBinding {

#[turbo_tasks::value_impl]
impl CodeGenerateable for EsmBindings {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
_module_graph: Vc<ModuleGraph>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl ChunkableModuleReference for EsmAsyncAssetReference {

#[turbo_tasks::value_impl]
impl CodeGenerateable for EsmAsyncAssetReference {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
module_graph: Vc<ModuleGraph>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl EsmExports {

#[turbo_tasks::value_impl]
impl CodeGenerateable for EsmExports {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
self: Vc<Self>,
_module_graph: Vc<ModuleGraph>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl ImportMetaRef {

#[turbo_tasks::value_impl]
impl CodeGenerateable for ImportMetaRef {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
_module_graph: Vc<ModuleGraph>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl ChunkableModuleReference for EsmModuleIdAssetReference {

#[turbo_tasks::value_impl]
impl CodeGenerateable for EsmModuleIdAssetReference {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
module_graph: Vc<ModuleGraph>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl EsmModuleItem {

#[turbo_tasks::value_impl]
impl CodeGenerateable for EsmModuleItem {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
_module_graph: Vc<ModuleGraph>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl CodeGenerateable for UrlAssetReference {
│ None │ new URL(url, base) │ new URL(url, base) │ new URL(url, base) │
└───────────────────────────────┴─────────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────────┴───────────────────────┘
*/
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
self: Vc<Self>,
module_graph: Vc<ModuleGraph>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl IdentReplacement {

#[turbo_tasks::value_impl]
impl CodeGenerateable for IdentReplacement {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
_module_graph: Vc<ModuleGraph>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ impl ChunkableModuleReference for RequireContextAssetReference {}

#[turbo_tasks::value_impl]
impl CodeGenerateable for RequireContextAssetReference {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
module_graph: Vc<ModuleGraph>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl Unreachable {

#[turbo_tasks::value_impl]
impl CodeGenerateable for Unreachable {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
_module_graph: Vc<ModuleGraph>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl ChunkableModuleReference for WorkerAssetReference {}

#[turbo_tasks::value_impl]
impl CodeGenerateable for WorkerAssetReference {
#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn code_generation(
&self,
_module_graph: Vc<ModuleGraph>,
Expand Down
2 changes: 1 addition & 1 deletion turbopack/crates/turbopack/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ use turbopack_wasm::{module_asset::WebAssemblyModuleAsset, source::WebAssemblySo
use self::transition::{Transition, TransitionOptions};
use crate::module_options::{CssOptionsContext, CustomModuleType, EcmascriptOptionsContext};

#[turbo_tasks::function]
#[turbo_tasks::function(local)]
async fn apply_module_type(
source: ResolvedVc<Box<dyn Source>>,
module_asset_context: Vc<ModuleAssetContext>,
Expand Down

0 comments on commit 988b79c

Please sign in to comment.