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
...@@ -115,8 +115,8 @@ namespace compiler { ...@@ -115,8 +115,8 @@ namespace compiler {
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) \
...@@ -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