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

Side by Side Diff: src/objects.h

Issue 1014005: Attempt at pre-calculating replace regexp matches. (Closed)
Patch Set: Reuse result array. Avoid using apply. Created 10 years, 9 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
« no previous file with comments | « src/jsregexp.h ('k') | src/objects-inl.h » ('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 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 4599 matching lines...) Expand 10 before | Expand all | Expand 10 after
4610 4610
4611 // Set the content of the array to the content of storage. 4611 // Set the content of the array to the content of storage.
4612 inline void SetContent(FixedArray* storage); 4612 inline void SetContent(FixedArray* storage);
4613 4613
4614 // Casting. 4614 // Casting.
4615 static inline JSArray* cast(Object* obj); 4615 static inline JSArray* cast(Object* obj);
4616 4616
4617 // Uses handles. Ensures that the fixed array backing the JSArray has at 4617 // Uses handles. Ensures that the fixed array backing the JSArray has at
4618 // least the stated size. 4618 // least the stated size.
4619 inline void EnsureSize(int minimum_size_of_backing_fixed_array); 4619 inline void EnsureSize(int minimum_size_of_backing_fixed_array);
4620 // As ensure size, but sets length to the required size and ensures that
4621 // holes are written above this length.
4622 inline void Resize(int minimum_size_of_backing_fixed_array);
4620 4623
4621 // Dispatched behavior. 4624 // Dispatched behavior.
4622 #ifdef DEBUG 4625 #ifdef DEBUG
4623 void JSArrayPrint(); 4626 void JSArrayPrint();
4624 void JSArrayVerify(); 4627 void JSArrayVerify();
4625 #endif 4628 #endif
4626 4629
4627 // Number of element slots to pre-allocate for an empty array. 4630 // Number of element slots to pre-allocate for an empty array.
4628 static const int kPreallocatedArrayElements = 4; 4631 static const int kPreallocatedArrayElements = 4;
4629 4632
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
5089 } else { 5092 } else {
5090 value &= ~(1 << bit_position); 5093 value &= ~(1 << bit_position);
5091 } 5094 }
5092 return value; 5095 return value;
5093 } 5096 }
5094 }; 5097 };
5095 5098
5096 } } // namespace v8::internal 5099 } } // namespace v8::internal
5097 5100
5098 #endif // V8_OBJECTS_H_ 5101 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/jsregexp.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698