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

Unified Diff: src/compiler/code-stub-assembler.cc

Issue 1843613002: Add initial code-stub version of Object.prototype.hasOwnProperty (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/code-stub-assembler.cc
diff --git a/src/compiler/code-stub-assembler.cc b/src/compiler/code-stub-assembler.cc
index fb43c924970d5f9ab0da0e4e5bda2bf379b5c3f8..12632b1df5fbd9dbbba2e25979e90205c6c07ae2 100644
--- a/src/compiler/code-stub-assembler.cc
+++ b/src/compiler/code-stub-assembler.cc
@@ -458,11 +458,39 @@ Node* CodeStubAssembler::LoadMapBitField(Node* map) {
IntPtrConstant(Map::kBitFieldOffset - kHeapObjectTag));
}
+Node* CodeStubAssembler::LoadMapBitField2(Node* map) {
+ return Load(MachineType::Uint8(), map,
+ IntPtrConstant(Map::kBitField2Offset - kHeapObjectTag));
+}
+
+Node* CodeStubAssembler::LoadMapBitField3(Node* map) {
+ return Load(MachineType::Uint32(), map,
+ IntPtrConstant(Map::kBitField3Offset - kHeapObjectTag));
+}
+
Node* CodeStubAssembler::LoadMapInstanceType(Node* map) {
return Load(MachineType::Uint8(), map,
IntPtrConstant(Map::kInstanceTypeOffset - kHeapObjectTag));
}
+Node* CodeStubAssembler::LoadMapDescriptors(Node* map) {
+ return LoadObjectField(map, Map::kDescriptorsOffset);
+}
+
+Node* CodeStubAssembler::LoadNameHash(Node* name) {
+ return Load(MachineType::Uint32(), name,
+ IntPtrConstant(Name::kHashFieldOffset - kHeapObjectTag));
+}
+
+Node* CodeStubAssembler::LoadFixedArrayElementInt32Index(
+ Node* object, Node* int32_index, int additional_offset) {
+ Node* header_size = IntPtrConstant(additional_offset +
+ FixedArray::kHeaderSize - kHeapObjectTag);
+ Node* scaled_index = WordShl(int32_index, IntPtrConstant(kPointerSizeLog2));
+ Node* offset = IntPtrAdd(scaled_index, header_size);
+ return Load(MachineType::AnyTagged(), object, offset);
+}
+
Node* CodeStubAssembler::LoadFixedArrayElementSmiIndex(Node* object,
Node* smi_index,
int additional_offset) {
@@ -691,6 +719,14 @@ Node* CodeStubAssembler::LoadInstanceType(Node* object) {
return LoadMapInstanceType(LoadMap(object));
}
+Node* CodeStubAssembler::LoadElements(Node* object) {
+ return LoadObjectField(object, JSObject::kElementsOffset);
+}
+
+Node* CodeStubAssembler::LoadFixedArrayBaseLength(Node* array) {
+ return LoadObjectField(array, FixedArrayBase::kLengthOffset);
+}
+
Node* CodeStubAssembler::BitFieldDecode(Node* word32, uint32_t shift,
uint32_t mask) {
return raw_assembler_->Word32Shr(
« src/builtins.cc ('K') | « src/compiler/code-stub-assembler.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698