| 1 | /* |
| 2 | * Copyright (c) 2015 Canon Inc. |
| 3 | * Copyright (c) 2016 Apple Inc. All rights reserved. |
| 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions |
| 7 | * are met: |
| 8 | * 1. Redistributions of source code must retain the above copyright |
| 9 | * notice, this list of conditions and the following disclaimer. |
| 10 | * 2. Redistributions in binary form must reproduce the above copyright |
| 11 | * notice, this list of conditions and the following disclaimer in the |
| 12 | * documentation and/or other materials provided with the distribution. |
| 13 | * |
| 14 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
| 15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 16 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 17 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
| 18 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 21 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 22 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 23 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 24 | * THE POSSIBILITY OF SUCH DAMAGE. |
| 25 | * |
| 26 | */ |
| 27 | |
| 28 | // DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for |
| 29 | // builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py |
| 30 | |
| 31 | #include "config.h" |
| 32 | #include "CountQueuingStrategyBuiltins.h" |
| 33 | |
| 34 | #if ENABLE(STREAMS_API) |
| 35 | |
| 36 | #include "WebCoreJSClientData.h" |
| 37 | #include <JavaScriptCore/HeapInlines.h> |
| 38 | #include <JavaScriptCore/IdentifierInlines.h> |
| 39 | #include <JavaScriptCore/Intrinsic.h> |
| 40 | #include <JavaScriptCore/JSCJSValueInlines.h> |
| 41 | #include <JavaScriptCore/JSCellInlines.h> |
| 42 | #include <JavaScriptCore/StructureInlines.h> |
| 43 | #include <JavaScriptCore/VM.h> |
| 44 | |
| 45 | namespace WebCore { |
| 46 | |
| 47 | const JSC::ConstructAbility s_countQueuingStrategySizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; |
| 48 | const int s_countQueuingStrategySizeCodeLength = 51; |
| 49 | static const JSC::Intrinsic s_countQueuingStrategySizeCodeIntrinsic = JSC::NoIntrinsic; |
| 50 | const char* const s_countQueuingStrategySizeCode = |
| 51 | "(function ()\n" \ |
| 52 | "{\n" \ |
| 53 | " \"use strict\";\n" \ |
| 54 | "\n" \ |
| 55 | " return 1;\n" \ |
| 56 | "})\n" \ |
| 57 | ; |
| 58 | |
| 59 | const JSC::ConstructAbility s_countQueuingStrategyInitializeCountQueuingStrategyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; |
| 60 | const int s_countQueuingStrategyInitializeCountQueuingStrategyCodeLength = 226; |
| 61 | static const JSC::Intrinsic s_countQueuingStrategyInitializeCountQueuingStrategyCodeIntrinsic = JSC::NoIntrinsic; |
| 62 | const char* const s_countQueuingStrategyInitializeCountQueuingStrategyCode = |
| 63 | "(function (parameters)\n" \ |
| 64 | "{\n" \ |
| 65 | " \"use strict\";\n" \ |
| 66 | "\n" \ |
| 67 | " @Object.@defineProperty(this, \"highWaterMark\", {\n" \ |
| 68 | " value: parameters.highWaterMark,\n" \ |
| 69 | " configurable: true,\n" \ |
| 70 | " enumerable: true,\n" \ |
| 71 | " writable: true\n" \ |
| 72 | " });\n" \ |
| 73 | "})\n" \ |
| 74 | ; |
| 75 | |
| 76 | |
| 77 | #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ |
| 78 | JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ |
| 79 | {\ |
| 80 | JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \ |
| 81 | return clientData->builtinFunctions().countQueuingStrategyBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().countQueuingStrategyBuiltins().codeName##Source(), WTF::nullopt, s_##codeName##Intrinsic); \ |
| 82 | } |
| 83 | WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR) |
| 84 | #undef DEFINE_BUILTIN_GENERATOR |
| 85 | |
| 86 | |
| 87 | } // namespace WebCore |
| 88 | |
| 89 | #endif // ENABLE(STREAMS_API) |
| 90 | |