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

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

Issue 3032028: Cache maps for slow case objects. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 4 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 % JSFunctionResultCache::kEntrySize != 0) { 567 % JSFunctionResultCache::kEntrySize != 0) {
568 return false; 568 return false;
569 } 569 }
570 #ifdef DEBUG 570 #ifdef DEBUG
571 reinterpret_cast<JSFunctionResultCache*>(this)->JSFunctionResultCacheVerify(); 571 reinterpret_cast<JSFunctionResultCache*>(this)->JSFunctionResultCacheVerify();
572 #endif 572 #endif
573 return true; 573 return true;
574 } 574 }
575 575
576 576
577 bool Object::IsNormalizedMapCache() {
578 if (!IsFixedArray()) return false;
579 if (FixedArray::cast(this)->length() != NormalizedMapCache::kEntries) {
580 return false;
581 }
582 #ifdef DEBUG
583 reinterpret_cast<NormalizedMapCache*>(this)->NormalizedMapCacheVerify();
584 #endif
585 return true;
586 }
587
588
577 bool Object::IsCompilationCacheTable() { 589 bool Object::IsCompilationCacheTable() {
578 return IsHashTable(); 590 return IsHashTable();
579 } 591 }
580 592
581 593
582 bool Object::IsCodeCacheHashTable() { 594 bool Object::IsCodeCacheHashTable() {
583 return IsHashTable(); 595 return IsHashTable();
584 } 596 }
585 597
586 598
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1620 1632
1621 1633
1622 // ------------------------------------ 1634 // ------------------------------------
1623 // Cast operations 1635 // Cast operations
1624 1636
1625 1637
1626 CAST_ACCESSOR(FixedArray) 1638 CAST_ACCESSOR(FixedArray)
1627 CAST_ACCESSOR(DescriptorArray) 1639 CAST_ACCESSOR(DescriptorArray)
1628 CAST_ACCESSOR(SymbolTable) 1640 CAST_ACCESSOR(SymbolTable)
1629 CAST_ACCESSOR(JSFunctionResultCache) 1641 CAST_ACCESSOR(JSFunctionResultCache)
1642 CAST_ACCESSOR(NormalizedMapCache)
1630 CAST_ACCESSOR(CompilationCacheTable) 1643 CAST_ACCESSOR(CompilationCacheTable)
1631 CAST_ACCESSOR(CodeCacheHashTable) 1644 CAST_ACCESSOR(CodeCacheHashTable)
1632 CAST_ACCESSOR(MapCache) 1645 CAST_ACCESSOR(MapCache)
1633 CAST_ACCESSOR(String) 1646 CAST_ACCESSOR(String)
1634 CAST_ACCESSOR(SeqString) 1647 CAST_ACCESSOR(SeqString)
1635 CAST_ACCESSOR(SeqAsciiString) 1648 CAST_ACCESSOR(SeqAsciiString)
1636 CAST_ACCESSOR(SeqTwoByteString) 1649 CAST_ACCESSOR(SeqTwoByteString)
1637 CAST_ACCESSOR(ConsString) 1650 CAST_ACCESSOR(ConsString)
1638 CAST_ACCESSOR(ExternalString) 1651 CAST_ACCESSOR(ExternalString)
1639 CAST_ACCESSOR(ExternalAsciiString) 1652 CAST_ACCESSOR(ExternalAsciiString)
(...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after
3324 #undef WRITE_INT_FIELD 3337 #undef WRITE_INT_FIELD
3325 #undef READ_SHORT_FIELD 3338 #undef READ_SHORT_FIELD
3326 #undef WRITE_SHORT_FIELD 3339 #undef WRITE_SHORT_FIELD
3327 #undef READ_BYTE_FIELD 3340 #undef READ_BYTE_FIELD
3328 #undef WRITE_BYTE_FIELD 3341 #undef WRITE_BYTE_FIELD
3329 3342
3330 3343
3331 } } // namespace v8::internal 3344 } } // namespace v8::internal
3332 3345
3333 #endif // V8_OBJECTS_INL_H_ 3346 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/objects.cc ('K') | « src/objects-debug.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698