| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_FACTORY_H_ | 5 #ifndef V8_FACTORY_H_ |
| 6 #define V8_FACTORY_H_ | 6 #define V8_FACTORY_H_ |
| 7 | 7 |
| 8 #include "src/isolate.h" | 8 #include "src/isolate.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 Handle<HeapNumber> NewHeapNumber(double value, | 354 Handle<HeapNumber> NewHeapNumber(double value, |
| 355 MutableMode mode = IMMUTABLE, | 355 MutableMode mode = IMMUTABLE, |
| 356 PretenureFlag pretenure = NOT_TENURED); | 356 PretenureFlag pretenure = NOT_TENURED); |
| 357 | 357 |
| 358 // These objects are used by the api to create env-independent data | 358 // These objects are used by the api to create env-independent data |
| 359 // structures in the heap. | 359 // structures in the heap. |
| 360 inline Handle<JSObject> NewNeanderObject() { | 360 inline Handle<JSObject> NewNeanderObject() { |
| 361 return NewJSObjectFromMap(neander_map()); | 361 return NewJSObjectFromMap(neander_map()); |
| 362 } | 362 } |
| 363 | 363 |
| 364 Handle<JSObject> NewArgumentsObject(Handle<Object> callee, int length); | 364 Handle<JSObject> NewArgumentsObject(Handle<JSFunction> callee, int length); |
| 365 | 365 |
| 366 // JS objects are pretenured when allocated by the bootstrapper and | 366 // JS objects are pretenured when allocated by the bootstrapper and |
| 367 // runtime. | 367 // runtime. |
| 368 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, | 368 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, |
| 369 PretenureFlag pretenure = NOT_TENURED); | 369 PretenureFlag pretenure = NOT_TENURED); |
| 370 // JSObject that should have a memento pointing to the allocation site. | 370 // JSObject that should have a memento pointing to the allocation site. |
| 371 Handle<JSObject> NewJSObjectWithMemento(Handle<JSFunction> constructor, | 371 Handle<JSObject> NewJSObjectWithMemento(Handle<JSFunction> constructor, |
| 372 Handle<AllocationSite> site); | 372 Handle<AllocationSite> site); |
| 373 | 373 |
| 374 // Global objects are pretenured and initialized based on a constructor. | 374 // Global objects are pretenured and initialized based on a constructor. |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 PretenureFlag pretenure = TENURED); | 710 PretenureFlag pretenure = TENURED); |
| 711 | 711 |
| 712 Handle<JSFunction> NewFunction(Handle<Map> map, | 712 Handle<JSFunction> NewFunction(Handle<Map> map, |
| 713 Handle<String> name, | 713 Handle<String> name, |
| 714 MaybeHandle<Code> maybe_code); | 714 MaybeHandle<Code> maybe_code); |
| 715 }; | 715 }; |
| 716 | 716 |
| 717 } } // namespace v8::internal | 717 } } // namespace v8::internal |
| 718 | 718 |
| 719 #endif // V8_FACTORY_H_ | 719 #endif // V8_FACTORY_H_ |
| OLD | NEW |