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(); |