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

Side by Side Diff: src/heap.cc

Issue 507051: Attempt to make \b\w+ faster. Slight performance increase on, e.g., string unpacking. (Closed)
Patch Set: Addressed review comments. Created 10 years, 11 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/flag-definitions.h ('k') | src/ia32/regexp-macro-assembler-ia32.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 if (Heap::InNewSpace(target)) { 797 if (Heap::InNewSpace(target)) {
798 // String is still in new space. Update the table entry. 798 // String is still in new space. Update the table entry.
799 *last = target; 799 *last = target;
800 ++last; 800 ++last;
801 } else { 801 } else {
802 // String got promoted. Move it to the old string list. 802 // String got promoted. Move it to the old string list.
803 ExternalStringTable::AddOldString(target); 803 ExternalStringTable::AddOldString(target);
804 } 804 }
805 } 805 }
806 806
807 ExternalStringTable::ShrinkNewStrings(last - start); 807 ExternalStringTable::ShrinkNewStrings(static_cast<int>(last - start));
808 } 808 }
809 809
810 810
811 Address Heap::DoScavenge(ObjectVisitor* scavenge_visitor, 811 Address Heap::DoScavenge(ObjectVisitor* scavenge_visitor,
812 Address new_space_front) { 812 Address new_space_front) {
813 do { 813 do {
814 ASSERT(new_space_front <= new_space_.top()); 814 ASSERT(new_space_front <= new_space_.top());
815 815
816 // The addresses new_space_front and new_space_.top() define a 816 // The addresses new_space_front and new_space_.top() define a
817 // queue of unprocessed copied objects. Process them until the 817 // queue of unprocessed copied objects. Process them until the
(...skipping 3263 matching lines...) Expand 10 before | Expand all | Expand 10 after
4081 void ExternalStringTable::TearDown() { 4081 void ExternalStringTable::TearDown() {
4082 new_space_strings_.Free(); 4082 new_space_strings_.Free();
4083 old_space_strings_.Free(); 4083 old_space_strings_.Free();
4084 } 4084 }
4085 4085
4086 4086
4087 List<Object*> ExternalStringTable::new_space_strings_; 4087 List<Object*> ExternalStringTable::new_space_strings_;
4088 List<Object*> ExternalStringTable::old_space_strings_; 4088 List<Object*> ExternalStringTable::old_space_strings_;
4089 4089
4090 } } // namespace v8::internal 4090 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/ia32/regexp-macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698