~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
    return false;
91
91
}
92
92
 
93
 
bool JSCell::getTruncatedInt32(int32_t&) const
94
 
{
95
 
    return false;
96
 
}
97
 
 
98
 
bool JSCell::getTruncatedUInt32(uint32_t&) const
99
 
{
100
 
    return false;
101
 
}
102
 
 
103
 
bool JSCell::getNumber(double& numericValue) const
104
 
{
105
 
    if (!isNumber())
106
 
        return false;
107
 
    numericValue = static_cast<const JSNumberCell*>(this)->value();
108
 
    return true;
109
 
}
110
 
 
111
 
double JSCell::getNumber() const
112
 
{
113
 
    return isNumber() ? static_cast<const JSNumberCell*>(this)->value() : NaN;
114
 
}
115
 
 
116
93
bool JSCell::getString(UString&stringValue) const
117
94
{
118
95
    if (!isString())
128
105
 
129
106
JSObject* JSCell::getObject()
130
107
{
131
 
    return isObject() ? static_cast<JSObject*>(this) : 0;
 
108
    return isObject() ? asObject(this) : 0;
132
109
}
133
110
 
134
111
const JSObject* JSCell::getObject() const
170
147
    return true;
171
148
}
172
149
 
173
 
void JSCell::put(ExecState* exec, const Identifier& identifier, JSValuePtr value, PutPropertySlot& slot)
 
150
void JSCell::put(ExecState* exec, const Identifier& identifier, JSValue value, PutPropertySlot& slot)
174
151
{
175
152
    toObject(exec)->put(exec, identifier, value, slot);
176
153
}
177
154
 
178
 
void JSCell::put(ExecState* exec, unsigned identifier, JSValuePtr value)
 
155
void JSCell::put(ExecState* exec, unsigned identifier, JSValue value)
179
156
{
180
157
    toObject(exec)->put(exec, identifier, value);
181
158
}
210
187
    return 0;
211
188
}
212
189
 
213
 
JSValuePtr JSCell::getJSNumber()
 
190
JSValue JSCell::getJSNumber()
214
191
{
215
 
    return noValue();
 
192
    return JSValue();
216
193
}
217
194
 
218
195
bool JSCell::isGetterSetter() const
220
197
    return false;
221
198
}
222
199
 
 
200
JSValue JSCell::toPrimitive(ExecState*, PreferredPrimitiveType) const
 
201
{
 
202
    ASSERT_NOT_REACHED();
 
203
    return JSValue();
 
204
}
 
205
 
 
206
bool JSCell::getPrimitiveNumber(ExecState*, double&, JSValue&)
 
207
{
 
208
    ASSERT_NOT_REACHED();
 
209
    return false;
 
210
}
 
211
 
 
212
bool JSCell::toBoolean(ExecState*) const
 
213
{
 
214
    ASSERT_NOT_REACHED();
 
215
    return false;
 
216
}
 
217
 
 
218
double JSCell::toNumber(ExecState*) const
 
219
{
 
220
    ASSERT_NOT_REACHED();
 
221
    return 0;
 
222
}
 
223
 
 
224
UString JSCell::toString(ExecState*) const
 
225
{
 
226
    ASSERT_NOT_REACHED();
 
227
    return UString();
 
228
}
 
229
 
 
230
JSObject* JSCell::toObject(ExecState*) const
 
231
{
 
232
    ASSERT_NOT_REACHED();
 
233
    return 0;
 
234
}
 
235
 
223
236
} // namespace JSC