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

Side by Side Diff: src/objects.h

Issue 6759030: Microoptimizations to the way we get the current heap. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | « no previous file | src/objects.cc » ('j') | src/objects.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 3469 matching lines...) Expand 10 before | Expand all | Expand 10 after
3480 #ifdef OBJECT_PRINT 3480 #ifdef OBJECT_PRINT
3481 inline void CodePrint() { 3481 inline void CodePrint() {
3482 CodePrint(stdout); 3482 CodePrint(stdout);
3483 } 3483 }
3484 void CodePrint(FILE* out); 3484 void CodePrint(FILE* out);
3485 #endif 3485 #endif
3486 #ifdef DEBUG 3486 #ifdef DEBUG
3487 void CodeVerify(); 3487 void CodeVerify();
3488 #endif 3488 #endif
3489 3489
3490 // Returns the isolate/heap this code object belongs to.
3491 inline Isolate* isolate();
3492 inline Heap* heap();
3493
3490 // Max loop nesting marker used to postpose OSR. We don't take loop 3494 // Max loop nesting marker used to postpose OSR. We don't take loop
3491 // nesting that is deeper than 5 levels into account. 3495 // nesting that is deeper than 5 levels into account.
3492 static const int kMaxLoopNestingMarker = 6; 3496 static const int kMaxLoopNestingMarker = 6;
3493 3497
3494 // Layout description. 3498 // Layout description.
3495 static const int kInstructionSizeOffset = HeapObject::kHeaderSize; 3499 static const int kInstructionSizeOffset = HeapObject::kHeaderSize;
3496 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize; 3500 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize;
3497 static const int kDeoptimizationDataOffset = 3501 static const int kDeoptimizationDataOffset =
3498 kRelocationInfoOffset + kPointerSize; 3502 kRelocationInfoOffset + kPointerSize;
3499 static const int kFlagsOffset = kDeoptimizationDataOffset + kPointerSize; 3503 static const int kFlagsOffset = kDeoptimizationDataOffset + kPointerSize;
(...skipping 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after
6002 #endif 6006 #endif
6003 6007
6004 // Layout description. 6008 // Layout description.
6005 static const int kValueOffset = HeapObject::kHeaderSize; 6009 static const int kValueOffset = HeapObject::kHeaderSize;
6006 static const int kSize = kValueOffset + kPointerSize; 6010 static const int kSize = kValueOffset + kPointerSize;
6007 6011
6008 typedef FixedBodyDescriptor<kValueOffset, 6012 typedef FixedBodyDescriptor<kValueOffset,
6009 kValueOffset + kPointerSize, 6013 kValueOffset + kPointerSize,
6010 kSize> BodyDescriptor; 6014 kSize> BodyDescriptor;
6011 6015
6016 // Returns the isolate/heap this cell object belongs to.
6017 inline Isolate* isolate();
6018 inline Heap* heap();
6019
6012 private: 6020 private:
6013 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalPropertyCell); 6021 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalPropertyCell);
6014 }; 6022 };
6015 6023
6016 6024
6017 6025
6018 // Proxy describes objects pointing from JavaScript to C structures. 6026 // Proxy describes objects pointing from JavaScript to C structures.
6019 // Since they cannot contain references to JS HeapObjects they can be 6027 // Since they cannot contain references to JS HeapObjects they can be
6020 // placed in old_data_space. 6028 // placed in old_data_space.
6021 class Proxy: public HeapObject { 6029 class Proxy: public HeapObject {
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
6649 } else { 6657 } else {
6650 value &= ~(1 << bit_position); 6658 value &= ~(1 << bit_position);
6651 } 6659 }
6652 return value; 6660 return value;
6653 } 6661 }
6654 }; 6662 };
6655 6663
6656 } } // namespace v8::internal 6664 } } // namespace v8::internal
6657 6665
6658 #endif // V8_OBJECTS_H_ 6666 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698