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

Side by Side Diff: src/objects.h

Issue 8103: - Fixed performance regression caused by ComputeContextSlotReceiver.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 1 month 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/heap.cc ('k') | src/objects.cc » ('j') | src/runtime.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 1594
1595 // Accessors for fetching instance descriptor at descriptor number.. 1595 // Accessors for fetching instance descriptor at descriptor number..
1596 inline String* GetKey(int descriptor_number); 1596 inline String* GetKey(int descriptor_number);
1597 inline Object* GetValue(int descriptor_number); 1597 inline Object* GetValue(int descriptor_number);
1598 inline Smi* GetDetails(int descriptor_number); 1598 inline Smi* GetDetails(int descriptor_number);
1599 1599
1600 // Accessor for complete descriptor. 1600 // Accessor for complete descriptor.
1601 inline void Get(int descriptor_number, Descriptor* desc); 1601 inline void Get(int descriptor_number, Descriptor* desc);
1602 inline void Set(int descriptor_number, Descriptor* desc); 1602 inline void Set(int descriptor_number, Descriptor* desc);
1603 1603
1604
1605 // Copy the descriptor array, insert a new descriptor and optionally 1604 // Copy the descriptor array, insert a new descriptor and optionally
1606 // remove map transitions. If the descriptor is already present, it is 1605 // remove map transitions. If the descriptor is already present, it is
1607 // replaced. If a replaced descriptor is a real property (not a transition 1606 // replaced. If a replaced descriptor is a real property (not a transition
1608 // or null), its enumeration index is kept as is. 1607 // or null), its enumeration index is kept as is.
1609 // If adding a real property, map transitions must be removed. If adding 1608 // If adding a real property, map transitions must be removed. If adding
1610 // a transition, they must not be removed. All null descriptors are removed. 1609 // a transition, they must not be removed. All null descriptors are removed.
1611 Object* CopyInsert(Descriptor* descriptor, TransitionFlag transition_flag); 1610 Object* CopyInsert(Descriptor* descriptor, TransitionFlag transition_flag);
1612 1611
1613 // Remove all transitions. Return a copy of the array with all transitions 1612 // Remove all transitions. Return a copy of the array with all transitions
1614 // removed, or a Failure object if the new array could not be allocated. 1613 // removed, or a Failure object if the new array could not be allocated.
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
2453 // The bytes at positions 2 and 3 are not in use at the moment. 2452 // The bytes at positions 2 and 3 are not in use at the moment.
2454 2453
2455 2454
2456 // Byte offsets within kInstanceAttributesOffset attributes. 2455 // Byte offsets within kInstanceAttributesOffset attributes.
2457 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 0; 2456 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 0;
2458 static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 1; 2457 static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 1;
2459 static const int kBitFieldOffset = kInstanceAttributesOffset + 2; 2458 static const int kBitFieldOffset = kInstanceAttributesOffset + 2;
2460 // The byte at position 3 is not in use at the moment. 2459 // The byte at position 3 is not in use at the moment.
2461 2460
2462 // Bit positions for bit field. 2461 // Bit positions for bit field.
2463 static const int kUnused = 0; // To be used for marking recently used maps. 2462 static const int kUnusedXX = 0; // To be used for marking recently used maps.
Kasper Lund 2008/10/23 14:51:33 Did you mean to change this?
2464 static const int kHasNonInstancePrototype = 1; 2463 static const int kHasNonInstancePrototype = 1;
2465 static const int kIsHiddenPrototype = 2; 2464 static const int kIsHiddenPrototype = 2;
2466 static const int kHasNamedInterceptor = 3; 2465 static const int kHasNamedInterceptor = 3;
2467 static const int kHasIndexedInterceptor = 4; 2466 static const int kHasIndexedInterceptor = 4;
2468 static const int kIsUndetectable = 5; 2467 static const int kIsUndetectable = 5;
2469 static const int kHasInstanceCallHandler = 6; 2468 static const int kHasInstanceCallHandler = 6;
2470 static const int kIsAccessCheckNeeded = 7; 2469 static const int kIsAccessCheckNeeded = 7;
2471 private: 2470 private:
2472 DISALLOW_IMPLICIT_CONSTRUCTORS(Map); 2471 DISALLOW_IMPLICIT_CONSTRUCTORS(Map);
2473 }; 2472 };
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
2743 // Casting. 2742 // Casting.
2744 static inline JSFunction* cast(Object* obj); 2743 static inline JSFunction* cast(Object* obj);
2745 2744
2746 // Dispatched behavior. 2745 // Dispatched behavior.
2747 #ifdef DEBUG 2746 #ifdef DEBUG
2748 void JSFunctionPrint(); 2747 void JSFunctionPrint();
2749 void JSFunctionVerify(); 2748 void JSFunctionVerify();
2750 #endif 2749 #endif
2751 2750
2752 // Returns the number of allocated literals. 2751 // Returns the number of allocated literals.
2753 int NumberOfLiterals(); 2752 inline int NumberOfLiterals();
2754 2753
2755 // Retrieve the global context from a function's literal array. 2754 // Retrieve the global context from a function's literal array.
2756 static Context* GlobalContextFromLiterals(FixedArray* literals); 2755 static Context* GlobalContextFromLiterals(FixedArray* literals);
2757 2756
2758 // Layout descriptors. 2757 // Layout descriptors.
2759 static const int kPrototypeOrInitialMapOffset = JSObject::kHeaderSize; 2758 static const int kPrototypeOrInitialMapOffset = JSObject::kHeaderSize;
2760 static const int kSharedFunctionInfoOffset = 2759 static const int kSharedFunctionInfoOffset =
2761 kPrototypeOrInitialMapOffset + kPointerSize; 2760 kPrototypeOrInitialMapOffset + kPointerSize;
2762 static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize; 2761 static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize;
2763 static const int kLiteralsOffset = kContextOffset + kPointerSize; 2762 static const int kLiteralsOffset = kContextOffset + kPointerSize;
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
3340 // first and second components are pointers to other string values. 3339 // first and second components are pointers to other string values.
3341 // One or both components of a ConsString can be pointers to other 3340 // One or both components of a ConsString can be pointers to other
3342 // ConsStrings, creating a binary tree of ConsStrings where the leaves 3341 // ConsStrings, creating a binary tree of ConsStrings where the leaves
3343 // are non-ConsString string values. The string value represented by 3342 // are non-ConsString string values. The string value represented by
3344 // a ConsString can be obtained by concatenating the leaf string 3343 // a ConsString can be obtained by concatenating the leaf string
3345 // values in a left-to-right depth-first traversal of the tree. 3344 // values in a left-to-right depth-first traversal of the tree.
3346 class ConsString: public String { 3345 class ConsString: public String {
3347 public: 3346 public:
3348 // First object of the cons cell. 3347 // First object of the cons cell.
3349 inline Object* first(); 3348 inline Object* first();
3350 inline void set_first(Object* first); 3349 inline void set_first(Object* first,
3350 WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
3351 3351
3352 // Second object of the cons cell. 3352 // Second object of the cons cell.
3353 inline Object* second(); 3353 inline Object* second();
3354 inline void set_second(Object* second); 3354 inline void set_second(Object* second,
3355 WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
3355 3356
3356 // Dispatched behavior. 3357 // Dispatched behavior.
3357 uint16_t ConsStringGet(int index); 3358 uint16_t ConsStringGet(int index);
3358 3359
3359 // Casting. 3360 // Casting.
3360 static inline ConsString* cast(Object* obj); 3361 static inline ConsString* cast(Object* obj);
3361 3362
3362 // Garbage collection support. This method is called during garbage 3363 // Garbage collection support. This method is called during garbage
3363 // collection to iterate through the heap pointers in the body of 3364 // collection to iterate through the heap pointers in the body of
3364 // the ConsString. 3365 // the ConsString.
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
4093 } else { 4094 } else {
4094 value &= ~(1 << bit_position); 4095 value &= ~(1 << bit_position);
4095 } 4096 }
4096 return value; 4097 return value;
4097 } 4098 }
4098 }; 4099 };
4099 4100
4100 } } // namespace v8::internal 4101 } } // namespace v8::internal
4101 4102
4102 #endif // V8_OBJECTS_H_ 4103 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698