| 1 | //===- Transform.cpp - C Interface for Transform dialect ------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #include "mlir-c/Dialect/Transform.h" |
| 10 | #include "mlir-c/Support.h" |
| 11 | #include "mlir/CAPI/Dialect/Transform.h" |
| 12 | #include "mlir/CAPI/Interfaces.h" |
| 13 | #include "mlir/CAPI/Registration.h" |
| 14 | #include "mlir/CAPI/Rewrite.h" |
| 15 | #include "mlir/Dialect/Transform/IR/TransformDialect.h" |
| 16 | #include "mlir/Dialect/Transform/IR/TransformTypes.h" |
| 17 | #include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.h" |
| 18 | #include "llvm/ADT/TypeSwitch.h" |
| 19 | |
| 20 | using namespace mlir; |
| 21 | |
| 22 | MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Transform, transform, |
| 23 | transform::TransformDialect) |
| 24 | |
| 25 | //===---------------------------------------------------------------------===// |
| 26 | // AnyOpType |
| 27 | //===---------------------------------------------------------------------===// |
| 28 | |
| 29 | bool mlirTypeIsATransformAnyOpType(MlirType type) { |
| 30 | return isa<transform::AnyOpType>(Val: unwrap(c: type)); |
| 31 | } |
| 32 | |
| 33 | MlirTypeID mlirTransformAnyOpTypeGetTypeID(void) { |
| 34 | return wrap(cpp: transform::AnyOpType::getTypeID()); |
| 35 | } |
| 36 | |
| 37 | MlirType mlirTransformAnyOpTypeGet(MlirContext ctx) { |
| 38 | return wrap(cpp: transform::AnyOpType::get(ctx: unwrap(c: ctx))); |
| 39 | } |
| 40 | |
| 41 | MlirStringRef mlirTransformAnyOpTypeGetName(void) { |
| 42 | return wrap(ref: transform::AnyOpType::name); |
| 43 | } |
| 44 | |
| 45 | //===---------------------------------------------------------------------===// |
| 46 | // AnyParamType |
| 47 | //===---------------------------------------------------------------------===// |
| 48 | |
| 49 | bool mlirTypeIsATransformAnyParamType(MlirType type) { |
| 50 | return isa<transform::AnyParamType>(Val: unwrap(c: type)); |
| 51 | } |
| 52 | |
| 53 | MlirTypeID mlirTransformAnyParamTypeGetTypeID(void) { |
| 54 | return wrap(cpp: transform::AnyParamType::getTypeID()); |
| 55 | } |
| 56 | |
| 57 | MlirType mlirTransformAnyParamTypeGet(MlirContext ctx) { |
| 58 | return wrap(cpp: transform::AnyParamType::get(ctx: unwrap(c: ctx))); |
| 59 | } |
| 60 | |
| 61 | MlirStringRef mlirTransformAnyParamTypeGetName(void) { |
| 62 | return wrap(ref: transform::AnyParamType::name); |
| 63 | } |
| 64 | |
| 65 | //===---------------------------------------------------------------------===// |
| 66 | // AnyValueType |
| 67 | //===---------------------------------------------------------------------===// |
| 68 | |
| 69 | bool mlirTypeIsATransformAnyValueType(MlirType type) { |
| 70 | return isa<transform::AnyValueType>(Val: unwrap(c: type)); |
| 71 | } |
| 72 | |
| 73 | MlirTypeID mlirTransformAnyValueTypeGetTypeID(void) { |
| 74 | return wrap(cpp: transform::AnyValueType::getTypeID()); |
| 75 | } |
| 76 | |
| 77 | MlirType mlirTransformAnyValueTypeGet(MlirContext ctx) { |
| 78 | return wrap(cpp: transform::AnyValueType::get(ctx: unwrap(c: ctx))); |
| 79 | } |
| 80 | |
| 81 | MlirStringRef mlirTransformAnyValueTypeGetName(void) { |
| 82 | return wrap(ref: transform::AnyValueType::name); |
| 83 | } |
| 84 | |
| 85 | //===---------------------------------------------------------------------===// |
| 86 | // OperationType |
| 87 | //===---------------------------------------------------------------------===// |
| 88 | |
| 89 | bool mlirTypeIsATransformOperationType(MlirType type) { |
| 90 | return isa<transform::OperationType>(Val: unwrap(c: type)); |
| 91 | } |
| 92 | |
| 93 | MlirTypeID mlirTransformOperationTypeGetTypeID(void) { |
| 94 | return wrap(cpp: transform::OperationType::getTypeID()); |
| 95 | } |
| 96 | |
| 97 | MlirType mlirTransformOperationTypeGet(MlirContext ctx, |
| 98 | MlirStringRef operationName) { |
| 99 | return wrap( |
| 100 | cpp: transform::OperationType::get(context: unwrap(c: ctx), operation_name: unwrap(ref: operationName))); |
| 101 | } |
| 102 | |
| 103 | MlirStringRef mlirTransformOperationTypeGetName(void) { |
| 104 | return wrap(ref: transform::OperationType::name); |
| 105 | } |
| 106 | |
| 107 | MlirStringRef mlirTransformOperationTypeGetOperationName(MlirType type) { |
| 108 | return wrap(ref: cast<transform::OperationType>(Val: unwrap(c: type)).getOperationName()); |
| 109 | } |
| 110 | |
| 111 | //===---------------------------------------------------------------------===// |
| 112 | // ParamType |
| 113 | //===---------------------------------------------------------------------===// |
| 114 | |
| 115 | bool mlirTypeIsATransformParamType(MlirType type) { |
| 116 | return isa<transform::ParamType>(Val: unwrap(c: type)); |
| 117 | } |
| 118 | |
| 119 | MlirTypeID mlirTransformParamTypeGetTypeID(void) { |
| 120 | return wrap(cpp: transform::ParamType::getTypeID()); |
| 121 | } |
| 122 | |
| 123 | MlirType mlirTransformParamTypeGet(MlirContext ctx, MlirType type) { |
| 124 | return wrap(cpp: transform::ParamType::get(context: unwrap(c: ctx), type: unwrap(c: type))); |
| 125 | } |
| 126 | |
| 127 | MlirStringRef mlirTransformParamTypeGetName(void) { |
| 128 | return wrap(ref: transform::ParamType::name); |
| 129 | } |
| 130 | |
| 131 | MlirType mlirTransformParamTypeGetType(MlirType type) { |
| 132 | return wrap(cpp: cast<transform::ParamType>(Val: unwrap(c: type)).getType()); |
| 133 | } |
| 134 | |
| 135 | //===---------------------------------------------------------------------===// |
| 136 | // TransformRewriter |
| 137 | //===---------------------------------------------------------------------===// |
| 138 | |
| 139 | /// Casts a `MlirTransformRewriter` to a `MlirRewriterBase`. |
| 140 | MlirRewriterBase mlirTransformRewriterAsBase(MlirTransformRewriter rewriter) { |
| 141 | mlir::transform::TransformRewriter *t = unwrap(c: rewriter); |
| 142 | mlir::RewriterBase *base = static_cast<mlir::RewriterBase *>(t); |
| 143 | return wrap(cpp: base); |
| 144 | } |
| 145 | |
| 146 | //===---------------------------------------------------------------------===// |
| 147 | // TransformResults |
| 148 | //===---------------------------------------------------------------------===// |
| 149 | |
| 150 | void mlirTransformResultsSetOps(MlirTransformResults results, MlirValue result, |
| 151 | intptr_t numOps, MlirOperation *ops) { |
| 152 | SmallVector<Operation *> opsVec; |
| 153 | opsVec.reserve(N: numOps); |
| 154 | for (intptr_t i = 0; i < numOps; ++i) |
| 155 | opsVec.push_back(Elt: unwrap(c: ops[i])); |
| 156 | unwrap(c: results)->set(value: cast<OpResult>(Val: unwrap(c: result)), ops&: opsVec); |
| 157 | } |
| 158 | |
| 159 | void mlirTransformResultsSetValues(MlirTransformResults results, |
| 160 | MlirValue result, intptr_t numValues, |
| 161 | MlirValue *values) { |
| 162 | SmallVector<Value> valuesVec; |
| 163 | valuesVec.reserve(N: numValues); |
| 164 | for (intptr_t i = 0; i < numValues; ++i) |
| 165 | valuesVec.push_back(Elt: unwrap(c: values[i])); |
| 166 | unwrap(c: results)->setValues(handle: cast<OpResult>(Val: unwrap(c: result)), values&: valuesVec); |
| 167 | } |
| 168 | |
| 169 | void mlirTransformResultsSetParams(MlirTransformResults results, |
| 170 | MlirValue result, intptr_t numParams, |
| 171 | MlirAttribute *params) { |
| 172 | SmallVector<Attribute> paramsVec; |
| 173 | paramsVec.reserve(N: numParams); |
| 174 | for (intptr_t i = 0; i < numParams; ++i) |
| 175 | paramsVec.push_back(Elt: unwrap(c: params[i])); |
| 176 | unwrap(c: results)->setParams(value: cast<OpResult>(Val: unwrap(c: result)), params: paramsVec); |
| 177 | } |
| 178 | |
| 179 | //===---------------------------------------------------------------------===// |
| 180 | // TransformState |
| 181 | //===---------------------------------------------------------------------===// |
| 182 | |
| 183 | void mlirTransformStateForEachPayloadOp(MlirTransformState state, |
| 184 | MlirValue value, |
| 185 | MlirOperationCallback callback, |
| 186 | void *userData) { |
| 187 | for (Operation *op : unwrap(c: state)->getPayloadOps(value: unwrap(c: value))) |
| 188 | callback(wrap(cpp: op), userData); |
| 189 | } |
| 190 | |
| 191 | void mlirTransformStateForEachPayloadValue(MlirTransformState state, |
| 192 | MlirValue value, |
| 193 | MlirValueCallback callback, |
| 194 | void *userData) { |
| 195 | for (Value val : unwrap(c: state)->getPayloadValues(handleValue: unwrap(c: value))) |
| 196 | callback(wrap(cpp: val), userData); |
| 197 | } |
| 198 | |
| 199 | void mlirTransformStateForEachParam(MlirTransformState state, MlirValue value, |
| 200 | MlirAttributeCallback callback, |
| 201 | void *userData) { |
| 202 | for (Attribute attr : unwrap(c: state)->getParams(value: unwrap(c: value))) |
| 203 | callback(wrap(cpp: attr), userData); |
| 204 | } |
| 205 | |
| 206 | //===---------------------------------------------------------------------===// |
| 207 | // TransformOpInterface |
| 208 | //===---------------------------------------------------------------------===// |
| 209 | |
| 210 | MlirTypeID mlirTransformOpInterfaceTypeID(void) { |
| 211 | return wrap(cpp: transform::TransformOpInterface::getInterfaceID()); |
| 212 | } |
| 213 | |
| 214 | /// Fallback model for the TransformOpInterface that uses C API callbacks. |
| 215 | class TransformOpInterfaceFallbackModel |
| 216 | : public mlir::transform::TransformOpInterface::FallbackModel< |
| 217 | TransformOpInterfaceFallbackModel> { |
| 218 | public: |
| 219 | /// Sets the callbacks that this FallbackModel will use. |
| 220 | /// NB: the callbacks can only be set through this method as the |
| 221 | /// RegisteredOperationName::attachInterface mechanism default-constructs |
| 222 | /// the FallbackModel without being able to provide arguments. |
| 223 | void setCallbacks(MlirTransformOpInterfaceCallbacks callbacks) { |
| 224 | this->callbacks = callbacks; |
| 225 | } |
| 226 | |
| 227 | ~TransformOpInterfaceFallbackModel() { |
| 228 | if (callbacks.destruct) |
| 229 | callbacks.destruct(callbacks.userData); |
| 230 | } |
| 231 | |
| 232 | static TypeID getInterfaceID() { |
| 233 | return transform::TransformOpInterface::getInterfaceID(); |
| 234 | } |
| 235 | |
| 236 | static bool classof(const mlir::transform::detail:: |
| 237 | TransformOpInterfaceInterfaceTraits::Concept *op) { |
| 238 | // Enable casting back to the FallbackModel from the Interface. This is |
| 239 | // necessary as attachInterface(...) default-constructs the FallbackModel |
| 240 | // without being able to pass in the callbacks and returns just the Concept. |
| 241 | return true; |
| 242 | } |
| 243 | |
| 244 | ::mlir::DiagnosedSilenceableFailure |
| 245 | apply(Operation *op, ::mlir::transform::TransformRewriter &rewriter, |
| 246 | ::mlir::transform::TransformResults &transformResults, |
| 247 | ::mlir::transform::TransformState &state) const { |
| 248 | assert(callbacks.apply && "apply callback not set" ); |
| 249 | |
| 250 | MlirDiagnosedSilenceableFailure status = |
| 251 | callbacks.apply(wrap(cpp: op), wrap(cpp: &rewriter), wrap(cpp: &transformResults), |
| 252 | wrap(cpp: &state), callbacks.userData); |
| 253 | |
| 254 | switch (status) { |
| 255 | case MlirDiagnosedSilenceableFailureSuccess: |
| 256 | return DiagnosedSilenceableFailure::success(); |
| 257 | case MlirDiagnosedSilenceableFailureSilenceableFailure: |
| 258 | // TODO: enable passing diagnostic info from C API to C++ API. |
| 259 | return DiagnosedSilenceableFailure::silenceableFailure(diag: std::move( |
| 260 | *(op->emitError() |
| 261 | << "TransformOpInterfaceFallbackModel: silenceable failure" ) |
| 262 | .getUnderlyingDiagnostic())); |
| 263 | case MlirDiagnosedSilenceableFailureDefiniteFailure: |
| 264 | return DiagnosedSilenceableFailure::definiteFailure(); |
| 265 | } |
| 266 | llvm_unreachable("unknown transform status" ); |
| 267 | } |
| 268 | |
| 269 | bool allowsRepeatedHandleOperands(Operation *op) const { |
| 270 | assert(callbacks.allowsRepeatedHandleOperands && |
| 271 | "allowsRepeatedHandleOperands callback not set" ); |
| 272 | return callbacks.allowsRepeatedHandleOperands(wrap(cpp: op), callbacks.userData); |
| 273 | } |
| 274 | |
| 275 | private: |
| 276 | MlirTransformOpInterfaceCallbacks callbacks; |
| 277 | }; |
| 278 | |
| 279 | /// Attach a TransformOpInterface FallbackModel to the given named operation. |
| 280 | /// The FallbackModel uses the provided callbacks to implement the interface. |
| 281 | void mlirTransformOpInterfaceAttachFallbackModel( |
| 282 | MlirContext ctx, MlirStringRef opName, |
| 283 | MlirTransformOpInterfaceCallbacks callbacks) { |
| 284 | // Look up the operation definition in the context. |
| 285 | std::optional<RegisteredOperationName> opInfo = |
| 286 | RegisteredOperationName::lookup(name: unwrap(ref: opName), ctx: unwrap(c: ctx)); |
| 287 | |
| 288 | assert(opInfo.has_value() && "operation not found in context" ); |
| 289 | |
| 290 | // NB: the following default-constructs the FallbackModel _without_ being able |
| 291 | // to provide arguments. |
| 292 | opInfo->attachInterface<TransformOpInterfaceFallbackModel>(); |
| 293 | // Cast to get the underlying FallbackModel and set the callbacks. |
| 294 | auto *model = cast<TransformOpInterfaceFallbackModel>( |
| 295 | Val: opInfo->getInterface<TransformOpInterfaceFallbackModel>()); |
| 296 | |
| 297 | assert(model && "Failed to get TransformOpInterfaceFallbackModel" ); |
| 298 | model->setCallbacks(callbacks); |
| 299 | } |
| 300 | |
| 301 | //===---------------------------------------------------------------------===// |
| 302 | // PatternDescriptorOpInterface |
| 303 | //===---------------------------------------------------------------------===// |
| 304 | |
| 305 | MlirTypeID mlirPatternDescriptorOpInterfaceTypeID(void) { |
| 306 | return wrap(cpp: transform::PatternDescriptorOpInterface::getInterfaceID()); |
| 307 | } |
| 308 | |
| 309 | /// Fallback model for the PatternDescriptorOpInterface that uses C API |
| 310 | /// callbacks. |
| 311 | class PatternDescriptorOpInterfaceFallbackModel |
| 312 | : public mlir::transform::PatternDescriptorOpInterface::FallbackModel< |
| 313 | PatternDescriptorOpInterfaceFallbackModel> { |
| 314 | public: |
| 315 | /// Sets the callbacks that this FallbackModel will use. |
| 316 | /// NB: the callbacks can only be set through this method as the |
| 317 | /// RegisteredOperationName::attachInterface mechanism default-constructs |
| 318 | /// the FallbackModel without being able to provide arguments. |
| 319 | void setCallbacks(MlirPatternDescriptorOpInterfaceCallbacks callbacks) { |
| 320 | this->callbacks = callbacks; |
| 321 | } |
| 322 | |
| 323 | ~PatternDescriptorOpInterfaceFallbackModel() { |
| 324 | if (callbacks.destruct) |
| 325 | callbacks.destruct(callbacks.userData); |
| 326 | } |
| 327 | |
| 328 | static TypeID getInterfaceID() { |
| 329 | return transform::PatternDescriptorOpInterface::getInterfaceID(); |
| 330 | } |
| 331 | |
| 332 | static bool |
| 333 | classof(const mlir::transform::detail:: |
| 334 | PatternDescriptorOpInterfaceInterfaceTraits::Concept *op) { |
| 335 | // Enable casting back to the FallbackModel from the Interface. This is |
| 336 | // necessary as attachInterface(...) default-constructs the FallbackModel |
| 337 | // without being able to pass in the callbacks and returns just the Concept. |
| 338 | return true; |
| 339 | } |
| 340 | |
| 341 | void populatePatterns(Operation *op, RewritePatternSet &patterns) const { |
| 342 | assert(callbacks.populatePatterns && "populatePatterns callback not set" ); |
| 343 | callbacks.populatePatterns(wrap(cpp: op), wrap(cpp: &patterns), callbacks.userData); |
| 344 | } |
| 345 | |
| 346 | void populatePatternsWithState(Operation *op, RewritePatternSet &patterns, |
| 347 | transform::TransformState &state) const { |
| 348 | if (callbacks.populatePatternsWithState) { |
| 349 | callbacks.populatePatternsWithState(wrap(cpp: op), wrap(cpp: &patterns), |
| 350 | wrap(cpp: &state), callbacks.userData); |
| 351 | } else { |
| 352 | // Default implementation: call populatePatterns without state. |
| 353 | populatePatterns(op, patterns); |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | private: |
| 358 | MlirPatternDescriptorOpInterfaceCallbacks callbacks; |
| 359 | }; |
| 360 | |
| 361 | /// Attach a PatternDescriptorOpInterface FallbackModel to the given named |
| 362 | /// operation. The FallbackModel uses the provided callbacks to implement the |
| 363 | /// interface. |
| 364 | void mlirPatternDescriptorOpInterfaceAttachFallbackModel( |
| 365 | MlirContext ctx, MlirStringRef opName, |
| 366 | MlirPatternDescriptorOpInterfaceCallbacks callbacks) { |
| 367 | // Look up the operation definition in the context. |
| 368 | std::optional<RegisteredOperationName> opInfo = |
| 369 | RegisteredOperationName::lookup(name: unwrap(ref: opName), ctx: unwrap(c: ctx)); |
| 370 | |
| 371 | assert(opInfo.has_value() && "operation not found in context" ); |
| 372 | |
| 373 | // NB: the following default-constructs the FallbackModel _without_ being able |
| 374 | // to provide arguments. |
| 375 | opInfo->attachInterface<PatternDescriptorOpInterfaceFallbackModel>(); |
| 376 | // Cast to get the underlying FallbackModel and set the callbacks. |
| 377 | auto *model = cast<PatternDescriptorOpInterfaceFallbackModel>( |
| 378 | Val: opInfo->getInterface<PatternDescriptorOpInterfaceFallbackModel>()); |
| 379 | |
| 380 | assert(model && "Failed to get PatternDescriptorOpInterfaceFallbackModel" ); |
| 381 | model->setCallbacks(callbacks); |
| 382 | } |
| 383 | |
| 384 | //===---------------------------------------------------------------------===// |
| 385 | // MemoryEffectsOpInterface helpers |
| 386 | //===---------------------------------------------------------------------===// |
| 387 | |
| 388 | static void invokeMemoryEffectInstancesCallback( |
| 389 | SmallVectorImpl<MemoryEffects::EffectInstance> &effects, |
| 390 | MlirMemoryEffectInstancesCallback callback, void *userData) { |
| 391 | SmallVector<MlirMemoryEffectInstance> wrappedEffects; |
| 392 | wrappedEffects.reserve(N: effects.size()); |
| 393 | for (MemoryEffects::EffectInstance &effect : effects) |
| 394 | wrappedEffects.push_back(Elt: wrap(cpp: &effect)); |
| 395 | callback(wrappedEffects.size(), wrappedEffects.data(), userData); |
| 396 | } |
| 397 | |
| 398 | /// Set the effect for the operands to only read the transform handles. |
| 399 | void mlirTransformOnlyReadsHandle(MlirOpOperand *operands, intptr_t numOperands, |
| 400 | MlirMemoryEffectInstancesCallback callback, |
| 401 | void *userData) { |
| 402 | MutableArrayRef<OpOperand> operandArray; |
| 403 | if (numOperands != 0) |
| 404 | operandArray = MutableArrayRef<OpOperand>(unwrap(c: *operands), numOperands); |
| 405 | SmallVector<MemoryEffects::EffectInstance> effects; |
| 406 | transform::onlyReadsHandle(handles: operandArray, effects); |
| 407 | invokeMemoryEffectInstancesCallback(effects, callback, userData); |
| 408 | } |
| 409 | |
| 410 | /// Set the effect for the operands to consuming the transform handles. |
| 411 | void mlirTransformConsumesHandle(MlirOpOperand *operands, intptr_t numOperands, |
| 412 | MlirMemoryEffectInstancesCallback callback, |
| 413 | void *userData) { |
| 414 | MutableArrayRef<OpOperand> operandArray; |
| 415 | if (numOperands != 0) |
| 416 | operandArray = MutableArrayRef<OpOperand>(unwrap(c: *operands), numOperands); |
| 417 | SmallVector<MemoryEffects::EffectInstance> effects; |
| 418 | transform::consumesHandle(handles: operandArray, effects); |
| 419 | invokeMemoryEffectInstancesCallback(effects, callback, userData); |
| 420 | } |
| 421 | |
| 422 | /// Set the effect for the results to that they produce transform handles. |
| 423 | void mlirTransformProducesHandle(MlirValue *results, intptr_t numResults, |
| 424 | MlirMemoryEffectInstancesCallback callback, |
| 425 | void *userData) { |
| 426 | // NB: calling `producesHandle()` `numResults` as we cannot cast array of |
| 427 | // `OpResult`s to a single `ResultRange` (and neither is `ResultRange` exposed |
| 428 | // to Python). `producesHandle` iterates over the given `ResultRange` anyway. |
| 429 | SmallVector<MemoryEffects::EffectInstance> effects; |
| 430 | for (intptr_t i = 0; i < numResults; ++i) { |
| 431 | auto opResult = cast<OpResult>(Val: unwrap(c: results[i])); |
| 432 | transform::producesHandle(handles: ResultRange(opResult), effects); |
| 433 | } |
| 434 | invokeMemoryEffectInstancesCallback(effects, callback, userData); |
| 435 | } |
| 436 | |
| 437 | /// Set the effect of potentially modifying payload IR. |
| 438 | void mlirTransformModifiesPayload(MlirMemoryEffectInstancesCallback callback, |
| 439 | void *userData) { |
| 440 | SmallVector<MemoryEffects::EffectInstance> effects; |
| 441 | transform::modifiesPayload(effects); |
| 442 | invokeMemoryEffectInstancesCallback(effects, callback, userData); |
| 443 | } |
| 444 | |
| 445 | /// Set the effect of potentially reading payload IR. |
| 446 | void mlirTransformOnlyReadsPayload(MlirMemoryEffectInstancesCallback callback, |
| 447 | void *userData) { |
| 448 | SmallVector<MemoryEffects::EffectInstance> effects; |
| 449 | transform::onlyReadsPayload(effects); |
| 450 | invokeMemoryEffectInstancesCallback(effects, callback, userData); |
| 451 | } |
| 452 | |