OLD | NEW |
---|---|
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 4605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4616 void JSArrayVerify(); | 4616 void JSArrayVerify(); |
4617 #endif | 4617 #endif |
4618 | 4618 |
4619 // Number of element slots to pre-allocate for an empty array. | 4619 // Number of element slots to pre-allocate for an empty array. |
4620 static const int kPreallocatedArrayElements = 4; | 4620 static const int kPreallocatedArrayElements = 4; |
4621 | 4621 |
4622 // Layout description. | 4622 // Layout description. |
4623 static const int kLengthOffset = JSObject::kHeaderSize; | 4623 static const int kLengthOffset = JSObject::kHeaderSize; |
4624 static const int kSize = kLengthOffset + kPointerSize; | 4624 static const int kSize = kLengthOffset + kPointerSize; |
4625 | 4625 |
4626 // RegExp results are arrays with index and input as internal fields. | |
Søren Thygesen Gjesse
2010/04/13 07:22:29
How about creating the class JSRegExpResult inheri
Lasse Reichstein
2010/04/13 09:50:56
Done.
| |
4627 static const int kRegExpResultSize = kSize + 2 * kPointerSize; | |
4628 static const int kIndexIndex = 0; | |
4629 static const int kInputIndex = 1; | |
4630 | |
4626 private: | 4631 private: |
4627 // Expand the fixed array backing of a fast-case JSArray to at least | 4632 // Expand the fixed array backing of a fast-case JSArray to at least |
4628 // the requested size. | 4633 // the requested size. |
4629 void Expand(int minimum_size_of_backing_fixed_array); | 4634 void Expand(int minimum_size_of_backing_fixed_array); |
4630 | 4635 |
4631 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray); | 4636 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray); |
4632 }; | 4637 }; |
4633 | 4638 |
4634 | 4639 |
4635 // An accessor must have a getter, but can have no setter. | 4640 // An accessor must have a getter, but can have no setter. |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5081 } else { | 5086 } else { |
5082 value &= ~(1 << bit_position); | 5087 value &= ~(1 << bit_position); |
5083 } | 5088 } |
5084 return value; | 5089 return value; |
5085 } | 5090 } |
5086 }; | 5091 }; |
5087 | 5092 |
5088 } } // namespace v8::internal | 5093 } } // namespace v8::internal |
5089 | 5094 |
5090 #endif // V8_OBJECTS_H_ | 5095 #endif // V8_OBJECTS_H_ |
OLD | NEW |