Chromium Code Reviews| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 339 isolate()); | 339 isolate()); |
| 340 } | 340 } |
| 341 return NewNumber(static_cast<double>(value), pretenure); | 341 return NewNumber(static_cast<double>(value), pretenure); |
| 342 } | 342 } |
| 343 Handle<HeapNumber> NewHeapNumber(double value, | 343 Handle<HeapNumber> NewHeapNumber(double value, |
| 344 PretenureFlag pretenure = NOT_TENURED); | 344 PretenureFlag pretenure = NOT_TENURED); |
| 345 | 345 |
| 346 | 346 |
| 347 // These objects are used by the api to create env-independent data | 347 // These objects are used by the api to create env-independent data |
| 348 // structures in the heap. | 348 // structures in the heap. |
| 349 Handle<JSObject> NewNeanderObject(); | 349 Handle<JSObject> NewNeanderObject() { |
|
Igor Sheludko
2014/04/28 15:56:08
inline?
| |
| 350 return NewJSObjectFromMap(neander_map()); | |
| 351 } | |
| 350 | 352 |
| 351 Handle<JSObject> NewArgumentsObject(Handle<Object> callee, int length); | 353 Handle<JSObject> NewArgumentsObject(Handle<Object> callee, int length); |
| 352 | 354 |
| 353 // JS objects are pretenured when allocated by the bootstrapper and | 355 // JS objects are pretenured when allocated by the bootstrapper and |
| 354 // runtime. | 356 // runtime. |
| 355 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, | 357 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, |
| 356 PretenureFlag pretenure = NOT_TENURED); | 358 PretenureFlag pretenure = NOT_TENURED); |
| 357 // JSObject that should have a memento pointing to the allocation site. | 359 // JSObject that should have a memento pointing to the allocation site. |
| 358 Handle<JSObject> NewJSObjectWithMemento(Handle<JSFunction> constructor, | 360 Handle<JSObject> NewJSObjectWithMemento(Handle<JSFunction> constructor, |
| 359 Handle<AllocationSite> site); | 361 Handle<AllocationSite> site); |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 688 // the string representation of the number. Otherwise return undefined. | 690 // the string representation of the number. Otherwise return undefined. |
| 689 Handle<Object> GetNumberStringCache(Handle<Object> number); | 691 Handle<Object> GetNumberStringCache(Handle<Object> number); |
| 690 | 692 |
| 691 // Update the cache with a new number-string pair. | 693 // Update the cache with a new number-string pair. |
| 692 void SetNumberStringCache(Handle<Object> number, Handle<String> string); | 694 void SetNumberStringCache(Handle<Object> number, Handle<String> string); |
| 693 }; | 695 }; |
| 694 | 696 |
| 695 } } // namespace v8::internal | 697 } } // namespace v8::internal |
| 696 | 698 |
| 697 #endif // V8_FACTORY_H_ | 699 #endif // V8_FACTORY_H_ |
| OLD | NEW |