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

Side by Side Diff: src/objects.cc

Issue 183883011: Differentate between code target pointers and heap pointers in constant pools. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Minor fix to ConstantPoolArray visiting 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 9448 matching lines...) Expand 10 before | Expand all | Expand 10 after
9459 9459
9460 bool Map::EquivalentToForNormalization(Map* other, 9460 bool Map::EquivalentToForNormalization(Map* other,
9461 PropertyNormalizationMode mode) { 9461 PropertyNormalizationMode mode) {
9462 int properties = mode == CLEAR_INOBJECT_PROPERTIES 9462 int properties = mode == CLEAR_INOBJECT_PROPERTIES
9463 ? 0 : other->inobject_properties(); 9463 ? 0 : other->inobject_properties();
9464 return CheckEquivalent(this, other) && inobject_properties() == properties; 9464 return CheckEquivalent(this, other) && inobject_properties() == properties;
9465 } 9465 }
9466 9466
9467 9467
9468 void ConstantPoolArray::ConstantPoolIterateBody(ObjectVisitor* v) { 9468 void ConstantPoolArray::ConstantPoolIterateBody(ObjectVisitor* v) {
9469 if (count_of_ptr_entries() > 0) { 9469 for (int i = 0; i < count_of_code_ptr_entries(); i++) {
9470 int first_ptr_offset = OffsetOfElementAt(first_ptr_index()); 9470 int offset = OffsetOfElementAt(first_code_ptr_index() + i);
Michael Starzinger 2014/03/07 15:07:47 nit: Two white-spaces after equal sign.
rmcilroy 2014/03/10 14:03:05 Done.
9471 int last_ptr_offset = 9471 v->VisitCodeEntry(
9472 OffsetOfElementAt(first_ptr_index() + count_of_ptr_entries() - 1); 9472 reinterpret_cast<Address>(HeapObject::RawField(this, offset)));
9473 v->VisitPointers( 9473 }
9474 HeapObject::RawField(this, first_ptr_offset), 9474 for (int i = 0; i < count_of_heap_ptr_entries(); i++) {
9475 HeapObject::RawField(this, last_ptr_offset)); 9475 int offset = OffsetOfElementAt(first_heap_ptr_index() + i);
Michael Starzinger 2014/03/07 15:07:47 nit: Two white-spaces after equal sign.
rmcilroy 2014/03/10 14:03:05 Done.
9476 v->VisitPointer(HeapObject::RawField(this, offset));
9476 } 9477 }
9477 } 9478 }
9478 9479
9479 9480
9480 void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) { 9481 void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) {
9481 // 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
9482 // the code entry. 9483 // the code entry.
9483 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset); 9484 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset);
9484 v->VisitCodeEntry(this->address() + kCodeEntryOffset); 9485 v->VisitCodeEntry(this->address() + kCodeEntryOffset);
9485 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); 9486 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size);
(...skipping 7015 matching lines...) Expand 10 before | Expand all | Expand 10 after
16501 #define ERROR_MESSAGES_TEXTS(C, T) T, 16502 #define ERROR_MESSAGES_TEXTS(C, T) T,
16502 static const char* error_messages_[] = { 16503 static const char* error_messages_[] = {
16503 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16504 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16504 }; 16505 };
16505 #undef ERROR_MESSAGES_TEXTS 16506 #undef ERROR_MESSAGES_TEXTS
16506 return error_messages_[reason]; 16507 return error_messages_[reason];
16507 } 16508 }
16508 16509
16509 16510
16510 } } // namespace v8::internal 16511 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698