OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 9003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9014 void ObjectVisitor::VisitEmbeddedPointer(RelocInfo* rinfo) { | 9014 void ObjectVisitor::VisitEmbeddedPointer(RelocInfo* rinfo) { |
9015 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); | 9015 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); |
9016 VisitPointer(rinfo->target_object_address()); | 9016 VisitPointer(rinfo->target_object_address()); |
9017 } | 9017 } |
9018 | 9018 |
9019 void ObjectVisitor::VisitExternalReference(RelocInfo* rinfo) { | 9019 void ObjectVisitor::VisitExternalReference(RelocInfo* rinfo) { |
9020 Address* p = rinfo->target_reference_address(); | 9020 Address* p = rinfo->target_reference_address(); |
9021 VisitExternalReferences(p, p + 1); | 9021 VisitExternalReferences(p, p + 1); |
9022 } | 9022 } |
9023 | 9023 |
| 9024 byte Code::compare_nil_state() { |
| 9025 ASSERT(is_compare_nil_ic_stub()); |
| 9026 return CompareNilICStub::TypesFromExtraICState(extended_extra_ic_state()); |
| 9027 } |
| 9028 |
| 9029 |
9024 void Code::InvalidateRelocation() { | 9030 void Code::InvalidateRelocation() { |
9025 set_relocation_info(GetHeap()->empty_byte_array()); | 9031 set_relocation_info(GetHeap()->empty_byte_array()); |
9026 } | 9032 } |
9027 | 9033 |
9028 | 9034 |
9029 void Code::Relocate(intptr_t delta) { | 9035 void Code::Relocate(intptr_t delta) { |
9030 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { | 9036 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
9031 it.rinfo()->apply(delta); | 9037 it.rinfo()->apply(delta); |
9032 } | 9038 } |
9033 CPU::FlushICache(instruction_start(), instruction_size()); | 9039 CPU::FlushICache(instruction_start(), instruction_size()); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9149 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); | 9155 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
9150 for (RelocIterator it(this, mask); !it.done(); it.next()) { | 9156 for (RelocIterator it(this, mask); !it.done(); it.next()) { |
9151 RelocInfo* info = it.rinfo(); | 9157 RelocInfo* info = it.rinfo(); |
9152 Object* object = info->target_object(); | 9158 Object* object = info->target_object(); |
9153 if (object->IsMap()) return Map::cast(object); | 9159 if (object->IsMap()) return Map::cast(object); |
9154 } | 9160 } |
9155 return NULL; | 9161 return NULL; |
9156 } | 9162 } |
9157 | 9163 |
9158 | 9164 |
| 9165 void Code::ReplaceFirstMap(Map* replace_with) { |
| 9166 ASSERT(is_inline_cache_stub()); |
| 9167 AssertNoAllocation no_allocation; |
| 9168 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
| 9169 for (RelocIterator it(this, mask); !it.done(); it.next()) { |
| 9170 RelocInfo* info = it.rinfo(); |
| 9171 Object* object = info->target_object(); |
| 9172 if (object->IsMap()) { |
| 9173 info->set_target_object(replace_with); |
| 9174 return; |
| 9175 } |
| 9176 } |
| 9177 UNREACHABLE(); |
| 9178 } |
| 9179 |
| 9180 |
9159 void Code::FindAllMaps(MapHandleList* maps) { | 9181 void Code::FindAllMaps(MapHandleList* maps) { |
9160 ASSERT(is_inline_cache_stub()); | 9182 ASSERT(is_inline_cache_stub()); |
9161 AssertNoAllocation no_allocation; | 9183 AssertNoAllocation no_allocation; |
9162 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); | 9184 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
9163 for (RelocIterator it(this, mask); !it.done(); it.next()) { | 9185 for (RelocIterator it(this, mask); !it.done(); it.next()) { |
9164 RelocInfo* info = it.rinfo(); | 9186 RelocInfo* info = it.rinfo(); |
9165 Object* object = info->target_object(); | 9187 Object* object = info->target_object(); |
9166 if (object->IsMap()) maps->Add(Handle<Map>(Map::cast(object))); | 9188 if (object->IsMap()) maps->Add(Handle<Map>(Map::cast(object))); |
9167 } | 9189 } |
9168 } | 9190 } |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9344 case BUILTIN: return "BUILTIN"; | 9366 case BUILTIN: return "BUILTIN"; |
9345 case LOAD_IC: return "LOAD_IC"; | 9367 case LOAD_IC: return "LOAD_IC"; |
9346 case KEYED_LOAD_IC: return "KEYED_LOAD_IC"; | 9368 case KEYED_LOAD_IC: return "KEYED_LOAD_IC"; |
9347 case STORE_IC: return "STORE_IC"; | 9369 case STORE_IC: return "STORE_IC"; |
9348 case KEYED_STORE_IC: return "KEYED_STORE_IC"; | 9370 case KEYED_STORE_IC: return "KEYED_STORE_IC"; |
9349 case CALL_IC: return "CALL_IC"; | 9371 case CALL_IC: return "CALL_IC"; |
9350 case KEYED_CALL_IC: return "KEYED_CALL_IC"; | 9372 case KEYED_CALL_IC: return "KEYED_CALL_IC"; |
9351 case UNARY_OP_IC: return "UNARY_OP_IC"; | 9373 case UNARY_OP_IC: return "UNARY_OP_IC"; |
9352 case BINARY_OP_IC: return "BINARY_OP_IC"; | 9374 case BINARY_OP_IC: return "BINARY_OP_IC"; |
9353 case COMPARE_IC: return "COMPARE_IC"; | 9375 case COMPARE_IC: return "COMPARE_IC"; |
| 9376 case COMPARE_NIL_IC: return "COMPARE_NIL_IC"; |
9354 case TO_BOOLEAN_IC: return "TO_BOOLEAN_IC"; | 9377 case TO_BOOLEAN_IC: return "TO_BOOLEAN_IC"; |
9355 } | 9378 } |
9356 UNREACHABLE(); | 9379 UNREACHABLE(); |
9357 return NULL; | 9380 return NULL; |
9358 } | 9381 } |
9359 | 9382 |
9360 | 9383 |
9361 #ifdef ENABLE_DISASSEMBLER | 9384 #ifdef ENABLE_DISASSEMBLER |
9362 | 9385 |
9363 void DeoptimizationInputData::DeoptimizationInputDataPrint(FILE* out) { | 9386 void DeoptimizationInputData::DeoptimizationInputDataPrint(FILE* out) { |
(...skipping 5141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14505 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 14528 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
14506 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 14529 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
14507 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 14530 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
14508 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 14531 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
14509 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 14532 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
14510 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 14533 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
14511 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 14534 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
14512 } | 14535 } |
14513 | 14536 |
14514 } } // namespace v8::internal | 14537 } } // namespace v8::internal |
OLD | NEW |