OLD | NEW |
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 179 |
180 // JS objects are pretenured when allocated by the bootstrapper and | 180 // JS objects are pretenured when allocated by the bootstrapper and |
181 // runtime. | 181 // runtime. |
182 static Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, | 182 static Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, |
183 PretenureFlag pretenure = NOT_TENURED); | 183 PretenureFlag pretenure = NOT_TENURED); |
184 | 184 |
185 // JS objects are pretenured when allocated by the bootstrapper and | 185 // JS objects are pretenured when allocated by the bootstrapper and |
186 // runtime. | 186 // runtime. |
187 static Handle<JSObject> NewJSObjectFromMap(Handle<Map> map); | 187 static Handle<JSObject> NewJSObjectFromMap(Handle<Map> map); |
188 | 188 |
189 // Allocate a JS array representing an array literal. The array is | |
190 // pretenured (allocated directly in the old generation). | |
191 static Handle<JSArray> NewArrayLiteral(int length); | |
192 | |
193 // JS arrays are pretenured when allocated by the parser. | 189 // JS arrays are pretenured when allocated by the parser. |
194 static Handle<JSArray> NewJSArray(int init_length, | 190 static Handle<JSArray> NewJSArray(int init_length, |
195 PretenureFlag pretenure = NOT_TENURED); | 191 PretenureFlag pretenure = NOT_TENURED); |
196 | 192 |
197 static Handle<JSArray> NewJSArrayWithElements( | 193 static Handle<JSArray> NewJSArrayWithElements( |
198 Handle<FixedArray> elements, | 194 Handle<FixedArray> elements, |
199 PretenureFlag pretenure = NOT_TENURED); | 195 PretenureFlag pretenure = NOT_TENURED); |
200 | 196 |
201 static Handle<JSFunction> NewFunction(Handle<String> name, | 197 static Handle<JSFunction> NewFunction(Handle<String> name, |
202 Handle<Object> prototype); | 198 Handle<Object> prototype); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 // Update the map cache in the global context with (keys, map) | 344 // Update the map cache in the global context with (keys, map) |
349 static Handle<MapCache> AddToMapCache(Handle<Context> context, | 345 static Handle<MapCache> AddToMapCache(Handle<Context> context, |
350 Handle<FixedArray> keys, | 346 Handle<FixedArray> keys, |
351 Handle<Map> map); | 347 Handle<Map> map); |
352 }; | 348 }; |
353 | 349 |
354 | 350 |
355 } } // namespace v8::internal | 351 } } // namespace v8::internal |
356 | 352 |
357 #endif // V8_FACTORY_H_ | 353 #endif // V8_FACTORY_H_ |
OLD | NEW |