| 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); |
| 203 | 199 |
| 204 static Handle<JSFunction> NewFunction(Handle<Object> super, bool is_global); | 200 static Handle<JSFunction> NewFunction(Handle<Object> super, bool is_global); |
| 205 | 201 |
| 206 static Handle<JSFunction> NewFunctionFromBoilerplate( | 202 static Handle<JSFunction> NewFunctionFromBoilerplate( |
| 207 Handle<JSFunction> boilerplate, | 203 Handle<JSFunction> boilerplate, |
| 208 Handle<Context> context); | 204 Handle<Context> context); |
| 209 | 205 |
| 210 static Handle<Code> NewCode(const CodeDesc& desc, ScopeInfo<>* sinfo, | 206 static Handle<Code> NewCode(const CodeDesc& desc, ScopeInfo<>* sinfo, |
| 211 Code::Flags flags, Handle<Object> self_reference); | 207 Code::Flags flags, Handle<Object> self_reference); |
| 212 | 208 |
| 213 static Handle<Code> NewCode(const CodeDesc& desc, ScopeInfo<>* sinfo, | |
| 214 Code::Flags flags); | |
| 215 | |
| 216 static Handle<Code> CopyCode(Handle<Code> code); | 209 static Handle<Code> CopyCode(Handle<Code> code); |
| 217 | 210 |
| 218 static Handle<Object> ToObject(Handle<Object> object, | 211 static Handle<Object> ToObject(Handle<Object> object, |
| 219 Handle<Context> global_context); | 212 Handle<Context> global_context); |
| 220 | 213 |
| 221 // Interface for creating error objects. | 214 // Interface for creating error objects. |
| 222 | 215 |
| 223 static Handle<Object> NewError(const char* maker, const char* type, | 216 static Handle<Object> NewError(const char* maker, const char* type, |
| 224 Handle<JSArray> args); | 217 Handle<JSArray> args); |
| 225 static Handle<Object> NewError(const char* maker, const char* type, | 218 static Handle<Object> NewError(const char* maker, const char* type, |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 // Update the map cache in the global context with (keys, map) | 341 // Update the map cache in the global context with (keys, map) |
| 349 static Handle<MapCache> AddToMapCache(Handle<Context> context, | 342 static Handle<MapCache> AddToMapCache(Handle<Context> context, |
| 350 Handle<FixedArray> keys, | 343 Handle<FixedArray> keys, |
| 351 Handle<Map> map); | 344 Handle<Map> map); |
| 352 }; | 345 }; |
| 353 | 346 |
| 354 | 347 |
| 355 } } // namespace v8::internal | 348 } } // namespace v8::internal |
| 356 | 349 |
| 357 #endif // V8_FACTORY_H_ | 350 #endif // V8_FACTORY_H_ |
| OLD | NEW |