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

Side by Side Diff: src/heap.cc

Issue 9152001: Introduce a new AccessorPair type for handling JavaScript accessors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 8 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after
1862 code_cache->set_normal_type_cache(undefined_value(), SKIP_WRITE_BARRIER); 1862 code_cache->set_normal_type_cache(undefined_value(), SKIP_WRITE_BARRIER);
1863 return code_cache; 1863 return code_cache;
1864 } 1864 }
1865 1865
1866 1866
1867 MaybeObject* Heap::AllocatePolymorphicCodeCache() { 1867 MaybeObject* Heap::AllocatePolymorphicCodeCache() {
1868 return AllocateStruct(POLYMORPHIC_CODE_CACHE_TYPE); 1868 return AllocateStruct(POLYMORPHIC_CODE_CACHE_TYPE);
1869 } 1869 }
1870 1870
1871 1871
1872 MaybeObject* Heap::AllocateAccessorPair() {
1873 Object* result;
1874 { MaybeObject* maybe_result = AllocateStruct(ACCESSOR_PAIR_TYPE);
1875 if (!maybe_result->ToObject(&result)) return maybe_result;
1876 }
1877 AccessorPair* accessors = AccessorPair::cast(result);
1878 // Later we will have to distinguish between undefined and the hole...
1879 // accessors->set_getter(the_hole_value(), SKIP_WRITE_BARRIER);
1880 // accessors->set_setter(the_hole_value(), SKIP_WRITE_BARRIER);
1881 return accessors;
1882 }
1883
1884
1872 const Heap::StringTypeTable Heap::string_type_table[] = { 1885 const Heap::StringTypeTable Heap::string_type_table[] = {
1873 #define STRING_TYPE_ELEMENT(type, size, name, camel_name) \ 1886 #define STRING_TYPE_ELEMENT(type, size, name, camel_name) \
1874 {type, size, k##camel_name##MapRootIndex}, 1887 {type, size, k##camel_name##MapRootIndex},
1875 STRING_TYPE_LIST(STRING_TYPE_ELEMENT) 1888 STRING_TYPE_LIST(STRING_TYPE_ELEMENT)
1876 #undef STRING_TYPE_ELEMENT 1889 #undef STRING_TYPE_ELEMENT
1877 }; 1890 };
1878 1891
1879 1892
1880 const Heap::ConstantSymbolTable Heap::constant_symbol_table[] = { 1893 const Heap::ConstantSymbolTable Heap::constant_symbol_table[] = {
1881 #define CONSTANT_SYMBOL_ELEMENT(name, contents) \ 1894 #define CONSTANT_SYMBOL_ELEMENT(name, contents) \
(...skipping 4737 matching lines...) Expand 10 before | Expand all | Expand 10 after
6619 isolate_->heap()->store_buffer()->Compact(); 6632 isolate_->heap()->store_buffer()->Compact();
6620 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); 6633 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED);
6621 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { 6634 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) {
6622 next = chunk->next_chunk(); 6635 next = chunk->next_chunk();
6623 isolate_->memory_allocator()->Free(chunk); 6636 isolate_->memory_allocator()->Free(chunk);
6624 } 6637 }
6625 chunks_queued_for_free_ = NULL; 6638 chunks_queued_for_free_ = NULL;
6626 } 6639 }
6627 6640
6628 } } // namespace v8::internal 6641 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698