Changeset 1850 in webkit for trunk/JavaScriptCore/kjs/reference.h
- Timestamp:
- Aug 16, 2002, 12:07:48 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/reference.h
r1841 r1850 36 36 Reference(const Null& b, const UString& p); 37 37 Reference(const Null& b, unsigned p); 38 Reference(ReferenceImp *v);38 static Reference makeValueReference(const Value& v); 39 39 40 /**41 * Converts a Value into an Reference. If the value's type is not42 * ReferenceType, a null object will be returned (i.e. one with it's43 * internal pointer set to 0). If you do not know for sure whether the44 * value is of type ReferenceType, you should check the @ref isNull()45 * methods afterwards before calling any methods on the returned value.46 *47 * @return The value converted to an Reference48 */49 static Reference dynamicCast(const Value &v);50 51 40 /** 52 41 * Performs the GetBase type conversion operation on this value (ECMA 8.7) … … 55 44 * this method is guaranteed to return either Null() or an Object value. 56 45 */ 57 Value getBase(ExecState *exec) const { return rep->dispatchGetBase(exec); }46 Value getBase(ExecState *exec) const; 58 47 59 48 /** … … 61 50 * (ECMA 8.7) 62 51 */ 63 UString getPropertyName(ExecState *exec) const { return rep->dispatchGetPropertyName(exec); }52 UString getPropertyName(ExecState *exec) const; 64 53 65 54 /** … … 67 56 * (ECMA 8.7.1) 68 57 */ 69 Value getValue(ExecState *exec) const { return rep->dispatchGetValue(exec); }58 Value getValue(ExecState *exec) const; 70 59 71 60 /** … … 73 62 * (ECMA 8.7.1) 74 63 */ 75 void putValue(ExecState *exec, const Value &w) { rep->dispatchPutValue(exec, w); } 76 bool deleteValue(ExecState *exec) { return rep->dispatchDeleteValue(exec); } 77 bool isMutable() { return type() == ReferenceType; } 78 }; 64 void putValue(ExecState *exec, const Value &w); 65 bool deleteValue(ExecState *exec); 79 66 80 class ConstReference : public Reference { 81 public: 82 ConstReference(ValueImp *v); 67 bool isMutable(); 68 69 private: 70 Reference(); 71 72 Value base; 73 unsigned propertyNameAsNumber; 74 bool baseIsValue; 75 bool propertyNameIsNumber; 76 mutable UString prop; 83 77 }; 84 78 }
Note:
See TracChangeset
for help on using the changeset viewer.