summaryrefslogtreecommitdiff
path: root/deps/v8/src/ic/mips/ic-compiler-mips.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/ic/mips/ic-compiler-mips.cc')
-rw-r--r--deps/v8/src/ic/mips/ic-compiler-mips.cc110
1 files changed, 1 insertions, 109 deletions
diff --git a/deps/v8/src/ic/mips/ic-compiler-mips.cc b/deps/v8/src/ic/mips/ic-compiler-mips.cc
index 64f1662880..86a602b3ec 100644
--- a/deps/v8/src/ic/mips/ic-compiler-mips.cc
+++ b/deps/v8/src/ic/mips/ic-compiler-mips.cc
@@ -10,114 +10,6 @@
namespace v8 {
namespace internal {
-#define __ ACCESS_MASM(masm())
-
-
-Handle<Code> PropertyICCompiler::CompilePolymorphic(MapHandleList* maps,
- CodeHandleList* handlers,
- Handle<Name> name,
- Code::StubType type,
- IcCheckType check) {
- Label miss;
-
- if (check == PROPERTY &&
- (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) {
- // In case we are compiling an IC for dictionary loads or stores, just
- // check whether the name is unique.
- if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) {
- // Keyed loads with dictionaries shouldn't be here, they go generic.
- // The DCHECK is to protect assumptions when --vector-ics is on.
- DCHECK(kind() != Code::KEYED_LOAD_IC);
- Register tmp = scratch1();
- __ JumpIfSmi(this->name(), &miss);
- __ lw(tmp, FieldMemOperand(this->name(), HeapObject::kMapOffset));
- __ lbu(tmp, FieldMemOperand(tmp, Map::kInstanceTypeOffset));
- __ JumpIfNotUniqueNameInstanceType(tmp, &miss);
- } else {
- __ Branch(&miss, ne, this->name(), Operand(name));
- }
- }
-
- Label number_case;
- Register match = scratch2();
- Label* smi_target = IncludesNumberMap(maps) ? &number_case : &miss;
- __ JumpIfSmi(receiver(), smi_target, match); // Reg match is 0 if Smi.
-
- // Polymorphic keyed stores may use the map register
- Register map_reg = scratch1();
- DCHECK(kind() != Code::KEYED_STORE_IC ||
- map_reg.is(StoreTransitionDescriptor::MapRegister()));
-
- int receiver_count = maps->length();
- int number_of_handled_maps = 0;
- __ lw(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset));
- for (int current = 0; current < receiver_count; ++current) {
- Handle<Map> map = maps->at(current);
- if (!map->is_deprecated()) {
- number_of_handled_maps++;
- // Check map and tail call if there's a match.
- // Separate compare from branch, to provide path for above JumpIfSmi().
- Handle<WeakCell> cell = Map::WeakCellForMap(map);
- __ GetWeakValue(match, cell);
- __ Subu(match, match, Operand(map_reg));
- if (map->instance_type() == HEAP_NUMBER_TYPE) {
- DCHECK(!number_case.is_unused());
- __ bind(&number_case);
- }
- __ Jump(handlers->at(current), RelocInfo::CODE_TARGET, eq, match,
- Operand(zero_reg));
- }
- }
- DCHECK(number_of_handled_maps != 0);
-
- __ bind(&miss);
- TailCallBuiltin(masm(), MissBuiltin(kind()));
-
- // Return the generated code.
- InlineCacheState state =
- number_of_handled_maps > 1 ? POLYMORPHIC : MONOMORPHIC;
- return GetCode(kind(), type, name, state);
-}
-
-
-Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
- MapHandleList* receiver_maps, CodeHandleList* handler_stubs,
- MapHandleList* transitioned_maps) {
- Label miss;
- __ JumpIfSmi(receiver(), &miss);
-
- int receiver_count = receiver_maps->length();
- Register map_reg = scratch1();
- Register match = scratch2();
- __ lw(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset));
- for (int i = 0; i < receiver_count; ++i) {
- Handle<WeakCell> cell = Map::WeakCellForMap(receiver_maps->at(i));
- __ GetWeakValue(match, cell);
- if (transitioned_maps->at(i).is_null()) {
- __ Jump(handler_stubs->at(i), RelocInfo::CODE_TARGET, eq, match,
- Operand(map_reg));
- } else {
- Label next_map;
- __ Branch(&next_map, ne, match, Operand(map_reg));
- Handle<WeakCell> cell = Map::WeakCellForMap(transitioned_maps->at(i));
- Register transition_map = scratch1();
- DCHECK(!FLAG_vector_stores &&
- transition_map.is(StoreTransitionDescriptor::MapRegister()));
- __ LoadWeakValue(transition_map, cell, &miss);
- __ Jump(handler_stubs->at(i), RelocInfo::CODE_TARGET);
- __ bind(&next_map);
- }
- }
-
- __ bind(&miss);
- TailCallBuiltin(masm(), MissBuiltin(kind()));
-
- // Return the generated code.
- return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC);
-}
-
-
-#undef __
#define __ ACCESS_MASM(masm)
@@ -130,7 +22,7 @@ void PropertyICCompiler::GenerateRuntimeSetProperty(
__ Push(a0);
// Do tail-call to runtime routine.
- __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
+ __ TailCallRuntime(Runtime::kSetProperty);
}