OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 "src/code-stub-assembler.h" | 5 #include "src/code-stub-assembler.h" |
6 #include "src/code-factory.h" | 6 #include "src/code-factory.h" |
7 #include "src/frames-inl.h" | 7 #include "src/frames-inl.h" |
8 #include "src/frames.h" | 8 #include "src/frames.h" |
9 #include "src/ic/handler-configuration.h" | 9 #include "src/ic/handler-configuration.h" |
10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
(...skipping 7888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7899 Goto(&end); | 7899 Goto(&end); |
7900 } | 7900 } |
7901 | 7901 |
7902 Bind(&end); | 7902 Bind(&end); |
7903 return var_result.value(); | 7903 return var_result.value(); |
7904 } | 7904 } |
7905 | 7905 |
7906 compiler::Node* CodeStubAssembler::CreateArrayIterator( | 7906 compiler::Node* CodeStubAssembler::CreateArrayIterator( |
7907 compiler::Node* array, compiler::Node* array_map, | 7907 compiler::Node* array, compiler::Node* array_map, |
7908 compiler::Node* array_type, compiler::Node* context, IterationKind mode) { | 7908 compiler::Node* array_type, compiler::Node* context, IterationKind mode) { |
7909 int kBaseMapIndex; | 7909 int kBaseMapIndex = 0; |
7910 switch (mode) { | 7910 switch (mode) { |
7911 case IterationKind::kKeys: | 7911 case IterationKind::kKeys: |
7912 kBaseMapIndex = Context::TYPED_ARRAY_KEY_ITERATOR_MAP_INDEX; | 7912 kBaseMapIndex = Context::TYPED_ARRAY_KEY_ITERATOR_MAP_INDEX; |
7913 break; | 7913 break; |
7914 case IterationKind::kValues: | 7914 case IterationKind::kValues: |
7915 kBaseMapIndex = Context::UINT8_ARRAY_VALUE_ITERATOR_MAP_INDEX; | 7915 kBaseMapIndex = Context::UINT8_ARRAY_VALUE_ITERATOR_MAP_INDEX; |
7916 break; | 7916 break; |
7917 case IterationKind::kEntries: | 7917 case IterationKind::kEntries: |
7918 kBaseMapIndex = Context::UINT8_ARRAY_KEY_VALUE_ITERATOR_MAP_INDEX; | 7918 kBaseMapIndex = Context::UINT8_ARRAY_KEY_VALUE_ITERATOR_MAP_INDEX; |
7919 break; | 7919 break; |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8068 Node* buffer_bit_field = LoadObjectField( | 8068 Node* buffer_bit_field = LoadObjectField( |
8069 buffer, JSArrayBuffer::kBitFieldOffset, MachineType::Uint32()); | 8069 buffer, JSArrayBuffer::kBitFieldOffset, MachineType::Uint32()); |
8070 Node* was_neutered_mask = Int32Constant(JSArrayBuffer::WasNeutered::kMask); | 8070 Node* was_neutered_mask = Int32Constant(JSArrayBuffer::WasNeutered::kMask); |
8071 | 8071 |
8072 return Word32NotEqual(Word32And(buffer_bit_field, was_neutered_mask), | 8072 return Word32NotEqual(Word32And(buffer_bit_field, was_neutered_mask), |
8073 Int32Constant(0)); | 8073 Int32Constant(0)); |
8074 } | 8074 } |
8075 | 8075 |
8076 } // namespace internal | 8076 } // namespace internal |
8077 } // namespace v8 | 8077 } // namespace v8 |
OLD | NEW |