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

Side by Side Diff: src/factory.h

Issue 2809048: RegExp replace with empty string optimization by Sandholm. (Closed)
Patch Set: Addressed review comments. Created 10 years, 5 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/codegen.h ('k') | src/factory.cc » ('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-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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 static Handle<String> NewStringFromAscii( 88 static Handle<String> NewStringFromAscii(
89 Vector<const char> str, 89 Vector<const char> str,
90 PretenureFlag pretenure = NOT_TENURED); 90 PretenureFlag pretenure = NOT_TENURED);
91 91
92 // UTF8 strings are pretenured when used for regexp literal patterns and 92 // UTF8 strings are pretenured when used for regexp literal patterns and
93 // flags in the parser. 93 // flags in the parser.
94 static Handle<String> NewStringFromUtf8( 94 static Handle<String> NewStringFromUtf8(
95 Vector<const char> str, 95 Vector<const char> str,
96 PretenureFlag pretenure = NOT_TENURED); 96 PretenureFlag pretenure = NOT_TENURED);
97 97
98 static Handle<String> NewStringFromTwoByte(Vector<const uc16> str, 98 static Handle<String> NewStringFromTwoByte(
99 Vector<const uc16> str,
99 PretenureFlag pretenure = NOT_TENURED); 100 PretenureFlag pretenure = NOT_TENURED);
100 101
101 // Allocates and partially initializes a TwoByte String. The characters of 102 // Allocates and partially initializes an ASCII or TwoByte String. The
102 // the string are uninitialized. Currently used in regexp code only, where 103 // characters of the string are uninitialized. Currently used in regexp code
103 // they are pretenured. 104 // only, where they are pretenured.
105 static Handle<String> NewRawAsciiString(
106 int length,
107 PretenureFlag pretenure = NOT_TENURED);
104 static Handle<String> NewRawTwoByteString( 108 static Handle<String> NewRawTwoByteString(
105 int length, 109 int length,
106 PretenureFlag pretenure = NOT_TENURED); 110 PretenureFlag pretenure = NOT_TENURED);
107 111
108 // Create a new cons string object which consists of a pair of strings. 112 // Create a new cons string object which consists of a pair of strings.
109 static Handle<String> NewConsString(Handle<String> first, 113 static Handle<String> NewConsString(Handle<String> first,
110 Handle<String> second); 114 Handle<String> second);
111 115
112 // Create a new string object which holds a substring of a string. 116 // Create a new string object which holds a substring of a string.
113 static Handle<String> NewSubString(Handle<String> str, 117 static Handle<String> NewSubString(Handle<String> str,
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // Update the map cache in the global context with (keys, map) 402 // Update the map cache in the global context with (keys, map)
399 static Handle<MapCache> AddToMapCache(Handle<Context> context, 403 static Handle<MapCache> AddToMapCache(Handle<Context> context,
400 Handle<FixedArray> keys, 404 Handle<FixedArray> keys,
401 Handle<Map> map); 405 Handle<Map> map);
402 }; 406 };
403 407
404 408
405 } } // namespace v8::internal 409 } } // namespace v8::internal
406 410
407 #endif // V8_FACTORY_H_ 411 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « src/codegen.h ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698