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

Side by Side Diff: src/objects.cc

Issue 13728002: Add an IC for CompareNil operations (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix SunSpider regression Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 9111 matching lines...) Expand 10 before | Expand all | Expand 10 after
9122 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); 9122 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT);
9123 for (RelocIterator it(this, mask); !it.done(); it.next()) { 9123 for (RelocIterator it(this, mask); !it.done(); it.next()) {
9124 RelocInfo* info = it.rinfo(); 9124 RelocInfo* info = it.rinfo();
9125 Object* object = info->target_object(); 9125 Object* object = info->target_object();
9126 if (object->IsMap()) return Map::cast(object); 9126 if (object->IsMap()) return Map::cast(object);
9127 } 9127 }
9128 return NULL; 9128 return NULL;
9129 } 9129 }
9130 9130
9131 9131
9132 void Code::ReplaceFirstMap(Map* replace_with) {
9133 ASSERT(is_inline_cache_stub());
9134 AssertNoAllocation no_allocation;
9135 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT);
9136 for (RelocIterator it(this, mask); !it.done(); it.next()) {
9137 RelocInfo* info = it.rinfo();
9138 Object* object = info->target_object();
9139 if (object->IsMap()) {
9140 info->set_target_object(replace_with);
9141 return;
9142 }
9143 }
9144 UNREACHABLE();
9145 }
9146
9147
9132 void Code::FindAllMaps(MapHandleList* maps) { 9148 void Code::FindAllMaps(MapHandleList* maps) {
9133 ASSERT(is_inline_cache_stub()); 9149 ASSERT(is_inline_cache_stub());
9134 AssertNoAllocation no_allocation; 9150 AssertNoAllocation no_allocation;
9135 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); 9151 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT);
9136 for (RelocIterator it(this, mask); !it.done(); it.next()) { 9152 for (RelocIterator it(this, mask); !it.done(); it.next()) {
9137 RelocInfo* info = it.rinfo(); 9153 RelocInfo* info = it.rinfo();
9138 Object* object = info->target_object(); 9154 Object* object = info->target_object();
9139 if (object->IsMap()) maps->Add(Handle<Map>(Map::cast(object))); 9155 if (object->IsMap()) maps->Add(Handle<Map>(Map::cast(object)));
9140 } 9156 }
9141 } 9157 }
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
9317 case BUILTIN: return "BUILTIN"; 9333 case BUILTIN: return "BUILTIN";
9318 case LOAD_IC: return "LOAD_IC"; 9334 case LOAD_IC: return "LOAD_IC";
9319 case KEYED_LOAD_IC: return "KEYED_LOAD_IC"; 9335 case KEYED_LOAD_IC: return "KEYED_LOAD_IC";
9320 case STORE_IC: return "STORE_IC"; 9336 case STORE_IC: return "STORE_IC";
9321 case KEYED_STORE_IC: return "KEYED_STORE_IC"; 9337 case KEYED_STORE_IC: return "KEYED_STORE_IC";
9322 case CALL_IC: return "CALL_IC"; 9338 case CALL_IC: return "CALL_IC";
9323 case KEYED_CALL_IC: return "KEYED_CALL_IC"; 9339 case KEYED_CALL_IC: return "KEYED_CALL_IC";
9324 case UNARY_OP_IC: return "UNARY_OP_IC"; 9340 case UNARY_OP_IC: return "UNARY_OP_IC";
9325 case BINARY_OP_IC: return "BINARY_OP_IC"; 9341 case BINARY_OP_IC: return "BINARY_OP_IC";
9326 case COMPARE_IC: return "COMPARE_IC"; 9342 case COMPARE_IC: return "COMPARE_IC";
9343 case COMPARE_NIL_IC: return "COMPARE_NIL_IC";
9327 case TO_BOOLEAN_IC: return "TO_BOOLEAN_IC"; 9344 case TO_BOOLEAN_IC: return "TO_BOOLEAN_IC";
9328 } 9345 }
9329 UNREACHABLE(); 9346 UNREACHABLE();
9330 return NULL; 9347 return NULL;
9331 } 9348 }
9332 9349
9333 9350
9334 #ifdef ENABLE_DISASSEMBLER 9351 #ifdef ENABLE_DISASSEMBLER
9335 9352
9336 void DeoptimizationInputData::DeoptimizationInputDataPrint(FILE* out) { 9353 void DeoptimizationInputData::DeoptimizationInputDataPrint(FILE* out) {
(...skipping 5141 matching lines...) Expand 10 before | Expand all | Expand 10 after
14478 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 14495 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
14479 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 14496 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
14480 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 14497 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
14481 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 14498 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
14482 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 14499 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
14483 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 14500 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
14484 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 14501 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
14485 } 14502 }
14486 14503
14487 } } // namespace v8::internal 14504 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698