| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 PretenureFlag pretenure = NOT_TENURED); | 214 PretenureFlag pretenure = NOT_TENURED); |
| 215 | 215 |
| 216 // Global objects are pretenured. | 216 // Global objects are pretenured. |
| 217 static Handle<GlobalObject> NewGlobalObject(Handle<JSFunction> constructor); | 217 static Handle<GlobalObject> NewGlobalObject(Handle<JSFunction> constructor); |
| 218 | 218 |
| 219 // JS objects are pretenured when allocated by the bootstrapper and | 219 // JS objects are pretenured when allocated by the bootstrapper and |
| 220 // runtime. | 220 // runtime. |
| 221 static Handle<JSObject> NewJSObjectFromMap(Handle<Map> map); | 221 static Handle<JSObject> NewJSObjectFromMap(Handle<Map> map); |
| 222 | 222 |
| 223 // JS arrays are pretenured when allocated by the parser. | 223 // JS arrays are pretenured when allocated by the parser. |
| 224 static Handle<JSArray> NewJSArray(int init_length, | 224 static Handle<JSArray> NewJSArray(int capacity, |
| 225 PretenureFlag pretenure = NOT_TENURED); | 225 PretenureFlag pretenure = NOT_TENURED); |
| 226 | 226 |
| 227 static Handle<JSArray> NewJSArrayWithElements( | 227 static Handle<JSArray> NewJSArrayWithElements( |
| 228 Handle<FixedArray> elements, | 228 Handle<FixedArray> elements, |
| 229 PretenureFlag pretenure = NOT_TENURED); | 229 PretenureFlag pretenure = NOT_TENURED); |
| 230 | 230 |
| 231 static Handle<JSFunction> NewFunction(Handle<String> name, | 231 static Handle<JSFunction> NewFunction(Handle<String> name, |
| 232 Handle<Object> prototype); | 232 Handle<Object> prototype); |
| 233 | 233 |
| 234 static Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name); | 234 static Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 // Update the map cache in the global context with (keys, map) | 419 // Update the map cache in the global context with (keys, map) |
| 420 static Handle<MapCache> AddToMapCache(Handle<Context> context, | 420 static Handle<MapCache> AddToMapCache(Handle<Context> context, |
| 421 Handle<FixedArray> keys, | 421 Handle<FixedArray> keys, |
| 422 Handle<Map> map); | 422 Handle<Map> map); |
| 423 }; | 423 }; |
| 424 | 424 |
| 425 | 425 |
| 426 } } // namespace v8::internal | 426 } } // namespace v8::internal |
| 427 | 427 |
| 428 #endif // V8_FACTORY_H_ | 428 #endif // V8_FACTORY_H_ |
| OLD | NEW |