Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: src/compiler/types.cc

Issue 2841613002: [compiler][modules] Constant-fold the loads of module cells. (Closed)
Patch Set: Address feedback. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/cctest/compiler/test-js-context-specialization.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <iomanip> 5 #include <iomanip>
6 6
7 #include "src/compiler/types.h" 7 #include "src/compiler/types.h"
8 8
9 #include "src/handles-inl.h" 9 #include "src/handles-inl.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 case FIXED_DOUBLE_ARRAY_TYPE: 291 case FIXED_DOUBLE_ARRAY_TYPE:
292 case BYTE_ARRAY_TYPE: 292 case BYTE_ARRAY_TYPE:
293 case BYTECODE_ARRAY_TYPE: 293 case BYTECODE_ARRAY_TYPE:
294 case TRANSITION_ARRAY_TYPE: 294 case TRANSITION_ARRAY_TYPE:
295 case FOREIGN_TYPE: 295 case FOREIGN_TYPE:
296 case SCRIPT_TYPE: 296 case SCRIPT_TYPE:
297 case CODE_TYPE: 297 case CODE_TYPE:
298 case PROPERTY_CELL_TYPE: 298 case PROPERTY_CELL_TYPE:
299 case MODULE_TYPE: 299 case MODULE_TYPE:
300 case MODULE_INFO_ENTRY_TYPE: 300 case MODULE_INFO_ENTRY_TYPE:
301 case CELL_TYPE:
301 return kOtherInternal; 302 return kOtherInternal;
302 303
303 // Remaining instance types are unsupported for now. If any of them do 304 // Remaining instance types are unsupported for now. If any of them do
304 // require bit set types, they should get kOtherInternal. 305 // require bit set types, they should get kOtherInternal.
305 case MUTABLE_HEAP_NUMBER_TYPE: 306 case MUTABLE_HEAP_NUMBER_TYPE:
306 case FREE_SPACE_TYPE: 307 case FREE_SPACE_TYPE:
307 #define FIXED_TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \ 308 #define FIXED_TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
308 case FIXED_##TYPE##_ARRAY_TYPE: 309 case FIXED_##TYPE##_ARRAY_TYPE:
309 310
310 TYPED_ARRAYS(FIXED_TYPED_ARRAY_CASE) 311 TYPED_ARRAYS(FIXED_TYPED_ARRAY_CASE)
311 #undef FIXED_TYPED_ARRAY_CASE 312 #undef FIXED_TYPED_ARRAY_CASE
312 case FILLER_TYPE: 313 case FILLER_TYPE:
313 case ACCESS_CHECK_INFO_TYPE: 314 case ACCESS_CHECK_INFO_TYPE:
314 case INTERCEPTOR_INFO_TYPE: 315 case INTERCEPTOR_INFO_TYPE:
315 case OBJECT_TEMPLATE_INFO_TYPE: 316 case OBJECT_TEMPLATE_INFO_TYPE:
316 case ALLOCATION_MEMENTO_TYPE: 317 case ALLOCATION_MEMENTO_TYPE:
317 case ALIASED_ARGUMENTS_ENTRY_TYPE: 318 case ALIASED_ARGUMENTS_ENTRY_TYPE:
318 case PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE: 319 case PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE:
319 case PROMISE_REACTION_JOB_INFO_TYPE: 320 case PROMISE_REACTION_JOB_INFO_TYPE:
320 case DEBUG_INFO_TYPE: 321 case DEBUG_INFO_TYPE:
321 case STACK_FRAME_INFO_TYPE: 322 case STACK_FRAME_INFO_TYPE:
322 case CELL_TYPE:
323 case WEAK_CELL_TYPE: 323 case WEAK_CELL_TYPE:
324 case PROTOTYPE_INFO_TYPE: 324 case PROTOTYPE_INFO_TYPE:
325 case TUPLE2_TYPE: 325 case TUPLE2_TYPE:
326 case TUPLE3_TYPE: 326 case TUPLE3_TYPE:
327 case CONTEXT_EXTENSION_TYPE: 327 case CONTEXT_EXTENSION_TYPE:
328 case ASYNC_GENERATOR_REQUEST_TYPE: 328 case ASYNC_GENERATOR_REQUEST_TYPE:
329 case PADDING_TYPE_1: 329 case PADDING_TYPE_1:
330 case PADDING_TYPE_2: 330 case PADDING_TYPE_2:
331 case PADDING_TYPE_3: 331 case PADDING_TYPE_3:
332 case PADDING_TYPE_4: 332 case PADDING_TYPE_4:
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 return i::SmiValuesAre31Bits() ? kSigned31 : kSigned32; 1056 return i::SmiValuesAre31Bits() ? kSigned31 : kSigned32;
1057 } 1057 }
1058 1058
1059 BitsetType::bitset BitsetType::UnsignedSmall() { 1059 BitsetType::bitset BitsetType::UnsignedSmall() {
1060 return i::SmiValuesAre31Bits() ? kUnsigned30 : kUnsigned31; 1060 return i::SmiValuesAre31Bits() ? kUnsigned30 : kUnsigned31;
1061 } 1061 }
1062 1062
1063 } // namespace compiler 1063 } // namespace compiler
1064 } // namespace internal 1064 } // namespace internal
1065 } // namespace v8 1065 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/cctest/compiler/test-js-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698