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

Side by Side Diff: src/objects.cc

Issue 133353005: Revert "Implement zone-allocated types" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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/types.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 7839 matching lines...) Expand 10 before | Expand all | Expand 10 after
7850 { MaybeObject* maybe_obj = key.AsObject(GetHeap()); 7850 { MaybeObject* maybe_obj = key.AsObject(GetHeap());
7851 if (!maybe_obj->ToObject(&obj)) return maybe_obj; 7851 if (!maybe_obj->ToObject(&obj)) return maybe_obj;
7852 } 7852 }
7853 cache->set(EntryToIndex(entry), obj); 7853 cache->set(EntryToIndex(entry), obj);
7854 cache->set(EntryToIndex(entry) + 1, code); 7854 cache->set(EntryToIndex(entry) + 1, code);
7855 cache->ElementAdded(); 7855 cache->ElementAdded();
7856 return cache; 7856 return cache;
7857 } 7857 }
7858 7858
7859 7859
7860 void FixedArray::Shrink(int new_length) {
7861 ASSERT(new_length <= length());
7862 if (new_length < length()) {
7863 RightTrimFixedArray<FROM_MUTATOR>(GetHeap(), this, length() - new_length);
7864 }
7865 }
7866
7867
7868 MaybeObject* FixedArray::AddKeysFromJSArray(JSArray* array) { 7860 MaybeObject* FixedArray::AddKeysFromJSArray(JSArray* array) {
7869 ElementsAccessor* accessor = array->GetElementsAccessor(); 7861 ElementsAccessor* accessor = array->GetElementsAccessor();
7870 MaybeObject* maybe_result = 7862 MaybeObject* maybe_result =
7871 accessor->AddElementsToFixedArray(array, array, this); 7863 accessor->AddElementsToFixedArray(array, array, this);
7872 FixedArray* result; 7864 FixedArray* result;
7873 if (!maybe_result->To<FixedArray>(&result)) return maybe_result; 7865 if (!maybe_result->To<FixedArray>(&result)) return maybe_result;
7874 #ifdef ENABLE_SLOW_ASSERTS 7866 #ifdef ENABLE_SLOW_ASSERTS
7875 if (FLAG_enable_slow_asserts) { 7867 if (FLAG_enable_slow_asserts) {
7876 for (int i = 0; i < result->length(); i++) { 7868 for (int i = 0; i < result->length(); i++) {
7877 Object* current = result->get(i); 7869 Object* current = result->get(i);
(...skipping 8806 matching lines...) Expand 10 before | Expand all | Expand 10 after
16684 #define ERROR_MESSAGES_TEXTS(C, T) T, 16676 #define ERROR_MESSAGES_TEXTS(C, T) T,
16685 static const char* error_messages_[] = { 16677 static const char* error_messages_[] = {
16686 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16678 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16687 }; 16679 };
16688 #undef ERROR_MESSAGES_TEXTS 16680 #undef ERROR_MESSAGES_TEXTS
16689 return error_messages_[reason]; 16681 return error_messages_[reason];
16690 } 16682 }
16691 16683
16692 16684
16693 } } // namespace v8::internal 16685 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698