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

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

Issue 10556004: Revert part of 11727 as it sometimes tanked V8 benchmark (raytrace) performance (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 6 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') | test/cctest/test-heap.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 1598 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 bool JSObject::TooManyFastProperties(int properties, 1609 bool JSObject::TooManyFastProperties(int properties,
1610 JSObject::StoreFromKeyed store_mode) { 1610 JSObject::StoreFromKeyed store_mode) {
1611 // Allow extra fast properties if the object has more than 1611 // Allow extra fast properties if the object has more than
1612 // kFastPropertiesSoftLimit in-object properties. When this is the case, 1612 // kFastPropertiesSoftLimit in-object properties. When this is the case,
1613 // it is very unlikely that the object is being used as a dictionary 1613 // it is very unlikely that the object is being used as a dictionary
1614 // and there is a good chance that allowing more map transitions 1614 // and there is a good chance that allowing more map transitions
1615 // will be worth it. 1615 // will be worth it.
1616 int inobject = map()->inobject_properties(); 1616 int inobject = map()->inobject_properties();
1617 1617
1618 int limit; 1618 int limit;
1619 if (store_mode == CERTAINLY_NOT_STORE_FROM_KEYED || 1619 if (store_mode == CERTAINLY_NOT_STORE_FROM_KEYED) {
1620 map()->used_for_prototype()) {
1621 limit = Max(inobject, kMaxFastProperties); 1620 limit = Max(inobject, kMaxFastProperties);
1622 } else { 1621 } else {
1623 limit = Max(inobject, kFastPropertiesSoftLimit); 1622 limit = Max(inobject, kFastPropertiesSoftLimit);
1624 } 1623 }
1625 return properties > limit; 1624 return properties > limit;
1626 } 1625 }
1627 1626
1628 1627
1629 void Struct::InitializeBody(int object_size) { 1628 void Struct::InitializeBody(int object_size) {
1630 Object* value = GetHeap()->undefined_value(); 1629 Object* value = GetHeap()->undefined_value();
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after
2975 } else { 2974 } else {
2976 set_bit_field3(bit_field3() & ~(1 << kIsShared)); 2975 set_bit_field3(bit_field3() & ~(1 << kIsShared));
2977 } 2976 }
2978 } 2977 }
2979 2978
2980 bool Map::is_shared() { 2979 bool Map::is_shared() {
2981 return ((1 << kIsShared) & bit_field3()) != 0; 2980 return ((1 << kIsShared) & bit_field3()) != 0;
2982 } 2981 }
2983 2982
2984 2983
2985 void Map::set_used_for_prototype(bool value) {
2986 if (value) {
2987 set_bit_field3(bit_field3() | (1 << kUsedForPrototype));
2988 } else {
2989 set_bit_field3(bit_field3() & ~(1 << kUsedForPrototype));
2990 }
2991 }
2992
2993
2994 bool Map::used_for_prototype() {
2995 return ((1 << kUsedForPrototype) & bit_field3()) != 0;
2996 }
2997
2998
2999 JSFunction* Map::unchecked_constructor() { 2984 JSFunction* Map::unchecked_constructor() {
3000 return reinterpret_cast<JSFunction*>(READ_FIELD(this, kConstructorOffset)); 2985 return reinterpret_cast<JSFunction*>(READ_FIELD(this, kConstructorOffset));
3001 } 2986 }
3002 2987
3003 2988
3004 Code::Flags Code::flags() { 2989 Code::Flags Code::flags() {
3005 return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset)); 2990 return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset));
3006 } 2991 }
3007 2992
3008 2993
(...skipping 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after
5192 #undef WRITE_UINT32_FIELD 5177 #undef WRITE_UINT32_FIELD
5193 #undef READ_SHORT_FIELD 5178 #undef READ_SHORT_FIELD
5194 #undef WRITE_SHORT_FIELD 5179 #undef WRITE_SHORT_FIELD
5195 #undef READ_BYTE_FIELD 5180 #undef READ_BYTE_FIELD
5196 #undef WRITE_BYTE_FIELD 5181 #undef WRITE_BYTE_FIELD
5197 5182
5198 5183
5199 } } // namespace v8::internal 5184 } } // namespace v8::internal
5200 5185
5201 #endif // V8_OBJECTS_INL_H_ 5186 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698