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 #include "src/code-stub-assembler.h" | 4 #include "src/code-stub-assembler.h" |
5 #include "src/code-factory.h" | 5 #include "src/code-factory.h" |
6 #include "src/frames-inl.h" | 6 #include "src/frames-inl.h" |
7 #include "src/frames.h" | 7 #include "src/frames.h" |
8 #include "src/ic/handler-configuration.h" | 8 #include "src/ic/handler-configuration.h" |
9 #include "src/ic/stub-cache.h" | 9 #include "src/ic/stub-cache.h" |
10 | 10 |
(...skipping 5410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5421 int16_elements(this), uint32_elements(this), int32_elements(this), | 5421 int16_elements(this), uint32_elements(this), int32_elements(this), |
5422 float32_elements(this), float64_elements(this); | 5422 float32_elements(this), float64_elements(this); |
5423 Label* elements_kind_labels[] = { | 5423 Label* elements_kind_labels[] = { |
5424 &uint8_elements, &uint8_elements, &int8_elements, | 5424 &uint8_elements, &uint8_elements, &int8_elements, |
5425 &uint16_elements, &int16_elements, &uint32_elements, | 5425 &uint16_elements, &int16_elements, &uint32_elements, |
5426 &int32_elements, &float32_elements, &float64_elements}; | 5426 &int32_elements, &float32_elements, &float64_elements}; |
5427 int32_t elements_kinds[] = { | 5427 int32_t elements_kinds[] = { |
5428 UINT8_ELEMENTS, UINT8_CLAMPED_ELEMENTS, INT8_ELEMENTS, | 5428 UINT8_ELEMENTS, UINT8_CLAMPED_ELEMENTS, INT8_ELEMENTS, |
5429 UINT16_ELEMENTS, INT16_ELEMENTS, UINT32_ELEMENTS, | 5429 UINT16_ELEMENTS, INT16_ELEMENTS, UINT32_ELEMENTS, |
5430 INT32_ELEMENTS, FLOAT32_ELEMENTS, FLOAT64_ELEMENTS}; | 5430 INT32_ELEMENTS, FLOAT32_ELEMENTS, FLOAT64_ELEMENTS}; |
5431 const int kTypedElementsKindCount = LAST_FIXED_TYPED_ARRAY_ELEMENTS_KIND - | 5431 const size_t kTypedElementsKindCount = |
5432 FIRST_FIXED_TYPED_ARRAY_ELEMENTS_KIND + | 5432 LAST_FIXED_TYPED_ARRAY_ELEMENTS_KIND - |
5433 1; | 5433 FIRST_FIXED_TYPED_ARRAY_ELEMENTS_KIND + 1; |
5434 DCHECK_EQ(kTypedElementsKindCount, arraysize(elements_kinds)); | 5434 DCHECK_EQ(kTypedElementsKindCount, arraysize(elements_kinds)); |
5435 DCHECK_EQ(kTypedElementsKindCount, arraysize(elements_kind_labels)); | 5435 DCHECK_EQ(kTypedElementsKindCount, arraysize(elements_kind_labels)); |
5436 Switch(elements_kind, miss, elements_kinds, elements_kind_labels, | 5436 Switch(elements_kind, miss, elements_kinds, elements_kind_labels, |
5437 static_cast<size_t>(kTypedElementsKindCount)); | 5437 kTypedElementsKindCount); |
5438 Bind(&uint8_elements); | 5438 Bind(&uint8_elements); |
5439 { | 5439 { |
5440 Comment("UINT8_ELEMENTS"); // Handles UINT8_CLAMPED_ELEMENTS too. | 5440 Comment("UINT8_ELEMENTS"); // Handles UINT8_CLAMPED_ELEMENTS too. |
5441 Return(SmiTag(Load(MachineType::Uint8(), backing_store, intptr_index))); | 5441 Return(SmiTag(Load(MachineType::Uint8(), backing_store, intptr_index))); |
5442 } | 5442 } |
5443 Bind(&int8_elements); | 5443 Bind(&int8_elements); |
5444 { | 5444 { |
5445 Comment("INT8_ELEMENTS"); | 5445 Comment("INT8_ELEMENTS"); |
5446 Return(SmiTag(Load(MachineType::Int8(), backing_store, intptr_index))); | 5446 Return(SmiTag(Load(MachineType::Int8(), backing_store, intptr_index))); |
5447 } | 5447 } |
(...skipping 3462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8910 } | 8910 } |
8911 | 8911 |
8912 void CodeStubArguments::PopAndReturn(compiler::Node* value) { | 8912 void CodeStubArguments::PopAndReturn(compiler::Node* value) { |
8913 assembler_->PopAndReturn( | 8913 assembler_->PopAndReturn( |
8914 assembler_->IntPtrAddFoldConstants(argc_, assembler_->IntPtrConstant(1)), | 8914 assembler_->IntPtrAddFoldConstants(argc_, assembler_->IntPtrConstant(1)), |
8915 value); | 8915 value); |
8916 } | 8916 } |
8917 | 8917 |
8918 } // namespace internal | 8918 } // namespace internal |
8919 } // namespace v8 | 8919 } // namespace v8 |
OLD | NEW |