summarylogtreecommitdiffstats
path: root/gcc7-fix.patch
blob: f929b4aceab9ca7329ceb4866bb3b329218094c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
diff -up v8-3.14.5.10/src/arm/assembler-arm.cc.gcc7 v8-3.14.5.10/src/arm/assembler-arm.cc
diff -up v8-3.14.5.10/src/deoptimizer.cc.gcc7 v8-3.14.5.10/src/deoptimizer.cc
--- v8-3.14.5.10/src/deoptimizer.cc.gcc7	2012-10-22 09:09:53.000000000 -0400
+++ v8-3.14.5.10/src/deoptimizer.cc	2017-02-28 16:55:25.553045035 -0500
@@ -1141,7 +1141,7 @@ bool Deoptimizer::DoOsrTranslateCommand(
       }
       output->SetRegister(output_reg, static_cast<int32_t>(uint32_value));
     }
-
+    // intentional fallthrough
 
     case Translation::DOUBLE_REGISTER: {
       // Abort OSR if we don't have a number.
diff -up v8-3.14.5.10/src/ia32/assembler-ia32.cc.gcc7 v8-3.14.5.10/src/ia32/assembler-ia32.cc
--- v8-3.14.5.10/src/ia32/assembler-ia32.cc.gcc7	2017-03-01 10:21:11.271775490 -0500
+++ v8-3.14.5.10/src/ia32/assembler-ia32.cc	2017-03-01 10:21:44.242983779 -0500
@@ -420,6 +420,7 @@ void Assembler::Nop(int bytes) {
     switch (bytes) {
       case 2:
         EMIT(0x66);
+        // intentional fallthrough
       case 1:
         EMIT(0x90);
         return;
@@ -436,6 +437,7 @@ void Assembler::Nop(int bytes) {
         return;
       case 6:
         EMIT(0x66);
+        // intentional fallthrough
       case 5:
         EMIT(0xf);
         EMIT(0x1f);
@@ -456,12 +458,15 @@ void Assembler::Nop(int bytes) {
       case 11:
         EMIT(0x66);
         bytes--;
+        // intentional fallthrough
       case 10:
         EMIT(0x66);
         bytes--;
+        // intentional fallthrough
       case 9:
         EMIT(0x66);
         bytes--;
+        // intentional fallthrough
       case 8:
         EMIT(0xf);
         EMIT(0x1f);
diff -up v8-3.14.5.10/src/ic.cc.gcc7 v8-3.14.5.10/src/ic.cc
--- v8-3.14.5.10/src/ic.cc.gcc7	2012-10-22 09:09:53.000000000 -0400
+++ v8-3.14.5.10/src/ic.cc	2017-02-28 16:55:25.554045011 -0500
@@ -1989,8 +1989,8 @@ void KeyedStoreIC::UpdateCaches(LookupRe
             name, receiver, field_index, transition, strict_mode);
         break;
       }
-      // fall through.
     }
+    // intentional fallthrough
     case NORMAL:
     case CONSTANT_FUNCTION:
     case CALLBACKS:
diff -up v8-3.14.5.10/src/objects.cc.gcc7 v8-3.14.5.10/src/objects.cc
--- v8-3.14.5.10/src/objects.cc.gcc7	2017-02-28 16:55:25.516045908 -0500
+++ v8-3.14.5.10/src/objects.cc	2017-02-28 16:55:25.555044988 -0500
@@ -10302,7 +10302,7 @@ void JSObject::GetElementsCapacityAndUsa
         *used = Smi::cast(JSArray::cast(this)->length())->value();
         break;
       }
-      // Fall through if packing is not guaranteed.
+      // intentional fallthrough
     case FAST_HOLEY_SMI_ELEMENTS:
     case FAST_HOLEY_ELEMENTS:
       backing_store = FixedArray::cast(backing_store_base);
@@ -10324,7 +10324,7 @@ void JSObject::GetElementsCapacityAndUsa
         *used = Smi::cast(JSArray::cast(this)->length())->value();
         break;
       }
-      // Fall through if packing is not guaranteed.
+      // intentional fallthrough
     case FAST_HOLEY_DOUBLE_ELEMENTS: {
       FixedDoubleArray* elms = FixedDoubleArray::cast(elements());
       *capacity = elms->length();
diff -up v8-3.14.5.10/src/objects.h.gcc7 v8-3.14.5.10/src/objects.h
--- v8-3.14.5.10/src/objects.h.gcc7	2017-02-28 16:55:25.517045885 -0500
+++ v8-3.14.5.10/src/objects.h	2017-02-28 16:55:25.556044964 -0500
@@ -2785,24 +2785,10 @@ class HashTable: public FixedArray {
     USE_CUSTOM_MINIMUM_CAPACITY
   };
 
-  // Wrapper methods
-  inline uint32_t Hash(Key key) {
-    if (Shape::UsesSeed) {
-      return Shape::SeededHash(key,
-          GetHeap()->HashSeed());
-    } else {
-      return Shape::Hash(key);
-    }
-  }
-
-  inline uint32_t HashForObject(Key key, Object* object) {
-    if (Shape::UsesSeed) {
-      return Shape::SeededHashForObject(key,
-          GetHeap()->HashSeed(), object);
-    } else {
-      return Shape::HashForObject(key, object);
-    }
-  }
+  // Wrapper methods.  Defined in src/objects-inl.h
+  // to break a cycle with src/heap/heap.h.
+  inline uint32_t Hash(Key key);
+  inline uint32_t HashForObject(Key key, Object* object);
 
   // Returns the number of elements in the hash table.
   int NumberOfElements() {
diff -up v8-3.14.5.10/src/objects-inl.h.gcc7 v8-3.14.5.10/src/objects-inl.h
--- v8-3.14.5.10/src/objects-inl.h.gcc7	2017-02-28 16:55:25.517045885 -0500
+++ v8-3.14.5.10/src/objects-inl.h	2017-02-28 16:55:25.556044964 -0500
@@ -52,6 +52,26 @@
 namespace v8 {
 namespace internal {
 
+template<typename Shape, typename Key>
+uint32_t HashTable<Shape, Key>::Hash(Key key) {
+  if (Shape::UsesSeed) {
+    return Shape::SeededHash(key,
+        GetHeap()->HashSeed());
+  } else {
+    return Shape::Hash(key);
+  }
+}
+
+template<typename Shape, typename Key>
+uint32_t HashTable<Shape, Key>::HashForObject(Key key, Object* object) {
+  if (Shape::UsesSeed) {
+    return Shape::SeededHashForObject(key,
+        GetHeap()->HashSeed(), object);
+  } else {
+    return Shape::HashForObject(key, object);
+  }
+}
+
 PropertyDetails::PropertyDetails(Smi* smi) {
   value_ = smi->value();
 }
diff -up v8-3.14.5.10/src/parser.cc.gcc7 v8-3.14.5.10/src/parser.cc
--- v8-3.14.5.10/src/parser.cc.gcc7	2017-02-28 16:55:25.450047466 -0500
+++ v8-3.14.5.10/src/parser.cc	2017-02-28 16:55:25.557044941 -0500
@@ -3649,8 +3649,7 @@ Expression* Parser::ParsePrimaryExpressi
         result = ParseV8Intrinsic(CHECK_OK);
         break;
       }
-      // If we're not allowing special syntax we fall-through to the
-      // default case.
+      // intentional fallthrough
 
     default: {
       Token::Value tok = Next();
@@ -5376,8 +5375,8 @@ RegExpTree* RegExpParser::ParseDisjuncti
       if (ParseIntervalQuantifier(&dummy, &dummy)) {
         ReportError(CStrVector("Nothing to repeat") CHECK_FAILED);
       }
-      // fallthrough
     }
+    // intentional fallthrough
     default:
       builder->AddCharacter(current());
       Advance();
diff -up v8-3.14.5.10/src/spaces.h.gcc7 v8-3.14.5.10/src/spaces.h
--- v8-3.14.5.10/src/spaces.h.gcc7	2012-10-22 09:09:53.000000000 -0400
+++ v8-3.14.5.10/src/spaces.h	2017-02-28 16:55:25.557044941 -0500
@@ -2613,15 +2613,15 @@ class PointerChunkIterator BASE_EMBEDDED
           return old_pointer_iterator_.next();
         }
         state_ = kMapState;
-        // Fall through.
       }
+      // intentional fallthrough
       case kMapState: {
         if (map_iterator_.has_next()) {
           return map_iterator_.next();
         }
         state_ = kLargeObjectState;
-        // Fall through.
       }
+      // intentional fallthrough
       case kLargeObjectState: {
         HeapObject* heap_object;
         do {
diff -up v8-3.14.5.10/src/x64/assembler-x64.cc.gcc7 v8-3.14.5.10/src/x64/assembler-x64.cc
--- v8-3.14.5.10/src/x64/assembler-x64.cc.gcc7	2017-03-01 10:19:40.086088012 -0500
+++ v8-3.14.5.10/src/x64/assembler-x64.cc	2017-03-01 10:20:51.859241627 -0500
@@ -1800,6 +1800,7 @@ void Assembler::Nop(int n) {
     switch (n) {
       case 2:
         emit(0x66);
+        // intentional fallthrough
       case 1:
         emit(0x90);
         return;
@@ -1816,6 +1817,7 @@ void Assembler::Nop(int n) {
         return;
       case 6:
         emit(0x66);
+        // intentional fallthrough
       case 5:
         emit(0x0f);
         emit(0x1f);
@@ -1836,12 +1838,15 @@ void Assembler::Nop(int n) {
       case 11:
         emit(0x66);
         n--;
+        // intentional fallthrough
       case 10:
         emit(0x66);
         n--;
+        // intentional fallthrough
       case 9:
         emit(0x66);
         n--;
+        // intentional fallthrough
       case 8:
         emit(0x0f);
         emit(0x1f);