Commit fc826e37 authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[TurboFan] Fix typing of INTERNALIZED_STRING_TYPE for new EmptyString type.

Add kInternalizedNonEmptySeqString and make kInternalizedString = 
kEmptyString | kInternalizedNonEmptySeqString.

BUG=chromium:731495

Change-Id: I60a6f37242423407ad97188b3f4bd48ae6989ad2
Reviewed-on: https://chromium-review.googlesource.com/528275Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45821}
parent 96062c04
...@@ -105,31 +105,31 @@ namespace compiler { ...@@ -105,31 +105,31 @@ namespace compiler {
V(OtherNumber, 1u << 4) \ V(OtherNumber, 1u << 4) \
#define PROPER_BITSET_TYPE_LIST(V) \ #define PROPER_BITSET_TYPE_LIST(V) \
V(None, 0u) \ V(None, 0u) \
V(Negative31, 1u << 5) \ V(Negative31, 1u << 5) \
V(Null, 1u << 6) \ V(Null, 1u << 6) \
V(Undefined, 1u << 7) \ V(Undefined, 1u << 7) \
V(Boolean, 1u << 8) \ V(Boolean, 1u << 8) \
V(Unsigned30, 1u << 9) \ V(Unsigned30, 1u << 9) \
V(MinusZero, 1u << 10) \ V(MinusZero, 1u << 10) \
V(NaN, 1u << 11) \ V(NaN, 1u << 11) \
V(Symbol, 1u << 12) \ V(Symbol, 1u << 12) \
V(EmptyString, 1u << 13) \ V(EmptyString, 1u << 13) \
V(InternalizedNonSeqString, 1u << 14) \ V(InternalizedNonEmptySeqString, 1u << 14) \
V(InternalizedSeqString, 1u << 15) \ V(InternalizedNonSeqString, 1u << 15) \
V(OtherNonSeqString, 1u << 16) \ V(OtherNonSeqString, 1u << 16) \
V(OtherSeqString, 1u << 17) \ V(OtherSeqString, 1u << 17) \
V(OtherCallable, 1u << 18) \ V(OtherCallable, 1u << 18) \
V(OtherObject, 1u << 19) \ V(OtherObject, 1u << 19) \
V(OtherUndetectable, 1u << 20) \ V(OtherUndetectable, 1u << 20) \
V(CallableProxy, 1u << 21) \ V(CallableProxy, 1u << 21) \
V(OtherProxy, 1u << 22) \ V(OtherProxy, 1u << 22) \
V(Function, 1u << 23) \ V(Function, 1u << 23) \
V(BoundFunction, 1u << 24) \ V(BoundFunction, 1u << 24) \
V(Hole, 1u << 25) \ V(Hole, 1u << 25) \
V(OtherInternal, 1u << 26) \ V(OtherInternal, 1u << 26) \
V(ExternalPointer, 1u << 27) \ V(ExternalPointer, 1u << 27) \
V(Array, 1u << 28) \ V(Array, 1u << 28) \
\ \
V(Signed31, kUnsigned30 | kNegative31) \ V(Signed31, kUnsigned30 | kNegative31) \
V(Signed32, kSigned31 | kOtherUnsigned31 | \ V(Signed32, kSigned31 | kOtherUnsigned31 | \
...@@ -149,16 +149,16 @@ namespace compiler { ...@@ -149,16 +149,16 @@ namespace compiler {
V(OrderedNumber, kPlainNumber | kMinusZero) \ V(OrderedNumber, kPlainNumber | kMinusZero) \
V(MinusZeroOrNaN, kMinusZero | kNaN) \ V(MinusZeroOrNaN, kMinusZero | kNaN) \
V(Number, kOrderedNumber | kNaN) \ V(Number, kOrderedNumber | kNaN) \
V(NonEmptyInternalizedString, kInternalizedNonSeqString | \ V(InternalizedSeqString, kEmptyString | \
kInternalizedSeqString) \ kInternalizedNonEmptySeqString) \
V(InternalizedString, kNonEmptyInternalizedString | \ V(InternalizedString, kInternalizedSeqString | \
kEmptyString) \ kInternalizedNonSeqString) \
V(OtherString, kOtherNonSeqString | kOtherSeqString) \ V(OtherString, kOtherNonSeqString | kOtherSeqString) \
V(NonEmptySeqString, kInternalizedSeqString | kOtherSeqString) \ V(SeqString, kInternalizedSeqString | kOtherSeqString) \
V(SeqString, kNonEmptySeqString | kEmptyString) \
V(NonSeqString, kInternalizedNonSeqString | \ V(NonSeqString, kInternalizedNonSeqString | \
kOtherNonSeqString) \ kOtherNonSeqString) \
V(NonEmptyString, kNonEmptyInternalizedString | kOtherString) \ V(NonEmptyString, kInternalizedNonEmptySeqString | \
kInternalizedNonSeqString| kOtherString) \
V(String, kNonEmptyString | kEmptyString) \ V(String, kNonEmptyString | kEmptyString) \
V(UniqueName, kSymbol | kInternalizedString) \ V(UniqueName, kSymbol | kInternalizedString) \
V(Name, kSymbol | kString) \ V(Name, kSymbol | kString) \
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
function foo() {
global = "";
global = global + "bar";
return global;
};
assertEquals(foo(), "bar");
%OptimizeFunctionOnNextCall(foo);
assertEquals(foo(), "bar");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment