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

Side by Side Diff: src/objects-inl.h

Issue 226153002: Callers of ElementsAccessor::Validate() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review notes Created 6 years, 8 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.cc ('k') | src/runtime.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 return true; 1489 return true;
1490 } 1490 }
1491 1491
1492 1492
1493 FixedArrayBase* JSObject::elements() { 1493 FixedArrayBase* JSObject::elements() {
1494 Object* array = READ_FIELD(this, kElementsOffset); 1494 Object* array = READ_FIELD(this, kElementsOffset);
1495 return static_cast<FixedArrayBase*>(array); 1495 return static_cast<FixedArrayBase*>(array);
1496 } 1496 }
1497 1497
1498 1498
1499 void JSObject::ValidateElements() { 1499 void JSObject::ValidateElements(Handle<JSObject> object) {
1500 #ifdef ENABLE_SLOW_ASSERTS 1500 #ifdef ENABLE_SLOW_ASSERTS
1501 if (FLAG_enable_slow_asserts) { 1501 if (FLAG_enable_slow_asserts) {
1502 ElementsAccessor* accessor = GetElementsAccessor(); 1502 ElementsAccessor* accessor = object->GetElementsAccessor();
1503 accessor->Validate(this); 1503 accessor->Validate(object);
1504 } 1504 }
1505 #endif 1505 #endif
1506 } 1506 }
1507 1507
1508 1508
1509 void AllocationSite::Initialize() { 1509 void AllocationSite::Initialize() {
1510 set_transition_info(Smi::FromInt(0)); 1510 set_transition_info(Smi::FromInt(0));
1511 SetElementsKind(GetInitialFastElementsKind()); 1511 SetElementsKind(GetInitialFastElementsKind());
1512 set_nested_site(Smi::FromInt(0)); 1512 set_nested_site(Smi::FromInt(0));
1513 set_pretenure_data(Smi::FromInt(0)); 1513 set_pretenure_data(Smi::FromInt(0));
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 } 1633 }
1634 1634
1635 // Clear feedback calculation fields until the next gc. 1635 // Clear feedback calculation fields until the next gc.
1636 set_memento_found_count(0); 1636 set_memento_found_count(0);
1637 set_memento_create_count(0); 1637 set_memento_create_count(0);
1638 return decision_changed; 1638 return decision_changed;
1639 } 1639 }
1640 1640
1641 1641
1642 void JSObject::EnsureCanContainHeapObjectElements(Handle<JSObject> object) { 1642 void JSObject::EnsureCanContainHeapObjectElements(Handle<JSObject> object) {
1643 object->ValidateElements(); 1643 JSObject::ValidateElements(object);
1644 ElementsKind elements_kind = object->map()->elements_kind(); 1644 ElementsKind elements_kind = object->map()->elements_kind();
1645 if (!IsFastObjectElementsKind(elements_kind)) { 1645 if (!IsFastObjectElementsKind(elements_kind)) {
1646 if (IsFastHoleyElementsKind(elements_kind)) { 1646 if (IsFastHoleyElementsKind(elements_kind)) {
1647 TransitionElementsKind(object, FAST_HOLEY_ELEMENTS); 1647 TransitionElementsKind(object, FAST_HOLEY_ELEMENTS);
1648 } else { 1648 } else {
1649 TransitionElementsKind(object, FAST_ELEMENTS); 1649 TransitionElementsKind(object, FAST_ELEMENTS);
1650 } 1650 }
1651 } 1651 }
1652 } 1652 }
1653 1653
(...skipping 5270 matching lines...) Expand 10 before | Expand all | Expand 10 after
6924 #undef READ_UINT32_FIELD 6924 #undef READ_UINT32_FIELD
6925 #undef WRITE_UINT32_FIELD 6925 #undef WRITE_UINT32_FIELD
6926 #undef READ_SHORT_FIELD 6926 #undef READ_SHORT_FIELD
6927 #undef WRITE_SHORT_FIELD 6927 #undef WRITE_SHORT_FIELD
6928 #undef READ_BYTE_FIELD 6928 #undef READ_BYTE_FIELD
6929 #undef WRITE_BYTE_FIELD 6929 #undef WRITE_BYTE_FIELD
6930 6930
6931 } } // namespace v8::internal 6931 } } // namespace v8::internal
6932 6932
6933 #endif // V8_OBJECTS_INL_H_ 6933 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698