[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
xan at webkit.org
xan at webkit.org
Wed Dec 22 15:07:40 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 0b31aa529b1b0240de2b9f87ff5b2bc6b1f2a0ce
Author: xan at webkit.org <xan at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 28 07:00:37 2010 +0000
2010-10-28 Xan Lopez <xlopez at igalia.com>
Reviewed by Oliver Hunt.
Do not have two different asCell APIs in JSValue
https://bugs.webkit.org/show_bug.cgi?id=47979
Remove JSCell* asCell(JSValue) in favor of only using
JSValue::asCell().
* API/APICast.h:
(toRef):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::testPrototype):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCachePutByID):
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* runtime/GetterSetter.h:
(JSC::asGetterSetter):
* runtime/JSByteArray.h:
(JSC::asByteArray):
* runtime/JSCell.h:
(JSC::JSCell::getCallData):
(JSC::JSCell::getConstructData):
* runtime/JSString.h:
(JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
(JSC::asString):
* runtime/JSValue.h:
* runtime/Operations.cpp:
(JSC::jsIsObjectType):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
* runtime/Protect.h:
(JSC::gcProtect):
(JSC::gcUnprotect):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/API/APICast.h b/JavaScriptCore/API/APICast.h
index ba00d02..4294d3d 100644
--- a/JavaScriptCore/API/APICast.h
+++ b/JavaScriptCore/API/APICast.h
@@ -111,8 +111,8 @@ inline JSValueRef toRef(JSC::ExecState* exec, JSC::JSValue v)
if (!v)
return 0;
if (!v.isCell())
- return reinterpret_cast<JSValueRef>(asCell(JSC::jsAPIValueWrapper(exec, v)));
- return reinterpret_cast<JSValueRef>(asCell(v));
+ return reinterpret_cast<JSValueRef>(JSC::jsAPIValueWrapper(exec, v).asCell());
+ return reinterpret_cast<JSValueRef>(v.asCell());
#else
UNUSED_PARAM(exec);
return reinterpret_cast<JSValueRef>(JSC::JSValue::encode(v));
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index ee304a9..3689319 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,40 @@
+2010-10-28 Xan Lopez <xlopez at igalia.com>
+
+ Reviewed by Oliver Hunt.
+
+ Do not have two different asCell APIs in JSValue
+ https://bugs.webkit.org/show_bug.cgi?id=47979
+
+ Remove JSCell* asCell(JSValue) in favor of only using
+ JSValue::asCell().
+
+ * API/APICast.h:
+ (toRef):
+ * jit/JITPropertyAccess32_64.cpp:
+ (JSC::JIT::testPrototype):
+ * jit/JITStubs.cpp:
+ (JSC::JITThunks::tryCachePutByID):
+ (JSC::JITThunks::tryCacheGetByID):
+ (JSC::DEFINE_STUB_FUNCTION):
+ * runtime/GetterSetter.h:
+ (JSC::asGetterSetter):
+ * runtime/JSByteArray.h:
+ (JSC::asByteArray):
+ * runtime/JSCell.h:
+ (JSC::JSCell::getCallData):
+ (JSC::JSCell::getConstructData):
+ * runtime/JSString.h:
+ (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
+ (JSC::asString):
+ * runtime/JSValue.h:
+ * runtime/Operations.cpp:
+ (JSC::jsIsObjectType):
+ * runtime/Operations.h:
+ (JSC::normalizePrototypeChain):
+ * runtime/Protect.h:
+ (JSC::gcProtect):
+ (JSC::gcUnprotect):
+
2010-10-27 Chao-ying Fu <fu at mips.com>
Reviewed by Oliver Hunt.
diff --git a/JavaScriptCore/interpreter/Interpreter.cpp b/JavaScriptCore/interpreter/Interpreter.cpp
index 29051bb..e8130fb 100644
--- a/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/JavaScriptCore/interpreter/Interpreter.cpp
@@ -1205,7 +1205,7 @@ NEVER_INLINE void Interpreter::tryCachePutByID(CallFrame* callFrame, CodeBlock*
return;
}
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* structure = baseCell->structure();
if (structure->isUncacheableDictionary()) {
@@ -1295,7 +1295,7 @@ NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock*
return;
}
- Structure* structure = asCell(baseValue)->structure();
+ Structure* structure = baseValue.asCell()->structure();
if (structure->isUncacheableDictionary()) {
vPC[0] = getOpcode(op_get_by_id_generic);
@@ -1633,7 +1633,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
NEXT_INSTRUCTION();
}
- callFrame->r(dst) = jsBoolean(!src.isCell() || !asCell(src)->structure()->typeInfo().masqueradesAsUndefined());
+ callFrame->r(dst) = jsBoolean(!src.isCell() || !src.asCell()->structure()->typeInfo().masqueradesAsUndefined());
vPC += OPCODE_LENGTH(op_neq_null);
NEXT_INSTRUCTION();
}
@@ -2492,7 +2492,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* structure = vPC[4].u.structure;
if (LIKELY(baseCell->structure() == structure)) {
@@ -2523,7 +2523,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* structure = vPC[4].u.structure;
if (LIKELY(baseCell->structure() == structure)) {
@@ -2562,7 +2562,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* structure = vPC[4].u.structure;
if (LIKELY(baseCell->structure() == structure)) {
@@ -2607,7 +2607,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* structure = vPC[4].u.structure;
if (LIKELY(baseCell->structure() == structure)) {
@@ -2688,7 +2688,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* structure = vPC[4].u.structure;
if (LIKELY(baseCell->structure() == structure)) {
@@ -2737,7 +2737,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* structure = vPC[4].u.structure;
if (LIKELY(baseCell->structure() == structure)) {
@@ -2780,7 +2780,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* structure = vPC[4].u.structure;
if (LIKELY(baseCell->structure() == structure)) {
@@ -2837,7 +2837,7 @@ skip_id_custom_self:
JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* structure = vPC[4].u.structure;
if (LIKELY(baseCell->structure() == structure)) {
@@ -2892,7 +2892,7 @@ skip_id_custom_self:
JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* structure = vPC[4].u.structure;
if (LIKELY(baseCell->structure() == structure)) {
@@ -3018,7 +3018,7 @@ skip_id_custom_self:
JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* oldStructure = vPC[4].u.structure;
Structure* newStructure = vPC[5].u.structure;
@@ -3070,7 +3070,7 @@ skip_id_custom_self:
JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* structure = vPC[4].u.structure;
if (LIKELY(baseCell->structure() == structure)) {
diff --git a/JavaScriptCore/jit/JITPropertyAccess32_64.cpp b/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
index f6280ef..710a155 100644
--- a/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
+++ b/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
@@ -595,10 +595,10 @@ void JIT::testPrototype(JSValue prototype, JumpList& failureCases)
// values. In the non X86_64 case, the generated code is slightly more efficient because it uses
// two less instructions and doesn't require any scratch registers.
#if CPU(X86_64)
- move(ImmPtr(asCell(prototype)->structure()), regT3);
- failureCases.append(branchPtr(NotEqual, AbsoluteAddress(&asCell(prototype)->m_structure), regT3));
+ move(ImmPtr(prototype.asCell()->structure()), regT3);
+ failureCases.append(branchPtr(NotEqual, AbsoluteAddress(&prototype.asCell()->m_structure), regT3));
#else
- failureCases.append(branchPtr(NotEqual, AbsoluteAddress(&asCell(prototype)->m_structure), ImmPtr(asCell(prototype)->structure())));
+ failureCases.append(branchPtr(NotEqual, AbsoluteAddress(&prototype.asCell()->m_structure), ImmPtr(prototype.asCell()->structure())));
#endif
}
diff --git a/JavaScriptCore/jit/JITStubs.cpp b/JavaScriptCore/jit/JITStubs.cpp
index e5cf503..62cdbf3 100644
--- a/JavaScriptCore/jit/JITStubs.cpp
+++ b/JavaScriptCore/jit/JITStubs.cpp
@@ -848,7 +848,7 @@ NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* co
return;
}
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* structure = baseCell->structure();
if (structure->isUncacheableDictionary()) {
@@ -916,7 +916,7 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co
return;
}
- JSCell* baseCell = asCell(baseValue);
+ JSCell* baseCell = baseValue.asCell();
Structure* structure = baseCell->structure();
if (structure->isUncacheableDictionary()) {
@@ -1561,7 +1561,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_method_check)
JSObject* slotBaseObject;
if (baseValue.isCell()
&& slot.isCacheableValue()
- && !(structure = asCell(baseValue)->structure())->isUncacheableDictionary()
+ && !(structure = baseValue.asCell()->structure())->isUncacheableDictionary()
&& (slotBaseObject = asObject(slot.slotBase()))->getPropertySpecificValue(callFrame, ident, specific)
&& specific
) {
@@ -1635,7 +1635,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_self_fail)
if (baseValue.isCell()
&& slot.isCacheable()
- && !asCell(baseValue)->structure()->isUncacheableDictionary()
+ && !baseValue.asCell()->structure()->isUncacheableDictionary()
&& slot.slotBase() == baseValue) {
CodeBlock* codeBlock = callFrame->codeBlock();
@@ -1656,7 +1656,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_self_fail)
}
if (listIndex < POLYMORPHIC_LIST_CACHE_SIZE) {
stubInfo->u.getByIdSelfList.listSize++;
- JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, polymorphicStructureList, listIndex, asCell(baseValue)->structure(), ident, slot, slot.cachedOffset());
+ JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, polymorphicStructureList, listIndex, baseValue.asCell()->structure(), ident, slot, slot.cachedOffset());
if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
@@ -1740,12 +1740,12 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
CHECK_FOR_EXCEPTION();
- if (!baseValue.isCell() || !slot.isCacheable() || asCell(baseValue)->structure()->isDictionary()) {
+ if (!baseValue.isCell() || !slot.isCacheable() || baseValue.asCell()->structure()->isDictionary()) {
ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
return JSValue::encode(result);
}
- Structure* structure = asCell(baseValue)->structure();
+ Structure* structure = baseValue.asCell()->structure();
CodeBlock* codeBlock = callFrame->codeBlock();
StructureStubInfo* stubInfo = &codeBlock->getStubInfo(STUB_RETURN_ADDRESS);
@@ -1756,8 +1756,8 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
if (slot.slotBase() == baseValue)
ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
- else if (slot.slotBase() == asCell(baseValue)->structure()->prototypeForLookup(callFrame)) {
- ASSERT(!asCell(baseValue)->structure()->isDictionary());
+ else if (slot.slotBase() == baseValue.asCell()->structure()->prototypeForLookup(callFrame)) {
+ ASSERT(!baseValue.asCell()->structure()->isDictionary());
// Since we're accessing a prototype in a loop, it's a good bet that it
// should not be treated as a dictionary.
if (slotBaseObject->structure()->isDictionary()) {
@@ -1774,7 +1774,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
}
} else if (size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase(), propertyName, offset)) {
- ASSERT(!asCell(baseValue)->structure()->isDictionary());
+ ASSERT(!baseValue.asCell()->structure()->isDictionary());
int listIndex;
PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(stubInfo, listIndex);
@@ -2365,10 +2365,10 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_val)
if (LIKELY(baseValue.isCell() && subscript.isString())) {
Identifier propertyName(callFrame, asString(subscript)->value(callFrame));
- PropertySlot slot(asCell(baseValue));
+ PropertySlot slot(baseValue.asCell());
// JSString::value may have thrown, but we shouldn't find a property with a null identifier,
// so we should miss this case and wind up in the CHECK_FOR_EXCEPTION_AT_END, below.
- if (asCell(baseValue)->fastGetOwnPropertySlot(callFrame, propertyName, slot)) {
+ if (baseValue.asCell()->fastGetOwnPropertySlot(callFrame, propertyName, slot)) {
JSValue result = slot.getValue(callFrame, propertyName);
CHECK_FOR_EXCEPTION();
return JSValue::encode(result);
@@ -2901,14 +2901,14 @@ DEFINE_STUB_FUNCTION(int, op_eq)
start:
if (src2.isUndefined()) {
return src1.isNull() ||
- (src1.isCell() && asCell(src1)->structure()->typeInfo().masqueradesAsUndefined()) ||
- src1.isUndefined();
+ (src1.isCell() && src1.asCell()->structure()->typeInfo().masqueradesAsUndefined())
+ || src1.isUndefined();
}
if (src2.isNull()) {
return src1.isUndefined() ||
- (src1.isCell() && asCell(src1)->structure()->typeInfo().masqueradesAsUndefined()) ||
- src1.isNull();
+ (src1.isCell() && src1.asCell()->structure()->typeInfo().masqueradesAsUndefined())
+ || src1.isNull();
}
if (src1.isInt32()) {
@@ -2944,12 +2944,12 @@ DEFINE_STUB_FUNCTION(int, op_eq)
}
if (src1.isUndefined())
- return src2.isCell() && asCell(src2)->structure()->typeInfo().masqueradesAsUndefined();
+ return src2.isCell() && src2.asCell()->structure()->typeInfo().masqueradesAsUndefined();
if (src1.isNull())
- return src2.isCell() && asCell(src2)->structure()->typeInfo().masqueradesAsUndefined();
+ return src2.isCell() && src2.asCell()->structure()->typeInfo().masqueradesAsUndefined();
- JSCell* cell1 = asCell(src1);
+ JSCell* cell1 = src1.asCell();
if (cell1->isString()) {
if (src2.isInt32())
@@ -2964,7 +2964,7 @@ DEFINE_STUB_FUNCTION(int, op_eq)
if (src2.isFalse())
return jsToNumber(static_cast<JSString*>(cell1)->value(stackFrame.callFrame)) == 0.0;
- JSCell* cell2 = asCell(src2);
+ JSCell* cell2 = src2.asCell();
if (cell2->isString())
return static_cast<JSString*>(cell1)->value(stackFrame.callFrame) == static_cast<JSString*>(cell2)->value(stackFrame.callFrame);
diff --git a/JavaScriptCore/runtime/GetterSetter.h b/JavaScriptCore/runtime/GetterSetter.h
index 27ffbe7..e7b1938 100644
--- a/JavaScriptCore/runtime/GetterSetter.h
+++ b/JavaScriptCore/runtime/GetterSetter.h
@@ -64,8 +64,8 @@ namespace JSC {
inline GetterSetter* asGetterSetter(JSValue value)
{
- ASSERT(asCell(value)->isGetterSetter());
- return static_cast<GetterSetter*>(asCell(value));
+ ASSERT(value.asCell()->isGetterSetter());
+ return static_cast<GetterSetter*>(value.asCell());
}
diff --git a/JavaScriptCore/runtime/JSByteArray.h b/JavaScriptCore/runtime/JSByteArray.h
index 2ea9d29..44bae2d 100644
--- a/JavaScriptCore/runtime/JSByteArray.h
+++ b/JavaScriptCore/runtime/JSByteArray.h
@@ -106,7 +106,7 @@ namespace JSC {
JSByteArray* asByteArray(JSValue value);
inline JSByteArray* asByteArray(JSValue value)
{
- return static_cast<JSByteArray*>(asCell(value));
+ return static_cast<JSByteArray*>(value.asCell());
}
inline bool isJSByteArray(JSGlobalData* globalData, JSValue v) { return v.isCell() && v.asCell()->vptr() == globalData->jsByteArrayVPtr; }
diff --git a/JavaScriptCore/runtime/JSCell.h b/JavaScriptCore/runtime/JSCell.h
index 1a7f8b2..7d4929d 100644
--- a/JavaScriptCore/runtime/JSCell.h
+++ b/JavaScriptCore/runtime/JSCell.h
@@ -216,14 +216,14 @@ namespace JSC {
inline CallType getCallData(JSValue value, CallData& callData)
{
- CallType result = value.isCell() ? asCell(value)->getCallData(callData) : CallTypeNone;
+ CallType result = value.isCell() ? value.asCell()->getCallData(callData) : CallTypeNone;
ASSERT(result == CallTypeNone || value.isValidCallee());
return result;
}
inline ConstructType getConstructData(JSValue value, ConstructData& constructData)
{
- ConstructType result = value.isCell() ? asCell(value)->getConstructData(constructData) : ConstructTypeNone;
+ ConstructType result = value.isCell() ? value.asCell()->getConstructData(constructData) : ConstructTypeNone;
ASSERT(result == ConstructTypeNone || value.isValidCallee());
return result;
}
diff --git a/JavaScriptCore/runtime/JSString.h b/JavaScriptCore/runtime/JSString.h
index 7101d16..4d81a2f 100644
--- a/JavaScriptCore/runtime/JSString.h
+++ b/JavaScriptCore/runtime/JSString.h
@@ -379,8 +379,8 @@ namespace JSC {
void appendValueInConstructAndIncrementLength(ExecState* exec, unsigned& index, JSValue v)
{
if (v.isString()) {
- ASSERT(asCell(v)->isString());
- JSString* s = static_cast<JSString*>(asCell(v));
+ ASSERT(v.asCell()->isString());
+ JSString* s = static_cast<JSString*>(v.asCell());
ASSERT(s->fiberCount() == 1);
appendStringInConstruct(index, s);
m_length += s->length();
@@ -451,8 +451,8 @@ namespace JSC {
inline JSString* asString(JSValue value)
{
- ASSERT(asCell(value)->isString());
- return static_cast<JSString*>(asCell(value));
+ ASSERT(value.asCell()->isString());
+ return static_cast<JSString*>(value.asCell());
}
inline JSString* jsEmptyString(JSGlobalData* globalData)
diff --git a/JavaScriptCore/runtime/JSValue.h b/JavaScriptCore/runtime/JSValue.h
index 5e59e07..cad9662 100644
--- a/JavaScriptCore/runtime/JSValue.h
+++ b/JavaScriptCore/runtime/JSValue.h
@@ -357,14 +357,6 @@ namespace JSC {
inline bool operator!=(const JSValue a, const JSCell* b) { return a != JSValue(b); }
inline bool operator!=(const JSCell* a, const JSValue b) { return JSValue(a) != b; }
- // FIXME: We should deprecate this and just use JSValue::asCell() instead.
- JSCell* asCell(JSValue);
-
- inline JSCell* asCell(JSValue value)
- {
- return value.asCell();
- }
-
ALWAYS_INLINE int32_t JSValue::toInt32(ExecState* exec) const
{
if (isInt32())
diff --git a/JavaScriptCore/runtime/Operations.cpp b/JavaScriptCore/runtime/Operations.cpp
index de23e17..f129a80 100644
--- a/JavaScriptCore/runtime/Operations.cpp
+++ b/JavaScriptCore/runtime/Operations.cpp
@@ -85,7 +85,7 @@ bool jsIsObjectType(JSValue v)
if (!v.isCell())
return v.isNull();
- JSType type = asCell(v)->structure()->typeInfo().type();
+ JSType type = v.asCell()->structure()->typeInfo().type();
if (type == NumberType || type == StringType)
return false;
if (type == ObjectType) {
diff --git a/JavaScriptCore/runtime/Operations.h b/JavaScriptCore/runtime/Operations.h
index 80580c7..1252345 100644
--- a/JavaScriptCore/runtime/Operations.h
+++ b/JavaScriptCore/runtime/Operations.h
@@ -412,7 +412,7 @@ namespace JSC {
inline size_t normalizePrototypeChain(CallFrame* callFrame, JSValue base, JSValue slotBase, const Identifier& propertyName, size_t& slotOffset)
{
- JSCell* cell = asCell(base);
+ JSCell* cell = base.asCell();
size_t count = 0;
while (slotBase != cell) {
@@ -424,7 +424,7 @@ namespace JSC {
if (v.isNull())
return 0;
- cell = asCell(v);
+ cell = v.asCell();
// Since we're accessing a prototype in a loop, it's a good bet that it
// should not be treated as a dictionary.
@@ -449,7 +449,7 @@ namespace JSC {
if (v.isNull())
return count;
- base = asCell(v);
+ base = v.asCell();
// Since we're accessing a prototype in a loop, it's a good bet that it
// should not be treated as a dictionary.
diff --git a/JavaScriptCore/runtime/Protect.h b/JavaScriptCore/runtime/Protect.h
index a0d5443..06cf97f 100644
--- a/JavaScriptCore/runtime/Protect.h
+++ b/JavaScriptCore/runtime/Protect.h
@@ -52,13 +52,13 @@ namespace JSC {
inline void gcProtect(JSValue value)
{
if (value && value.isCell())
- gcProtect(asCell(value));
+ gcProtect(value.asCell());
}
inline void gcUnprotect(JSValue value)
{
if (value && value.isCell())
- gcUnprotect(asCell(value));
+ gcUnprotect(value.asCell());
}
// FIXME: Share more code with RefPtr template? The only differences are the ref/deref operation
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list