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

Side by Side Diff: src/ic/accessor-assembler.cc

Issue 2573573004: [stubs] Enable graph verification for builtins. (Closed)
Patch Set: Created 4 years 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
OLDNEW
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/ic/accessor-assembler.h" 5 #include "src/ic/accessor-assembler.h"
6 #include "src/ic/accessor-assembler-impl.h" 6 #include "src/ic/accessor-assembler-impl.h"
7 7
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/ic/handler-configuration.h" 10 #include "src/ic/handler-configuration.h"
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 Node* value_index = EntryToIndex<SeededNumberDictionary>( 872 Node* value_index = EntryToIndex<SeededNumberDictionary>(
873 var_entry.value(), SeededNumberDictionary::kEntryValueIndex); 873 var_entry.value(), SeededNumberDictionary::kEntryValueIndex);
874 Return(LoadFixedArrayElement(elements, value_index, 0, INTPTR_PARAMETERS)); 874 Return(LoadFixedArrayElement(elements, value_index, 0, INTPTR_PARAMETERS));
875 } 875 }
876 876
877 Bind(&if_typed_array); 877 Bind(&if_typed_array);
878 { 878 {
879 Comment("typed elements"); 879 Comment("typed elements");
880 // Check if buffer has been neutered. 880 // Check if buffer has been neutered.
881 Node* buffer = LoadObjectField(object, JSArrayBufferView::kBufferOffset); 881 Node* buffer = LoadObjectField(object, JSArrayBufferView::kBufferOffset);
882 Node* bitfield = LoadObjectField(buffer, JSArrayBuffer::kBitFieldOffset, 882 GotoIf(IsDetachedBuffer(buffer), miss);
883 MachineType::Uint32());
884 GotoIf(IsSetWord32<JSArrayBuffer::WasNeutered>(bitfield), miss);
885 883
886 // Bounds check. 884 // Bounds check.
887 Node* length = 885 Node* length =
888 SmiUntag(LoadObjectField(object, JSTypedArray::kLengthOffset)); 886 SmiUntag(LoadObjectField(object, JSTypedArray::kLengthOffset));
889 GotoUnless(UintPtrLessThan(intptr_index, length), out_of_bounds); 887 GotoUnless(UintPtrLessThan(intptr_index, length), out_of_bounds);
890 888
891 // Backing store = external_pointer + base_pointer. 889 // Backing store = external_pointer + base_pointer.
892 Node* external_pointer = 890 Node* external_pointer =
893 LoadObjectField(elements, FixedTypedArrayBase::kExternalPointerOffset, 891 LoadObjectField(elements, FixedTypedArrayBase::kExternalPointerOffset,
894 MachineType::Pointer()); 892 MachineType::Pointer());
895 Node* base_pointer = 893 Node* base_pointer =
896 LoadObjectField(elements, FixedTypedArrayBase::kBasePointerOffset, 894 LoadObjectField(elements, FixedTypedArrayBase::kBasePointerOffset);
897 MachineType::Pointer()); 895 Node* backing_store =
898 Node* backing_store = IntPtrAdd(external_pointer, base_pointer); 896 IntPtrAdd(external_pointer, BitcastTaggedToWord(base_pointer));
899 897
900 Label uint8_elements(this), int8_elements(this), uint16_elements(this), 898 Label uint8_elements(this), int8_elements(this), uint16_elements(this),
901 int16_elements(this), uint32_elements(this), int32_elements(this), 899 int16_elements(this), uint32_elements(this), int32_elements(this),
902 float32_elements(this), float64_elements(this); 900 float32_elements(this), float64_elements(this);
903 Label* elements_kind_labels[] = { 901 Label* elements_kind_labels[] = {
904 &uint8_elements, &uint8_elements, &int8_elements, 902 &uint8_elements, &uint8_elements, &int8_elements,
905 &uint16_elements, &int16_elements, &uint32_elements, 903 &uint16_elements, &int16_elements, &uint32_elements,
906 &int32_elements, &float32_elements, &float64_elements}; 904 &int32_elements, &float32_elements, &float64_elements};
907 int32_t elements_kinds[] = { 905 int32_t elements_kinds[] = {
908 UINT8_ELEMENTS, UINT8_CLAMPED_ELEMENTS, INT8_ELEMENTS, 906 UINT8_ELEMENTS, UINT8_CLAMPED_ELEMENTS, INT8_ELEMENTS,
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1827 void AccessorAssembler::GenerateKeyedStoreICTrampolineTF( 1825 void AccessorAssembler::GenerateKeyedStoreICTrampolineTF(
1828 CodeAssemblerState* state, LanguageMode language_mode) { 1826 CodeAssemblerState* state, LanguageMode language_mode) {
1829 AccessorAssemblerImpl assembler(state); 1827 AccessorAssemblerImpl assembler(state);
1830 assembler.GenerateKeyedStoreICTrampolineTF(language_mode); 1828 assembler.GenerateKeyedStoreICTrampolineTF(language_mode);
1831 } 1829 }
1832 1830
1833 #undef ACCESSOR_ASSEMBLER_PUBLIC_INTERFACE 1831 #undef ACCESSOR_ASSEMBLER_PUBLIC_INTERFACE
1834 1832
1835 } // namespace internal 1833 } // namespace internal
1836 } // namespace v8 1834 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698