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

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: 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
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('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 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 index = first_code_ptr_index() + i;
9471 int last_ptr_offset = 9471 v->VisitCodeEntry(reinterpret_cast<Address>(RawFieldOfElementAt(index)));
9472 OffsetOfElementAt(first_ptr_index() + count_of_ptr_entries() - 1); 9472 }
9473 v->VisitPointers( 9473 for (int i = 0; i < count_of_heap_ptr_entries(); i++) {
9474 HeapObject::RawField(this, first_ptr_offset), 9474 int index = first_heap_ptr_index() + i;
9475 HeapObject::RawField(this, last_ptr_offset)); 9475 v->VisitPointer(RawFieldOfElementAt(index));
9476 } 9476 }
9477 } 9477 }
9478 9478
9479 9479
9480 void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) { 9480 void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) {
9481 // Iterate over all fields in the body but take care in dealing with 9481 // Iterate over all fields in the body but take care in dealing with
9482 // the code entry. 9482 // the code entry.
9483 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset); 9483 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset);
9484 v->VisitCodeEntry(this->address() + kCodeEntryOffset); 9484 v->VisitCodeEntry(this->address() + kCodeEntryOffset);
9485 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); 9485 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, 16501 #define ERROR_MESSAGES_TEXTS(C, T) T,
16502 static const char* error_messages_[] = { 16502 static const char* error_messages_[] = {
16503 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16503 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16504 }; 16504 };
16505 #undef ERROR_MESSAGES_TEXTS 16505 #undef ERROR_MESSAGES_TEXTS
16506 return error_messages_[reason]; 16506 return error_messages_[reason];
16507 } 16507 }
16508 16508
16509 16509
16510 } } // namespace v8::internal 16510 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698