| 1 | /* |
| 2 | * Copyright (C) 1999-2002 Harri Porten ([email protected]) |
| 3 | * Copyright (C) 2001 Peter Kelly ([email protected]) |
| 4 | * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 5 | * Copyright (C) 2007 Cameron Zwarich ([email protected]) |
| 6 | * Copyright (C) 2007 Maks Orlovich |
| 7 | * |
| 8 | * This library is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU Library General Public |
| 10 | * License as published by the Free Software Foundation; either |
| 11 | * version 2 of the License, or (at your option) any later version. |
| 12 | * |
| 13 | * This library is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 | * Library General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU Library General Public License |
| 19 | * along with this library; see the file COPYING.LIB. If not, write to |
| 20 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 21 | * Boston, MA 02110-1301, USA. |
| 22 | * |
| 23 | */ |
| 24 | |
| 25 | #include "config.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/config.h`/ |
| 26 | #include "Arguments.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Arguments.h`/ |
| 27 | |
| 28 | #include "JSActivation.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSActivation.h`/ |
| 29 | #include "JSFunction.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSFunction.h`/ |
| 30 | #include "JSGlobalObject.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h`/ |
| 31 | |
| 32 | using namespace std; |
| 33 | |
| 34 | namespace JSCcxx . . $ `<built-in>:463:9`! { |
| 35 | |
| 36 | ASSERT_CLASS_FITS_IN_CELLcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h:42:9`!(Arguments); |
| 37 | |
| 38 | const ClassInfocxx . . $ QTJSC/ClassInfo# Argumentscxx . . $ QTJSC/Arguments#::infocxx . . $ QTJSC/Arguments#info. = { "Arguments", 0, 0, 0 }; |
| 39 | |
| 40 | Argumentscxx . . $ QTJSC/Arguments#::~cxx . . $ QTJSC/Arguments#`~Arguments`(49f6e7a06ebc5aa8).Argumentscxx . . $ QTJSC/Arguments#() |
| 41 | { |
| 42 | if (d->extraArguments != d->extraArgumentsFixedBuffer) |
| 43 | delete [] d->extraArguments; |
| 44 | } |
| 45 | |
| 46 | void Argumentscxx . . $ QTJSC/Arguments#::markChildrencxx . . $ QTJSC/Arguments#markChildren(bd9cae851d80a865).(MarkStackcxx . . $ QTJSC/MarkStack#& markStack) |
| 47 | { |
| 48 | JSObjectcxx . . $ QTJSC/JSObject#::markChildrencxx . . $ QTJSC/JSObject#markChildren(bd9cae851d80a865).(markStack); |
| 49 | |
| 50 | if (d->registerArray) |
| 51 | markStack.appendValuescxx . . $ QTJSC/MarkStack#appendValues(43883644a1fa3f52).(reinterpret_cast<JSValue*>(d->registerArray.get()), d->numParameters); |
| 52 | |
| 53 | if (d->extraArguments) { |
| 54 | unsigned numExtraArguments = d->numArguments - d->numParameters; |
| 55 | markStack.appendValuescxx . . $ QTJSC/MarkStack#appendValues(43883644a1fa3f52).(reinterpret_cast<JSValue*>(d->extraArguments), numExtraArguments); |
| 56 | } |
| 57 | |
| 58 | markStack.appendcxx . . $ QTJSC/MarkStack#append(c6d88d3bdacccd64).(d->callee); |
| 59 | |
| 60 | if (d->activation) |
| 61 | markStack.appendcxx . . $ QTJSC/MarkStack#append(c6d88d3bdacccd64).(d->activation); |
| 62 | } |
| 63 | |
| 64 | void Argumentscxx . . $ QTJSC/Arguments#::copyToRegisterscxx . . $ QTJSC/Arguments#copyToRegisters(d632f462723cc6fe).(ExecStatecxx . . $ QTJSC/ExecState#* exec, Registercxx . . $ QTJSC/Register#* buffer, uint32_tcxx . . $ uint32_t# maxSize) |
| 65 | { |
| 66 | if (UNLIKELYcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:45:9`!(d->overrodeLength)) { |
| 67 | unsigned length = mincxx . . $ std/min(2a338fce5842aa6a).(getcxx . . $ QTJSC/JSObject#get(2d9c2221088d2593).(exec, exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().length).toUInt32(exec), maxSize); |
| 68 | for (unsigned i = 0; i < length; i++) |
| 69 | buffer[i] =cxx . . $ QTJSC/Register#`operator=`(812d218e081e87f4). getcxx . . $ QTJSC/JSObject#get(2d9c2221088d2593).(exec, i); |
| 70 | return; |
| 71 | } |
| 72 | |
| 73 | if (LIKELYcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:53:9`!(!d->deletedArguments)) { |
| 74 | unsigned parametersLength = mincxx . . $ std/min(2a338fce5842aa6a).(mincxx . . $ std/min(2a338fce5842aa6a).(d->numParameters, d->numArguments), maxSize); |
| 75 | unsigned i = 0; |
| 76 | for (; i < parametersLength; ++i) |
| 77 | buffer[i] = d->registers[d->firstParameterIndex + i].jsValue(); |
| 78 | for (; i < d->numArguments; ++i) |
| 79 | buffer[i] = d->extraArguments[i - d->numParameters].jsValue(); |
| 80 | return; |
| 81 | } |
| 82 | |
| 83 | unsigned parametersLength = mincxx . . $ std/min(2a338fce5842aa6a).(mincxx . . $ std/min(2a338fce5842aa6a).(d->numParameters, d->numArguments), maxSize); |
| 84 | unsigned i = 0; |
| 85 | for (; i < parametersLength; ++i) { |
| 86 | if (!d->deletedArguments[i]) |
| 87 | buffer[i] = d->registers[d->firstParameterIndex + i].jsValue(); |
| 88 | else |
| 89 | buffer[i] =cxx . . $ QTJSC/Register#`operator=`(812d218e081e87f4). getcxx . . $ QTJSC/JSObject#get(2d9c2221088d2593).(exec, i); |
| 90 | } |
| 91 | for (; i < d->numArguments; ++i) { |
| 92 | if (!d->deletedArguments[i]) |
| 93 | buffer[i] = d->extraArguments[i - d->numParameters].jsValue(); |
| 94 | else |
| 95 | buffer[i] =cxx . . $ QTJSC/Register#`operator=`(812d218e081e87f4). getcxx . . $ QTJSC/JSObject#get(2d9c2221088d2593).(exec, i); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | void Argumentscxx . . $ QTJSC/Arguments#::fillArgListcxx . . $ QTJSC/Arguments#fillArgList(eebde0cafc55d4c7).(ExecStatecxx . . $ QTJSC/ExecState#* exec, MarkedArgumentBuffercxx . . $ QTJSC/MarkedArgumentBuffer#& args) |
| 100 | { |
| 101 | if (UNLIKELYcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:45:9`!(d->overrodeLength)) { |
| 102 | unsigned length = getcxx . . $ QTJSC/JSObject#get(2d9c2221088d2593).(exec, exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().length).toUInt32(exec); |
| 103 | for (unsigned i = 0; i < length; i++) |
| 104 | args.appendcxx . . $ QTJSC/MarkedArgumentBuffer#append(5c2ac18db087b3e6).(getcxx . . $ QTJSC/JSObject#get(2d9c2221088d2593).(exec, i)); |
| 105 | return; |
| 106 | } |
| 107 | |
| 108 | if (LIKELYcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:53:9`!(!d->deletedArguments)) { |
| 109 | if (LIKELYcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:53:9`!(!d->numParameters)) { |
| 110 | args.initializecxx . . $ QTJSC/MarkedArgumentBuffer#initialize(827bdbb6e55a83f6).(d->extraArguments, d->numArguments); |
| 111 | return; |
| 112 | } |
| 113 | |
| 114 | if (d->numParameters == d->numArguments) { |
| 115 | args.initializecxx . . $ QTJSC/MarkedArgumentBuffer#initialize(827bdbb6e55a83f6).(&d->registers[d->firstParameterIndex], d->numArguments); |
| 116 | return; |
| 117 | } |
| 118 | |
| 119 | unsigned parametersLength = mincxx . . $ std/min(2a338fce5842aa6a).(d->numParameters, d->numArguments); |
| 120 | unsigned i = 0; |
| 121 | for (; i < parametersLength; ++i) |
| 122 | args.appendcxx . . $ QTJSC/MarkedArgumentBuffer#append(5c2ac18db087b3e6).(d->registers[d->firstParameterIndex + i].jsValue()); |
| 123 | for (; i < d->numArguments; ++i) |
| 124 | args.appendcxx . . $ QTJSC/MarkedArgumentBuffer#append(5c2ac18db087b3e6).(d->extraArguments[i - d->numParameters].jsValue()); |
| 125 | return; |
| 126 | } |
| 127 | |
| 128 | unsigned parametersLength = mincxx . . $ std/min(2a338fce5842aa6a).(d->numParameters, d->numArguments); |
| 129 | unsigned i = 0; |
| 130 | for (; i < parametersLength; ++i) { |
| 131 | if (!d->deletedArguments[i]) |
| 132 | args.appendcxx . . $ QTJSC/MarkedArgumentBuffer#append(5c2ac18db087b3e6).(d->registers[d->firstParameterIndex + i].jsValue()); |
| 133 | else |
| 134 | args.appendcxx . . $ QTJSC/MarkedArgumentBuffer#append(5c2ac18db087b3e6).(getcxx . . $ QTJSC/JSObject#get(2d9c2221088d2593).(exec, i)); |
| 135 | } |
| 136 | for (; i < d->numArguments; ++i) { |
| 137 | if (!d->deletedArguments[i]) |
| 138 | args.appendcxx . . $ QTJSC/MarkedArgumentBuffer#append(5c2ac18db087b3e6).(d->extraArguments[i - d->numParameters].jsValue()); |
| 139 | else |
| 140 | args.appendcxx . . $ QTJSC/MarkedArgumentBuffer#append(5c2ac18db087b3e6).(getcxx . . $ QTJSC/JSObject#get(2d9c2221088d2593).(exec, i)); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | bool Argumentscxx . . $ QTJSC/Arguments#::getOwnPropertySlotcxx . . $ QTJSC/Arguments#getOwnPropertySlot(d57d1c8d4b24d235).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned i, PropertySlotcxx . . $ QTJSC/PropertySlot#& slot) |
| 145 | { |
| 146 | if (i < d->numArguments && (!d->deletedArguments || !d->deletedArguments[i])) { |
| 147 | if (i < d->numParameters) { |
| 148 | slot.setRegisterSlotcxx . . $ QTJSC/PropertySlot#setRegisterSlot(2654b274bd0f5c24).(&d->registers[d->firstParameterIndex + i]); |
| 149 | } else |
| 150 | slot.setValuecxx . . $ QTJSC/PropertySlot#setValue(5c2ac18db087b3e6).(d->extraArguments[i - d->numParameters].jsValue()); |
| 151 | return true; |
| 152 | } |
| 153 | |
| 154 | return JSObjectcxx . . $ QTJSC/JSObject#::getOwnPropertySlotcxx . . $ QTJSC/Arguments#getOwnPropertySlot(6f4ef3dbfe7d5ab9).(exec, Identifiercxx . . $ QTJSC/Identifier#Identifier(7710b6c66c0f9b39).(exec, UStringcxx . . $ QTJSC/UString#::fromcxx . . $ QTJSC/UString#from(54d53174fb977824).(i)), slot); |
| 155 | } |
| 156 | |
| 157 | bool Argumentscxx . . $ QTJSC/Arguments#::getOwnPropertySlotcxx . . $ QTJSC/Arguments#getOwnPropertySlot(6f4ef3dbfe7d5ab9).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, PropertySlotcxx . . $ QTJSC/PropertySlot#& slot) |
| 158 | { |
| 159 | bool isArrayIndex; |
| 160 | unsigned i = propertyName.toArrayIndexcxx . . $ QTJSC/Identifier#toArrayIndex(870b63f89c7fb98).(&isArrayIndex); |
| 161 | if (isArrayIndex && i < d->numArguments && (!d->deletedArguments || !d->deletedArguments[i])) { |
| 162 | if (i < d->numParameters) { |
| 163 | slot.setRegisterSlotcxx . . $ QTJSC/PropertySlot#setRegisterSlot(2654b274bd0f5c24).(&d->registers[d->firstParameterIndex + i]); |
| 164 | } else |
| 165 | slot.setValuecxx . . $ QTJSC/PropertySlot#setValue(5c2ac18db087b3e6).(d->extraArguments[i - d->numParameters].jsValue()); |
| 166 | return true; |
| 167 | } |
| 168 | |
| 169 | if (propertyName ==cxx . . $ QTJSC/`operator==`(8208a731c2dadbc2). exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().length && LIKELYcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:53:9`!(!d->overrodeLength)) { |
| 170 | slot.setValuecxx . . $ QTJSC/PropertySlot#setValue(5c2ac18db087b3e6).(jsNumbercxx . . $ QTJSC/jsNumber(88e66938454912cb).(exec, d->numArguments)); |
| 171 | return true; |
| 172 | } |
| 173 | |
| 174 | if (propertyName ==cxx . . $ QTJSC/`operator==`(8208a731c2dadbc2). exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().callee && LIKELYcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:53:9`!(!d->overrodeCallee)) { |
| 175 | slot.setValuecxx . . $ QTJSC/PropertySlot#setValue(5c2ac18db087b3e6).(d->callee); |
| 176 | return true; |
| 177 | } |
| 178 | |
| 179 | return JSObjectcxx . . $ QTJSC/JSObject#::getOwnPropertySlotcxx . . $ QTJSC/Arguments#getOwnPropertySlot(6f4ef3dbfe7d5ab9).(exec, propertyName, slot); |
| 180 | } |
| 181 | |
| 182 | bool Argumentscxx . . $ QTJSC/Arguments#::getOwnPropertyDescriptorcxx . . $ QTJSC/Arguments#getOwnPropertyDescriptor(dce4ef7012294c32).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, PropertyDescriptorcxx . . $ QTJSC/PropertyDescriptor#& descriptor) |
| 183 | { |
| 184 | bool isArrayIndex; |
| 185 | unsigned i = propertyName.toArrayIndexcxx . . $ QTJSC/Identifier#toArrayIndex(870b63f89c7fb98).(&isArrayIndex); |
| 186 | if (isArrayIndex && i < d->numArguments && (!d->deletedArguments || !d->deletedArguments[i])) { |
| 187 | if (i < d->numParameters) { |
| 188 | descriptor.setDescriptorcxx . . $ QTJSC/PropertyDescriptor#setDescriptor(48358939f851dacc).(d->registers[d->firstParameterIndex + i].jsValue(), DontEnumcxx . . $ QTJSC/DontEnum.); |
| 189 | } else |
| 190 | descriptor.setDescriptorcxx . . $ QTJSC/PropertyDescriptor#setDescriptor(48358939f851dacc).(d->extraArguments[i - d->numParameters].jsValue(), DontEnumcxx . . $ QTJSC/DontEnum.); |
| 191 | return true; |
| 192 | } |
| 193 | |
| 194 | if (propertyName ==cxx . . $ QTJSC/`operator==`(8208a731c2dadbc2). exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().length && LIKELYcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:53:9`!(!d->overrodeLength)) { |
| 195 | descriptor.setDescriptorcxx . . $ QTJSC/PropertyDescriptor#setDescriptor(48358939f851dacc).(jsNumbercxx . . $ QTJSC/jsNumber(88e66938454912cb).(exec, d->numArguments), DontEnumcxx . . $ QTJSC/DontEnum.); |
| 196 | return true; |
| 197 | } |
| 198 | |
| 199 | if (propertyName ==cxx . . $ QTJSC/`operator==`(8208a731c2dadbc2). exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().callee && LIKELYcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:53:9`!(!d->overrodeCallee)) { |
| 200 | descriptor.setDescriptorcxx . . $ QTJSC/PropertyDescriptor#setDescriptor(48358939f851dacc).(d->callee, DontEnumcxx . . $ QTJSC/DontEnum.); |
| 201 | return true; |
| 202 | } |
| 203 | |
| 204 | return JSObjectcxx . . $ QTJSC/JSObject#::getOwnPropertyDescriptorcxx . . $ QTJSC/JSObject#getOwnPropertyDescriptor(dce4ef7012294c32).(exec, propertyName, descriptor); |
| 205 | } |
| 206 | |
| 207 | void Argumentscxx . . $ QTJSC/Arguments#::getOwnPropertyNamescxx . . $ QTJSC/Arguments#getOwnPropertyNames(2f9e3f18de200b4e).(ExecStatecxx . . $ QTJSC/ExecState#* exec, PropertyNameArraycxx . . $ QTJSC/PropertyNameArray#& propertyNames, EnumerationModecxx . . $ QTJSC/EnumerationMode# mode) |
| 208 | { |
| 209 | if (mode == IncludeDontEnumPropertiescxx . . $ QTJSC/IncludeDontEnumProperties.) { |
| 210 | for (unsigned i = 0; i < d->numArguments; ++i) { |
| 211 | if (!d->deletedArguments || !d->deletedArguments[i]) |
| 212 | propertyNames.addcxx . . $ QTJSC/PropertyNameArray#add(d7ed36c5537ed570).(Identifiercxx . . $ QTJSC/Identifier#Identifier(7710b6c66c0f9b39).(exec, UStringcxx . . $ QTJSC/UString#::fromcxx . . $ QTJSC/UString#from(54d53174fb977824).(i))); |
| 213 | } |
| 214 | propertyNames.addcxx . . $ QTJSC/PropertyNameArray#add(d7ed36c5537ed570).(exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().callee); |
| 215 | propertyNames.addcxx . . $ QTJSC/PropertyNameArray#add(d7ed36c5537ed570).(exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().length); |
| 216 | } |
| 217 | JSObjectcxx . . $ QTJSC/JSObject#::getOwnPropertyNamescxx . . $ QTJSC/JSObject#getOwnPropertyNames(2f9e3f18de200b4e).(exec, propertyNames, mode); |
| 218 | } |
| 219 | |
| 220 | void Argumentscxx . . $ QTJSC/Arguments#::putcxx . . $ QTJSC/Arguments#put(5d385f3b1a779840).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned i, JSValuecxx . . $ QTJSC/JSValue# value, PutPropertySlotcxx . . $ QTJSC/PutPropertySlot#& slot) |
| 221 | { |
| 222 | if (i < d->numArguments && (!d->deletedArguments || !d->deletedArguments[i])) { |
| 223 | if (i < d->numParameters) |
| 224 | d->registers[d->firstParameterIndex + i] = JSValue(value); |
| 225 | else |
| 226 | d->extraArguments[i - d->numParameters] = JSValue(value); |
| 227 | return; |
| 228 | } |
| 229 | |
| 230 | JSObjectcxx . . $ QTJSC/JSObject#::putcxx . . $ QTJSC/Arguments#put(5d385f3b1a779840).(exec, Identifiercxx . . $ QTJSC/Identifier#Identifier(7710b6c66c0f9b39).(exec, UStringcxx . . $ QTJSC/UString#::fromcxx . . $ QTJSC/UString#from(54d53174fb977824).(i)), value, slot); |
| 231 | } |
| 232 | |
| 233 | void Argumentscxx . . $ QTJSC/Arguments#::putcxx . . $ QTJSC/Arguments#put(dfb3133dafbe9ff4).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, JSValuecxx . . $ QTJSC/JSValue# value, PutPropertySlotcxx . . $ QTJSC/PutPropertySlot#& slot) |
| 234 | { |
| 235 | bool isArrayIndex; |
| 236 | unsigned i = propertyName.toArrayIndexcxx . . $ QTJSC/Identifier#toArrayIndex(870b63f89c7fb98).(&isArrayIndex); |
| 237 | if (isArrayIndex && i < d->numArguments && (!d->deletedArguments || !d->deletedArguments[i])) { |
| 238 | if (i < d->numParameters) |
| 239 | d->registers[d->firstParameterIndex + i] = JSValue(value); |
| 240 | else |
| 241 | d->extraArguments[i - d->numParameters] = JSValue(value); |
| 242 | return; |
| 243 | } |
| 244 | |
| 245 | if (propertyName == exec->propertyNames().length && !d->overrodeLength) { |
| 246 | d->overrodeLength = true; |
| 247 | putDirectcxx . . $ QTJSC/JSObject#putDirect(10adf5710ac333de).(propertyName, value, DontEnumcxx . . $ QTJSC/DontEnum.); |
| 248 | return; |
| 249 | } |
| 250 | |
| 251 | if (propertyName == exec->propertyNames().callee && !d->overrodeCallee) { |
| 252 | d->overrodeCallee = true; |
| 253 | putDirectcxx . . $ QTJSC/JSObject#putDirect(10adf5710ac333de).(propertyName, value, DontEnumcxx . . $ QTJSC/DontEnum.); |
| 254 | return; |
| 255 | } |
| 256 | |
| 257 | JSObjectcxx . . $ QTJSC/JSObject#::putcxx . . $ QTJSC/Arguments#put(5d385f3b1a779840).(exec, propertyName, value, slot); |
| 258 | } |
| 259 | |
| 260 | bool Argumentscxx . . $ QTJSC/Arguments#::deletePropertycxx . . $ QTJSC/Arguments#deleteProperty(2f8cbeb04562a47b).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned i) |
| 261 | { |
| 262 | if (i < d->numArguments) { |
| 263 | if (!d->deletedArguments) { |
| 264 | d->deletedArguments.set(new bool[d->numArguments]); |
| 265 | memset(d->deletedArguments.get(), 0, sizeof(bool) * d->numArguments); |
| 266 | } |
| 267 | if (!d->deletedArguments[i]) { |
| 268 | d->deletedArguments[i] = true; |
| 269 | return true; |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | return JSObjectcxx . . $ QTJSC/JSObject#::deletePropertycxx . . $ QTJSC/Arguments#deleteProperty(13154ef9bddc9416).(exec, Identifiercxx . . $ QTJSC/Identifier#Identifier(7710b6c66c0f9b39).(exec, UStringcxx . . $ QTJSC/UString#::fromcxx . . $ QTJSC/UString#from(54d53174fb977824).(i))); |
| 274 | } |
| 275 | |
| 276 | bool Argumentscxx . . $ QTJSC/Arguments#::deletePropertycxx . . $ QTJSC/Arguments#deleteProperty(13154ef9bddc9416).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName) |
| 277 | { |
| 278 | bool isArrayIndex; |
| 279 | unsigned i = propertyName.toArrayIndexcxx . . $ QTJSC/Identifier#toArrayIndex(870b63f89c7fb98).(&isArrayIndex); |
| 280 | if (isArrayIndex && i < d->numArguments) { |
| 281 | if (!d->deletedArguments) { |
| 282 | d->deletedArguments.set(new bool[d->numArguments]); |
| 283 | memset(d->deletedArguments.get(), 0, sizeof(bool) * d->numArguments); |
| 284 | } |
| 285 | if (!d->deletedArguments[i]) { |
| 286 | d->deletedArguments[i] = true; |
| 287 | return true; |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | if (propertyName == exec->propertyNames().length && !d->overrodeLength) { |
| 292 | d->overrodeLength = true; |
| 293 | return true; |
| 294 | } |
| 295 | |
| 296 | if (propertyName == exec->propertyNames().callee && !d->overrodeCallee) { |
| 297 | d->overrodeCallee = true; |
| 298 | return true; |
| 299 | } |
| 300 | |
| 301 | return JSObjectcxx . . $ QTJSC/JSObject#::deletePropertycxx . . $ QTJSC/Arguments#deleteProperty(13154ef9bddc9416).(exec, propertyName); |
| 302 | } |
| 303 | |
| 304 | } // namespace JSC |