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

Side by Side Diff: src/objects.cc

Issue 203583007: Support weak heap references in the ConstantPool to support IsWeakObjectInOptimizedCode objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 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 9453 matching lines...) Expand 10 before | Expand all | Expand 10 after
9464 9464
9465 void ConstantPoolArray::ConstantPoolIterateBody(ObjectVisitor* v) { 9465 void ConstantPoolArray::ConstantPoolIterateBody(ObjectVisitor* v) {
9466 for (int i = 0; i < count_of_code_ptr_entries(); i++) { 9466 for (int i = 0; i < count_of_code_ptr_entries(); i++) {
9467 int index = first_code_ptr_index() + i; 9467 int index = first_code_ptr_index() + i;
9468 v->VisitCodeEntry(reinterpret_cast<Address>(RawFieldOfElementAt(index))); 9468 v->VisitCodeEntry(reinterpret_cast<Address>(RawFieldOfElementAt(index)));
9469 } 9469 }
9470 for (int i = 0; i < count_of_heap_ptr_entries(); i++) { 9470 for (int i = 0; i < count_of_heap_ptr_entries(); i++) {
9471 int index = first_heap_ptr_index() + i; 9471 int index = first_heap_ptr_index() + i;
9472 v->VisitPointer(RawFieldOfElementAt(index)); 9472 v->VisitPointer(RawFieldOfElementAt(index));
9473 } 9473 }
9474 for (int i = 0; i < count_of_weak_ptr_entries(); i++) {
9475 int index = first_weak_ptr_index() + i;
9476 v->VisitPointer(RawFieldOfElementAt(index));
9477 }
9474 } 9478 }
9475 9479
9476 9480
9477 void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) { 9481 void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) {
9478 // Iterate over all fields in the body but take care in dealing with 9482 // Iterate over all fields in the body but take care in dealing with
9479 // the code entry. 9483 // the code entry.
9480 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset); 9484 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset);
9481 v->VisitCodeEntry(this->address() + kCodeEntryOffset); 9485 v->VisitCodeEntry(this->address() + kCodeEntryOffset);
9482 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); 9486 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size);
9483 } 9487 }
(...skipping 7008 matching lines...) Expand 10 before | Expand all | Expand 10 after
16492 #define ERROR_MESSAGES_TEXTS(C, T) T, 16496 #define ERROR_MESSAGES_TEXTS(C, T) T,
16493 static const char* error_messages_[] = { 16497 static const char* error_messages_[] = {
16494 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16498 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16495 }; 16499 };
16496 #undef ERROR_MESSAGES_TEXTS 16500 #undef ERROR_MESSAGES_TEXTS
16497 return error_messages_[reason]; 16501 return error_messages_[reason];
16498 } 16502 }
16499 16503
16500 16504
16501 } } // namespace v8::internal 16505 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | src/objects-visiting-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698