1# Copyright 2013 the V8 project authors. All rights reserved.
2# Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions
6# are met:
7# 1.  Redistributions of source code must retain the above copyright
8#     notice, this list of conditions and the following disclaimer.
9# 2.  Redistributions in binary form must reproduce the above copyright
10#     notice, this list of conditions and the following disclaimer in the
11#     documentation and/or other materials provided with the distribution.
12#
13# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
24Tests that the CompareEq optimization for the case where one side is predicted final object and the other side is predicted either final object or other (i.e. null or undefined) doesn't assert when the other side is also proven final object.
25
26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
27
28
29PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
30PASS foo(o, o) is [42, true]
31PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
32PASS foo(o, o) is [42, true]
33PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
34PASS foo(o, o) is [42, true]
35PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
36PASS foo(o, o) is [42, true]
37PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
38PASS foo(o, o) is [42, true]
39PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
40PASS foo(o, o) is [42, true]
41PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
42PASS foo(o, o) is [42, true]
43PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
44PASS foo(o, o) is [42, true]
45PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
46PASS foo(o, o) is [42, true]
47PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
48PASS foo(o, o) is [42, true]
49PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
50PASS foo(o, o) is [42, true]
51PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
52PASS foo(o, o) is [42, true]
53PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
54PASS foo(o, o) is [42, true]
55PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
56PASS foo(o, o) is [42, true]
57PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
58PASS foo(o, o) is [42, true]
59PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
60PASS foo(o, o) is [42, true]
61PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
62PASS foo(o, o) is [42, true]
63PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
64PASS foo(o, o) is [42, true]
65PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
66PASS foo(o, o) is [42, true]
67PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
68PASS foo(o, o) is [42, true]
69PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
70PASS foo(o, o) is [42, true]
71PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
72PASS foo(o, o) is [42, true]
73PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
74PASS foo(o, o) is [42, true]
75PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
76PASS foo(o, o) is [42, true]
77PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
78PASS foo(o, o) is [42, true]
79PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
80PASS foo(o, o) is [42, true]
81PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
82PASS foo(o, o) is [42, true]
83PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
84PASS foo(o, o) is [42, true]
85PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
86PASS foo(o, o) is [42, true]
87PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
88PASS foo(o, o) is [42, true]
89PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
90PASS foo(o, o) is [42, true]
91PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
92PASS foo(o, o) is [42, true]
93PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
94PASS foo(o, o) is [42, true]
95PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
96PASS foo(o, o) is [42, true]
97PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
98PASS foo(o, o) is [42, true]
99PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
100PASS foo(o, o) is [42, true]
101PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
102PASS foo(o, o) is [42, true]
103PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
104PASS foo(o, o) is [42, true]
105PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
106PASS foo(o, o) is [42, true]
107PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
108PASS foo(o, o) is [42, true]
109PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
110PASS foo(o, o) is [42, true]
111PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
112PASS foo(o, o) is [42, true]
113PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
114PASS foo(o, o) is [42, true]
115PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
116PASS foo(o, o) is [42, true]
117PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
118PASS foo(o, o) is [42, true]
119PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
120PASS foo(o, o) is [42, true]
121PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
122PASS foo(o, o) is [42, true]
123PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
124PASS foo(o, o) is [42, true]
125PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
126PASS foo(o, o) is [42, true]
127PASS foo({f:42}, null) threw exception TypeError: Cannot read property 'f' of null.
128PASS foo(o, o) is [42, true]
129PASS successfullyParsed is true
130
131TEST COMPLETE
132
133