Changeset 34921 in webkit for trunk/JavaScriptCore/kjs/JSString.h


Ignore:
Timestamp:
Jul 1, 2008, 10:32:44 AM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-07-01 Sam Weinig <[email protected]>

Reviewed by Darin Adler.

Split JSCell and JSNumberCell class declarations out of JSValue.h

  • GNUmakefile.am:
  • JavaScriptCore.pri:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • JavaScriptCoreSources.bkl:
  • VM/JSPropertyNameIterator.h:
  • kjs/AllInOneFile.cpp:
  • kjs/JSCell.cpp: Copied from JavaScriptCore/kjs/JSValue.cpp.
  • kjs/JSCell.h: Copied from JavaScriptCore/kjs/JSValue.h. (KJS::JSValue::getJSNumber):
  • kjs/JSNumberCell.cpp:
  • kjs/JSNumberCell.h: Copied from JavaScriptCore/kjs/JSValue.h.
  • kjs/JSObject.h:
  • kjs/JSString.cpp: (KJS::jsString): (KJS::jsOwnedString):
  • kjs/JSString.h: (KJS::JSValue::toThisJSString):
  • kjs/JSValue.cpp:
  • kjs/JSValue.h:

WebCore:

2008-07-01 Sam Weinig <[email protected]>

Reviewed by Darin Adler.

Split JSCell and JSNumberCell class declarations out of JSValue.h

  • ForwardingHeaders/kjs/JSNumberCell.h: Added.
  • bindings/scripts/CodeGeneratorJS.pm:
  • bridge/c/c_instance.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/JSString.h

    r34893 r34921  
    2626
    2727#include "CommonIdentifiers.h"
    28 #include "JSValue.h"
     28#include "JSCell.h"
    2929#include "PropertySlot.h"
    3030#include "identifier.h"
     
    6969  };
    7070
     71  JSString* jsString(ExecState*, const UString&); // returns empty string if passed null string
     72  JSString* jsString(ExecState*, const char* = ""); // returns empty string if passed 0
     73
     74  // Should be used for strings that are owned by an object that will
     75  // likely outlive the JSValue this makes, such as the parse tree or a
     76  // DOM object that contains a UString
     77  JSString* jsOwnedString(ExecState*, const UString&);
     78
    7179ALWAYS_INLINE bool JSString::getStringPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
    7280{
     
    96104}
    97105
    98 } // namespace
     106// --- JSValue inlines ----------------------------
     107
     108inline JSString* JSValue::toThisJSString(ExecState* exec)
     109{
     110    return JSImmediate::isImmediate(this) ? jsString(exec, JSImmediate::toString(this)) : asCell()->toThisJSString(exec);
     111}
     112
     113} // namespace KJS
    99114
    100115#endif // JSString_h
Note: See TracChangeset for help on using the changeset viewer.