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

Side by Side Diff: src/factory.cc

Issue 7240025: Cleanup of return types and names in factory. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/factory.h ('k') | src/json-parser.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 Handle<String> Factory::NewStringFromTwoByte(Vector<const uc16> string, 173 Handle<String> Factory::NewStringFromTwoByte(Vector<const uc16> string,
174 PretenureFlag pretenure) { 174 PretenureFlag pretenure) {
175 CALL_HEAP_FUNCTION( 175 CALL_HEAP_FUNCTION(
176 isolate(), 176 isolate(),
177 isolate()->heap()->AllocateStringFromTwoByte(string, pretenure), 177 isolate()->heap()->AllocateStringFromTwoByte(string, pretenure),
178 String); 178 String);
179 } 179 }
180 180
181 181
182 Handle<String> Factory::NewRawAsciiString(int length, 182 Handle<SeqAsciiString> Factory::NewRawAsciiString(int length,
183 PretenureFlag pretenure) { 183 PretenureFlag pretenure) {
184 CALL_HEAP_FUNCTION( 184 CALL_HEAP_FUNCTION(
185 isolate(), 185 isolate(),
186 isolate()->heap()->AllocateRawAsciiString(length, pretenure), 186 isolate()->heap()->AllocateRawAsciiString(length, pretenure),
187 String); 187 SeqAsciiString);
188 } 188 }
189 189
190 190
191 Handle<String> Factory::NewRawTwoByteString(int length, 191 Handle<SeqTwoByteString> Factory::NewRawTwoByteString(int length,
192 PretenureFlag pretenure) { 192 PretenureFlag pretenure) {
193 CALL_HEAP_FUNCTION( 193 CALL_HEAP_FUNCTION(
194 isolate(), 194 isolate(),
195 isolate()->heap()->AllocateRawTwoByteString(length, pretenure), 195 isolate()->heap()->AllocateRawTwoByteString(length, pretenure),
196 String); 196 SeqTwoByteString);
197 } 197 }
198 198
199 199
200 Handle<String> Factory::NewConsString(Handle<String> first, 200 Handle<String> Factory::NewConsString(Handle<String> first,
201 Handle<String> second) { 201 Handle<String> second) {
202 CALL_HEAP_FUNCTION(isolate(), 202 CALL_HEAP_FUNCTION(isolate(),
203 isolate()->heap()->AllocateConsString(*first, *second), 203 isolate()->heap()->AllocateConsString(*first, *second),
204 String); 204 String);
205 } 205 }
206 206
207 207
208 Handle<String> Factory::NewSubString(Handle<String> str, 208 Handle<String> Factory::NewSubString(Handle<String> str,
209 int begin, 209 int begin,
210 int end) { 210 int end) {
211 CALL_HEAP_FUNCTION(isolate(), 211 CALL_HEAP_FUNCTION(isolate(),
212 str->SubString(begin, end), 212 str->SubString(begin, end),
213 String); 213 String);
214 } 214 }
215 215
216 216
217 Handle<String> Factory::NewStrictSubString(Handle<String> str, 217 Handle<String> Factory::NewProperSubString(Handle<String> str,
218 int begin, 218 int begin,
219 int end) { 219 int end) {
220 ASSERT(begin > 0 || end < str->length()); 220 ASSERT(begin > 0 || end < str->length());
221 CALL_HEAP_FUNCTION(isolate(), 221 CALL_HEAP_FUNCTION(isolate(),
222 isolate()->heap()->AllocateSubString(*str, begin, end), 222 isolate()->heap()->AllocateSubString(*str, begin, end),
223 String); 223 String);
224 } 224 }
225 225
226 226
227 Handle<String> Factory::NewExternalStringFromAscii( 227 Handle<String> Factory::NewExternalStringFromAscii(
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 Execution::ConfigureInstance(instance, 1240 Execution::ConfigureInstance(instance,
1241 instance_template, 1241 instance_template,
1242 pending_exception); 1242 pending_exception);
1243 } else { 1243 } else {
1244 *pending_exception = false; 1244 *pending_exception = false;
1245 } 1245 }
1246 } 1246 }
1247 1247
1248 1248
1249 } } // namespace v8::internal 1249 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/json-parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698