Changeset 36036 in webkit for trunk/JavaScriptCore/kjs
- Timestamp:
- Sep 2, 2008, 7:58:14 PM (17 years ago)
- Location:
- trunk/JavaScriptCore/kjs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSCell.h
r36016 r36036 78 78 virtual JSObject* toObject(ExecState*) const = 0; 79 79 80 // WebCore uses this to make document.all and style.filter undetectable 81 virtual bool masqueradeAsUndefined() const { return false; } 82 80 83 // Garbage collection. 81 84 void* operator new(size_t, ExecState*); -
trunk/JavaScriptCore/kjs/JSObject.h
r36032 r36036 115 115 virtual bool getPropertyAttributes(ExecState*, const Identifier& propertyName, unsigned& attributes) const; 116 116 117 // WebCore uses this to make document.all and style.filter undetectable118 virtual bool masqueradeAsUndefined() const { return false; }119 120 117 // This get function only looks at the property map. 121 118 JSValue* getDirect(const Identifier& propertyName) const { return m_propertyMap.get(propertyName); } -
trunk/JavaScriptCore/kjs/nodes.cpp
r36016 r36036 744 744 RegisterID* BinaryOpNode::emitCode(CodeGenerator& generator, RegisterID* dst) 745 745 { 746 OpcodeID opcode = this->opcode(); 747 if (opcode == op_eq || opcode == op_neq) { 748 if (m_expr1->isNull() || m_expr2->isNull()) { 749 RefPtr<RegisterID> src = generator.emitNode(dst, m_expr1->isNull() ? m_expr2.get() : m_expr1.get()); 750 return generator.emitUnaryOp(opcode == op_eq ? op_eq_null : op_neq_null, generator.finalDestination(dst, src.get()), src.get()); 751 } 752 } 753 746 754 RefPtr<RegisterID> src1 = generator.emitNodeForLeftHandSide(m_expr1.get(), m_rightHasAssignments, m_expr2->isPure(generator)); 747 755 RegisterID* src2 = generator.emitNode(m_expr2.get()); 748 return generator.emitBinaryOp(opcode (), generator.finalDestination(dst, src1.get()), src1.get(), src2);756 return generator.emitBinaryOp(opcode, generator.finalDestination(dst, src1.get()), src1.get(), src2); 749 757 } 750 758 … … 1811 1819 proto->putDirect(exec->propertyNames().constructor, func, DontEnum); 1812 1820 func->putDirect(exec->propertyNames().prototype, proto, DontDelete); 1813 func->putDirect(exec->propertyNames().length, jsNumber(exec, m_body->parameters().size()), ReadOnly | DontDelete | DontEnum);1814 1821 return func; 1815 1822 } -
trunk/JavaScriptCore/kjs/nodes.h
r35986 r36036 209 209 virtual bool isNumber() const KJS_FAST_CALL { return false; } 210 210 virtual bool isString() const KJS_FAST_CALL { return false; } 211 virtual bool isNull() const KJS_FAST_CALL { return false; } 211 212 virtual bool isPure(CodeGenerator&) const KJS_FAST_CALL { return false; } 212 213 virtual bool isLocation() const KJS_FAST_CALL { return false; } … … 245 246 { 246 247 } 248 249 virtual bool isNull() const KJS_FAST_CALL { return true; } 247 250 248 251 virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
Note:
See TracChangeset
for help on using the changeset viewer.