Ignore:
Timestamp:
Oct 26, 2006, 9:39:00 AM (19 years ago)
Author:
darin
Message:

JavaScriptCore:

Reviewed by John.

  • fix iteration of properties of string objects (found because of a warning emitted by the MSVC compiler)
  • kjs/string_object.cpp: (StringInstance::getPropertyNames): Change code that wants to format a number as a string to use UString::from. Before it was using the UString constructor that makes a string from a character!
  • kjs/ustring.h:
  • kjs/ustring.cpp: Remove the dangerous and not all that helpful UString(char) constructor.
  • kjs/grammar.y: Change code to not depend on the UString(char) constructor. This is potentially more efficient anyway because we could overload the + operator some day to handle char* directly instead of creating a UString.
  • kjs/nodes2string.cpp: (SourceStream::operator<<): Change code to not depend on the UString(char) constructor.

LayoutTests:

Reviewed by John.

  • add a test for iteration of properties of string objects
  • fast/js/resources/string-property-iteration.js: Added.
  • fast/js/string-property-iteration-expected.txt: Added.
  • fast/js/string-property-iteration.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r17240 r17306  
    490490                932F5BD80822A1C700736975 /* Info.plist */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; tabWidth = 8; };
    491491                932F5BD90822A1C700736975 /* JavaScriptCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
    492                 932F5BE10822A1C700736975 /* testkjs */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = testkjs; sourceTree = BUILT_PRODUCTS_DIR; };
     492                932F5BE10822A1C700736975 /* testkjs */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testkjs; sourceTree = BUILT_PRODUCTS_DIR; };
    493493                933A3499038AE7C6008635CE /* grammar.y */ = {isa = PBXFileReference; explicitFileType = sourcecode.yacc; fileEncoding = 4; indentWidth = 4; path = grammar.y; sourceTree = "<group>"; tabWidth = 8; };
    494494                933A349A038AE7C6008635CE /* identifier.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = identifier.h; sourceTree = "<group>"; tabWidth = 8; };
Note: See TracChangeset for help on using the changeset viewer.