| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 2092859cd55deebe68fbbd54d51bb43a3ff3ac12..c71163a99acba8ac22070694da39e2177df44cfc 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -9129,6 +9129,22 @@ Map* Code::FindFirstMap() {
|
| }
|
|
|
|
|
| +void Code::ReplaceFirstMap(Map* replace_with) {
|
| + ASSERT(is_inline_cache_stub());
|
| + AssertNoAllocation no_allocation;
|
| + int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT);
|
| + for (RelocIterator it(this, mask); !it.done(); it.next()) {
|
| + RelocInfo* info = it.rinfo();
|
| + Object* object = info->target_object();
|
| + if (object->IsMap()) {
|
| + info->set_target_object(replace_with);
|
| + return;
|
| + }
|
| + }
|
| + UNREACHABLE();
|
| +}
|
| +
|
| +
|
| void Code::FindAllMaps(MapHandleList* maps) {
|
| ASSERT(is_inline_cache_stub());
|
| AssertNoAllocation no_allocation;
|
| @@ -9324,6 +9340,7 @@ const char* Code::Kind2String(Kind kind) {
|
| case UNARY_OP_IC: return "UNARY_OP_IC";
|
| case BINARY_OP_IC: return "BINARY_OP_IC";
|
| case COMPARE_IC: return "COMPARE_IC";
|
| + case COMPARE_NIL_IC: return "COMPARE_NIL_IC";
|
| case TO_BOOLEAN_IC: return "TO_BOOLEAN_IC";
|
| }
|
| UNREACHABLE();
|
|
|