diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
| commit | 284837daa07b29d6a63a748544a90b1f5842ac5c (patch) | |
| tree | ecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/JavaScriptCore/runtime/Operations.h | |
| parent | 2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff) | |
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/JavaScriptCore/runtime/Operations.h')
| -rw-r--r-- | Source/JavaScriptCore/runtime/Operations.h | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/Source/JavaScriptCore/runtime/Operations.h b/Source/JavaScriptCore/runtime/Operations.h index 88fffdac4..30ba0b27d 100644 --- a/Source/JavaScriptCore/runtime/Operations.h +++ b/Source/JavaScriptCore/runtime/Operations.h @@ -50,7 +50,7 @@ namespace JSC { return JSRopeString::create(globalData, s1, s2); } - ALWAYS_INLINE JSValue jsString(ExecState* exec, const UString& u1, const UString& u2, const UString& u3) + ALWAYS_INLINE JSValue jsString(ExecState* exec, const String& u1, const String& u2, const String& u3) { JSGlobalData* globalData = &exec->globalData(); @@ -221,7 +221,7 @@ namespace JSC { return v1.asNumber() < v2.asNumber(); if (isJSString(v1) && isJSString(v2)) - return asString(v1)->value(callFrame) < asString(v2)->value(callFrame); + return codePointCompareLessThan(asString(v1)->value(callFrame), asString(v2)->value(callFrame)); double n1; double n2; @@ -239,7 +239,7 @@ namespace JSC { if (wasNotString1 | wasNotString2) return n1 < n2; - return asString(p1)->value(callFrame) < asString(p2)->value(callFrame); + return codePointCompareLessThan(asString(p1)->value(callFrame), asString(p2)->value(callFrame)); } // See ES5 11.8.3/11.8.4/11.8.5 for definition of leftFirst, this value ensures correct @@ -255,7 +255,7 @@ namespace JSC { return v1.asNumber() <= v2.asNumber(); if (isJSString(v1) && isJSString(v2)) - return !(asString(v2)->value(callFrame) < asString(v1)->value(callFrame)); + return !codePointCompareLessThan(asString(v2)->value(callFrame), asString(v1)->value(callFrame)); double n1; double n2; @@ -273,7 +273,7 @@ namespace JSC { if (wasNotString1 | wasNotString2) return n1 <= n2; - return !(asString(p2)->value(callFrame) < asString(p1)->value(callFrame)); + return !codePointCompareLessThan(asString(p2)->value(callFrame), asString(p1)->value(callFrame)); } // Fast-path choices here are based on frequency data from SunSpider: @@ -347,33 +347,6 @@ namespace JSC { } } - ALWAYS_INLINE JSValue resolveBase(CallFrame* callFrame, Identifier& property, ScopeChainNode* scopeChain, bool isStrictPut) - { - ScopeChainIterator iter = scopeChain->begin(); - ScopeChainIterator next = iter; - ++next; - ScopeChainIterator end = scopeChain->end(); - ASSERT(iter != end); - - PropertySlot slot; - JSObject* base; - while (true) { - base = iter->get(); - if (next == end) { - if (isStrictPut && !base->getPropertySlot(callFrame, property, slot)) - return JSValue(); - return base; - } - if (base->getPropertySlot(callFrame, property, slot)) - return base; - - iter = next; - ++next; - } - - ASSERT_NOT_REACHED(); - return JSValue(); - } } // namespace JSC #endif // Operations_h |
