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

Side by Side Diff: src/objects.cc

Issue 26968004: Turn Load/StoreGlobal into a handler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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/ic.cc ('k') | src/stub-cache.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 10342 matching lines...) Expand 10 before | Expand all | Expand 10 after
10353 10353
10354 Map* Code::FindFirstMap() { 10354 Map* Code::FindFirstMap() {
10355 Object* result = FindNthObject(1, GetHeap()->meta_map()); 10355 Object* result = FindNthObject(1, GetHeap()->meta_map());
10356 return (result != NULL) ? Map::cast(result) : NULL; 10356 return (result != NULL) ? Map::cast(result) : NULL;
10357 } 10357 }
10358 10358
10359 10359
10360 void Code::ReplaceNthObject(int n, 10360 void Code::ReplaceNthObject(int n,
10361 Map* match_map, 10361 Map* match_map,
10362 Object* replace_with) { 10362 Object* replace_with) {
10363 ASSERT(is_inline_cache_stub()); 10363 ASSERT(is_inline_cache_stub() || is_handler());
10364 DisallowHeapAllocation no_allocation; 10364 DisallowHeapAllocation no_allocation;
10365 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); 10365 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT);
10366 for (RelocIterator it(this, mask); !it.done(); it.next()) { 10366 for (RelocIterator it(this, mask); !it.done(); it.next()) {
10367 RelocInfo* info = it.rinfo(); 10367 RelocInfo* info = it.rinfo();
10368 Object* object = info->target_object(); 10368 Object* object = info->target_object();
10369 if (object->IsHeapObject()) { 10369 if (object->IsHeapObject()) {
10370 if (HeapObject::cast(object)->map() == match_map) { 10370 if (HeapObject::cast(object)->map() == match_map) {
10371 if (--n == 0) { 10371 if (--n == 0) {
10372 info->set_target_object(replace_with); 10372 info->set_target_object(replace_with);
10373 return; 10373 return;
(...skipping 5880 matching lines...) Expand 10 before | Expand all | Expand 10 after
16254 #define ERROR_MESSAGES_TEXTS(C, T) T, 16254 #define ERROR_MESSAGES_TEXTS(C, T) T,
16255 static const char* error_messages_[] = { 16255 static const char* error_messages_[] = {
16256 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16256 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16257 }; 16257 };
16258 #undef ERROR_MESSAGES_TEXTS 16258 #undef ERROR_MESSAGES_TEXTS
16259 return error_messages_[reason]; 16259 return error_messages_[reason];
16260 } 16260 }
16261 16261
16262 16262
16263 } } // namespace v8::internal 16263 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698