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

Side by Side Diff: src/objects.cc

Issue 59383012: Age ICs on context dispose notification. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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/heap.cc ('k') | no next file » | 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 9539 matching lines...) Expand 10 before | Expand all | Expand 10 after
9550 FixedArray* literals) { 9550 FixedArray* literals) {
9551 ASSERT(code->kind() == Code::OPTIMIZED_FUNCTION); 9551 ASSERT(code->kind() == Code::OPTIMIZED_FUNCTION);
9552 ASSERT(native_context->IsNativeContext()); 9552 ASSERT(native_context->IsNativeContext());
9553 STATIC_ASSERT(kEntryLength == 3); 9553 STATIC_ASSERT(kEntryLength == 3);
9554 Heap* heap = GetHeap(); 9554 Heap* heap = GetHeap();
9555 FixedArray* new_code_map; 9555 FixedArray* new_code_map;
9556 Object* value = optimized_code_map(); 9556 Object* value = optimized_code_map();
9557 if (value->IsSmi()) { 9557 if (value->IsSmi()) {
9558 // No optimized code map. 9558 // No optimized code map.
9559 ASSERT_EQ(0, Smi::cast(value)->value()); 9559 ASSERT_EQ(0, Smi::cast(value)->value());
9560 // Crate 3 entries per context {context, code, literals}. 9560 // Create 3 entries per context {context, code, literals}.
9561 MaybeObject* maybe = heap->AllocateFixedArray(kInitialLength); 9561 MaybeObject* maybe = heap->AllocateFixedArray(kInitialLength);
9562 if (!maybe->To(&new_code_map)) return maybe; 9562 if (!maybe->To(&new_code_map)) return maybe;
9563 new_code_map->set(kEntriesStart + 0, native_context); 9563 new_code_map->set(kEntriesStart + 0, native_context);
9564 new_code_map->set(kEntriesStart + 1, code); 9564 new_code_map->set(kEntriesStart + 1, code);
9565 new_code_map->set(kEntriesStart + 2, literals); 9565 new_code_map->set(kEntriesStart + 2, literals);
9566 } else { 9566 } else {
9567 // Copy old map and append one new entry. 9567 // Copy old map and append one new entry.
9568 FixedArray* old_code_map = FixedArray::cast(value); 9568 FixedArray* old_code_map = FixedArray::cast(value);
9569 ASSERT_EQ(-1, SearchOptimizedCodeMap(native_context)); 9569 ASSERT_EQ(-1, SearchOptimizedCodeMap(native_context));
9570 int old_length = old_code_map->length(); 9570 int old_length = old_code_map->length();
(...skipping 6907 matching lines...) Expand 10 before | Expand all | Expand 10 after
16478 #define ERROR_MESSAGES_TEXTS(C, T) T, 16478 #define ERROR_MESSAGES_TEXTS(C, T) T,
16479 static const char* error_messages_[] = { 16479 static const char* error_messages_[] = {
16480 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16480 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16481 }; 16481 };
16482 #undef ERROR_MESSAGES_TEXTS 16482 #undef ERROR_MESSAGES_TEXTS
16483 return error_messages_[reason]; 16483 return error_messages_[reason];
16484 } 16484 }
16485 16485
16486 16486
16487 } } // namespace v8::internal 16487 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698