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

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

Issue 1795793002: [compiler] Introduce code stubs for abstract equality. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: instancetype -> instance_type 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
« no previous file with comments | « src/compiler/code-stub-assembler.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-stub-assembler.cc
diff --git a/src/compiler/code-stub-assembler.cc b/src/compiler/code-stub-assembler.cc
index 4aac16bd1492480472cd51da9798b4bc94be05c1..a7cb6df0795ebb53778701a9d4eb809aecf7c476 100644
--- a/src/compiler/code-stub-assembler.cc
+++ b/src/compiler/code-stub-assembler.cc
@@ -105,6 +105,10 @@ Node* CodeStubAssembler::Float64Constant(double value) {
return raw_assembler_->Float64Constant(value);
}
+Node* CodeStubAssembler::BooleanMapConstant() {
+ return HeapConstant(isolate()->factory()->boolean_map());
+}
+
Node* CodeStubAssembler::HeapNumberMapConstant() {
return HeapConstant(isolate()->factory()->heap_number_map());
}
@@ -222,6 +226,11 @@ Node* CodeStubAssembler::LoadHeapNumberValue(Node* object) {
IntPtrConstant(HeapNumber::kValueOffset - kHeapObjectTag));
}
+Node* CodeStubAssembler::LoadMapBitField(Node* map) {
+ return Load(MachineType::Uint8(), map,
+ IntPtrConstant(Map::kBitFieldOffset - kHeapObjectTag));
+}
+
Node* CodeStubAssembler::LoadMapInstanceType(Node* map) {
return Load(MachineType::Uint8(), map,
IntPtrConstant(Map::kInstanceTypeOffset - kHeapObjectTag));
@@ -429,8 +438,12 @@ Node* CodeStubAssembler::Projection(int index, Node* value) {
return raw_assembler_->Projection(index, value);
}
+Node* CodeStubAssembler::LoadMap(Node* object) {
+ return LoadObjectField(object, HeapObject::kMapOffset);
+}
+
Node* CodeStubAssembler::LoadInstanceType(Node* object) {
- return LoadMapInstanceType(LoadObjectField(object, HeapObject::kMapOffset));
+ return LoadMapInstanceType(LoadMap(object));
}
Node* CodeStubAssembler::BitFieldDecode(Node* word32, uint32_t shift,
@@ -527,6 +540,16 @@ void CodeStubAssembler::BranchIfFloat64GreaterThanOrEqual(Node* a, Node* b,
Goto(if_false);
}
+void CodeStubAssembler::BranchIfWord32Equal(Node* a, Node* b, Label* if_true,
+ Label* if_false) {
+ Label if_equal(this), if_notequal(this);
+ Branch(Word32Equal(a, b), &if_equal, &if_notequal);
+ Bind(&if_equal);
+ Goto(if_true);
+ Bind(&if_notequal);
+ Goto(if_false);
+}
+
Node* CodeStubAssembler::CallN(CallDescriptor* descriptor, Node* code_target,
Node** args) {
CallPrologue();
« no previous file with comments | « src/compiler/code-stub-assembler.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698