| 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 "isolate.h" | 8 #include "isolate.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 isolate()); | 332 isolate()); |
| 333 } | 333 } |
| 334 return NewNumber(static_cast<double>(value), pretenure); | 334 return NewNumber(static_cast<double>(value), pretenure); |
| 335 } | 335 } |
| 336 Handle<HeapNumber> NewHeapNumber(double value, | 336 Handle<HeapNumber> NewHeapNumber(double value, |
| 337 PretenureFlag pretenure = NOT_TENURED); | 337 PretenureFlag pretenure = NOT_TENURED); |
| 338 | 338 |
| 339 | 339 |
| 340 // These objects are used by the api to create env-independent data | 340 // These objects are used by the api to create env-independent data |
| 341 // structures in the heap. | 341 // structures in the heap. |
| 342 Handle<JSObject> NewNeanderObject(); | 342 Handle<JSObject> NewNeanderObject() { |
| 343 return NewJSObjectFromMap(neander_map()); |
| 344 } |
| 343 | 345 |
| 344 Handle<JSObject> NewArgumentsObject(Handle<Object> callee, int length); | 346 Handle<JSObject> NewArgumentsObject(Handle<Object> callee, int length); |
| 345 | 347 |
| 346 // JS objects are pretenured when allocated by the bootstrapper and | 348 // JS objects are pretenured when allocated by the bootstrapper and |
| 347 // runtime. | 349 // runtime. |
| 348 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, | 350 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, |
| 349 PretenureFlag pretenure = NOT_TENURED); | 351 PretenureFlag pretenure = NOT_TENURED); |
| 350 // JSObject that should have a memento pointing to the allocation site. | 352 // JSObject that should have a memento pointing to the allocation site. |
| 351 Handle<JSObject> NewJSObjectWithMemento(Handle<JSFunction> constructor, | 353 Handle<JSObject> NewJSObjectWithMemento(Handle<JSFunction> constructor, |
| 352 Handle<AllocationSite> site); | 354 Handle<AllocationSite> site); |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 // the string representation of the number. Otherwise return undefined. | 683 // the string representation of the number. Otherwise return undefined. |
| 682 Handle<Object> GetNumberStringCache(Handle<Object> number); | 684 Handle<Object> GetNumberStringCache(Handle<Object> number); |
| 683 | 685 |
| 684 // Update the cache with a new number-string pair. | 686 // Update the cache with a new number-string pair. |
| 685 void SetNumberStringCache(Handle<Object> number, Handle<String> string); | 687 void SetNumberStringCache(Handle<Object> number, Handle<String> string); |
| 686 }; | 688 }; |
| 687 | 689 |
| 688 } } // namespace v8::internal | 690 } } // namespace v8::internal |
| 689 | 691 |
| 690 #endif // V8_FACTORY_H_ | 692 #endif // V8_FACTORY_H_ |
| OLD | NEW |