File tree Expand file tree Collapse file tree 2 files changed +38
-2
lines changed
Expand file tree Collapse file tree 2 files changed +38
-2
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ ecma_collection_free_template_literal (ecma_collection_t *collection_p) /**< val
9696 ecma_extended_object_t * array_object_p = (ecma_extended_object_t * ) object_p ;
9797
9898 JERRY_ASSERT (array_object_p -> u .array .length_prop_and_hole_count & ECMA_ARRAY_TEMPLATE_LITERAL );
99- array_object_p -> u .array .length_prop_and_hole_count &= (uint32_t ) ECMA_ARRAY_TEMPLATE_LITERAL ;
99+ array_object_p -> u .array .length_prop_and_hole_count &= (uint32_t ) ~ ECMA_ARRAY_TEMPLATE_LITERAL ;
100100
101101 ecma_property_value_t * property_value_p ;
102102
@@ -108,7 +108,7 @@ ecma_collection_free_template_literal (ecma_collection_t *collection_p) /**< val
108108 array_object_p = (ecma_extended_object_t * ) raw_object_p ;
109109
110110 JERRY_ASSERT (array_object_p -> u .array .length_prop_and_hole_count & ECMA_ARRAY_TEMPLATE_LITERAL );
111- array_object_p -> u .array .length_prop_and_hole_count &= (uint32_t ) ECMA_ARRAY_TEMPLATE_LITERAL ;
111+ array_object_p -> u .array .length_prop_and_hole_count &= (uint32_t ) ~ ECMA_ARRAY_TEMPLATE_LITERAL ;
112112
113113 ecma_deref_object (raw_object_p );
114114 ecma_deref_object (object_p );
Original file line number Diff line number Diff line change 1+ // Copyright JS Foundation and other contributors, http://js.foundation
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.
14+
15+ function assertArrayEquals ( array1 , array2 ) {
16+ if ( array1 . length !== array2 . length ) {
17+ return false ;
18+ }
19+
20+ for ( var i = 0 ; i < array1 . length ; i ++ ) {
21+ if ( array1 [ i ] !== array2 [ i ] ) {
22+ return false ;
23+ }
24+ }
25+
26+ return true ;
27+ }
28+
29+ function tag ( site ) {
30+ return site ;
31+ }
32+
33+ var site1 = eval ( "tag`Cocoa`" ) ;
34+ var site3 = eval ( "tag`Cocoa`" ) ;
35+
36+ assertArrayEquals ( site1 , site3 ) ;
You can’t perform that action at this time.
0 commit comments