Changeset 10258 in webkit for trunk/JavaScriptCore/kjs


Ignore:
Timestamp:
Aug 19, 2005, 9:01:56 AM (20 years ago)
Author:
darin
Message:

Reviewed by Maciej.
Revised and landed by Darin.

  • kjs/nodes.cpp: (AssignResolveNode::evaluate): Remove unneeded "isSet" assertion. (AssignBracketNode::evaluate): Replace code that tested "isSet" with code that tests the return value of getPropertySlot.
  • kjs/property_slot.h: Removed unneeded "isSet" function. Property slots are either uninitialized or set. There's no "initialized and not set" state.
Location:
trunk/JavaScriptCore/kjs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes.cpp

    r10222 r10258  
    1 // -*- c-basic-offset: 2 -*-
    21/*
    32 *  This file is part of the KDE libraries
     
    16761675    v = m_right->evaluate(exec);
    16771676  } else {
    1678     assert(slot.isSet());
    16791677    ValueImp *v1 = slot.getValue(exec, m_ident);
    16801678    KJS_CHECKEXCEPTIONVALUE
     
    17741772    } else {
    17751773      PropertySlot slot;
    1776       base->getPropertySlot(exec, propertyIndex, slot);   
    1777       ValueImp *v1 = slot.isSet() ? slot.getValue(exec, propertyIndex) : Undefined();
     1774      ValueImp *v1 = base->getPropertySlot(exec, propertyIndex, slot) ? slot.getValue(exec, propertyIndex) : Undefined();
    17781775      KJS_CHECKEXCEPTIONVALUE
    17791776      ValueImp *v2 = m_right->evaluate(exec);
     
    17941791  } else {
    17951792    PropertySlot slot;
    1796     base->getPropertySlot(exec, propertyName, slot);   
    1797     ValueImp *v1 = slot.isSet() ? slot.getValue(exec, propertyName) : Undefined();
     1793    ValueImp *v1 = base->getPropertySlot(exec, propertyName, slot) ? slot.getValue(exec, propertyName) : Undefined();
    17981794    KJS_CHECKEXCEPTIONVALUE
    17991795    ValueImp *v2 = m_right->evaluate(exec);
  • trunk/JavaScriptCore/kjs/property_slot.h

    r10135 r10258  
    2121 */
    2222
    23 #ifndef _KJS_PROPERTY_SLOT_H_
    24 #define _KJS_PROPERTY_SLOT_H_
     23#ifndef KJS_PROPERTY_SLOT_H
     24#define KJS_PROPERTY_SLOT_H
    2525
    2626#include "identifier.h"
     
    3838public:
    3939    typedef ValueImp *(*GetValueFunc)(ExecState *, const Identifier&, const PropertySlot&);
    40 
    41     bool isSet() const { return m_getValue != 0; }
    4240
    4341    ValueImp *getValue(ExecState *exec, const Identifier& propertyName) const
     
    6462    void setStaticEntry(ObjectImp *slotBase, const HashEntry *staticEntry, GetValueFunc getValue)
    6563    {
     64        assert(getValue);
    6665        m_slotBase = slotBase;
    6766        m_data.staticEntry = staticEntry;
     
    7170    void setCustom(ObjectImp *slotBase, GetValueFunc getValue)
    7271    {
     72        assert(getValue);
    7373        m_slotBase = slotBase;
    7474        m_getValue = getValue;
     
    7777    void setCustomIndex(ObjectImp *slotBase, unsigned long index, GetValueFunc getValue)
    7878    {
     79        assert(getValue);
    7980        m_slotBase = slotBase;
    8081        m_data.index = index;
Note: See TracChangeset for help on using the changeset viewer.