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