diff options
Diffstat (limited to 'JavaScriptCore/parser')
-rw-r--r-- | JavaScriptCore/parser/ASTBuilder.h | 2 | ||||
-rw-r--r-- | JavaScriptCore/parser/JSParser.cpp | 6 | ||||
-rw-r--r-- | JavaScriptCore/parser/ParserArena.h | 2 | ||||
-rw-r--r-- | JavaScriptCore/parser/SourceProvider.h | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/JavaScriptCore/parser/ASTBuilder.h b/JavaScriptCore/parser/ASTBuilder.h index f627756..dbf3c07 100644 --- a/JavaScriptCore/parser/ASTBuilder.h +++ b/JavaScriptCore/parser/ASTBuilder.h @@ -210,7 +210,7 @@ public: ExpressionNode* createRegex(const Identifier& pattern, const Identifier& flags, int start) { RegExpNode* node = new (m_globalData) RegExpNode(m_globalData, pattern, flags); - int size = pattern.size() + 2; // + 2 for the two /'s + int size = pattern.length() + 2; // + 2 for the two /'s setExceptionLocation(node, start, start + size, start + size); return node; } diff --git a/JavaScriptCore/parser/JSParser.cpp b/JavaScriptCore/parser/JSParser.cpp index 13013c7..3baceba 100644 --- a/JavaScriptCore/parser/JSParser.cpp +++ b/JavaScriptCore/parser/JSParser.cpp @@ -1186,11 +1186,11 @@ template <class TreeBuilder> TreeExpression JSParser::parseStrictObjectLiteral(T TreeProperty property = parseProperty<true>(context); failIfFalse(property); - typedef HashMap<RefPtr<UString::Rep>, unsigned, IdentifierRepHash> ObjectValidationMap; + typedef HashMap<RefPtr<StringImpl>, unsigned, IdentifierRepHash> ObjectValidationMap; ObjectValidationMap objectValidator; // Add the first property if (!m_syntaxAlreadyValidated) - objectValidator.add(context.getName(property).ustring().rep(), context.getType(property)); + objectValidator.add(context.getName(property).impl(), context.getType(property)); TreePropertyList propertyList = context.createPropertyList(property); TreePropertyList tail = propertyList; @@ -1202,7 +1202,7 @@ template <class TreeBuilder> TreeExpression JSParser::parseStrictObjectLiteral(T property = parseProperty<true>(context); failIfFalse(property); if (!m_syntaxAlreadyValidated) { - std::pair<ObjectValidationMap::iterator, bool> propertyEntryIter = objectValidator.add(context.getName(property).ustring().rep(), context.getType(property)); + std::pair<ObjectValidationMap::iterator, bool> propertyEntryIter = objectValidator.add(context.getName(property).impl(), context.getType(property)); if (!propertyEntryIter.second) { if ((context.getType(property) & propertyEntryIter.first->second) != PropertyNode::Constant) { // Can't have multiple getters or setters with the same name, nor can we define diff --git a/JavaScriptCore/parser/ParserArena.h b/JavaScriptCore/parser/ParserArena.h index eef8e93..7c1809e 100644 --- a/JavaScriptCore/parser/ParserArena.h +++ b/JavaScriptCore/parser/ParserArena.h @@ -55,7 +55,7 @@ namespace JSC { inline const Identifier& IdentifierArena::makeNumericIdentifier(JSGlobalData* globalData, double number) { - m_identifiers.append(Identifier(globalData, UString::from(number))); + m_identifiers.append(Identifier(globalData, UString::number(number))); return m_identifiers.last(); } diff --git a/JavaScriptCore/parser/SourceProvider.h b/JavaScriptCore/parser/SourceProvider.h index 5a57542..5ff1d14 100644 --- a/JavaScriptCore/parser/SourceProvider.h +++ b/JavaScriptCore/parser/SourceProvider.h @@ -67,10 +67,10 @@ namespace JSC { UString getRange(int start, int end) const { - return m_source.substr(start, end - start); + return m_source.substringSharingImpl(start, end - start); } - const UChar* data() const { return m_source.data(); } - int length() const { return m_source.size(); } + const UChar* data() const { return m_source.characters(); } + int length() const { return m_source.length(); } private: UStringSourceProvider(const UString& source, const UString& url) |