| 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/globals.h" | 8 #include "src/globals.h" |
| 9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 10 #include "src/messages.h" | 10 #include "src/messages.h" |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 Handle<HeapNumber> NewHeapNumber(double value, | 423 Handle<HeapNumber> NewHeapNumber(double value, |
| 424 MutableMode mode = IMMUTABLE, | 424 MutableMode mode = IMMUTABLE, |
| 425 PretenureFlag pretenure = NOT_TENURED); | 425 PretenureFlag pretenure = NOT_TENURED); |
| 426 | 426 |
| 427 #define SIMD128_NEW_DECL(TYPE, Type, type, lane_count, lane_type) \ | 427 #define SIMD128_NEW_DECL(TYPE, Type, type, lane_count, lane_type) \ |
| 428 Handle<Type> New##Type(lane_type lanes[lane_count], \ | 428 Handle<Type> New##Type(lane_type lanes[lane_count], \ |
| 429 PretenureFlag pretenure = NOT_TENURED); | 429 PretenureFlag pretenure = NOT_TENURED); |
| 430 SIMD128_TYPES(SIMD128_NEW_DECL) | 430 SIMD128_TYPES(SIMD128_NEW_DECL) |
| 431 #undef SIMD128_NEW_DECL | 431 #undef SIMD128_NEW_DECL |
| 432 | 432 |
| 433 // These objects are used by the api to create env-independent data | |
| 434 // structures in the heap. | |
| 435 inline Handle<JSObject> NewNeanderObject() { | |
| 436 return NewJSObjectFromMap(neander_map()); | |
| 437 } | |
| 438 | |
| 439 Handle<JSWeakMap> NewJSWeakMap(); | 433 Handle<JSWeakMap> NewJSWeakMap(); |
| 440 | 434 |
| 441 Handle<JSObject> NewArgumentsObject(Handle<JSFunction> callee, int length); | 435 Handle<JSObject> NewArgumentsObject(Handle<JSFunction> callee, int length); |
| 442 | 436 |
| 443 // JS objects are pretenured when allocated by the bootstrapper and | 437 // JS objects are pretenured when allocated by the bootstrapper and |
| 444 // runtime. | 438 // runtime. |
| 445 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, | 439 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, |
| 446 PretenureFlag pretenure = NOT_TENURED); | 440 PretenureFlag pretenure = NOT_TENURED); |
| 447 // JSObject that should have a memento pointing to the allocation site. | 441 // JSObject that should have a memento pointing to the allocation site. |
| 448 Handle<JSObject> NewJSObjectWithMemento(Handle<JSFunction> constructor, | 442 Handle<JSObject> NewJSObjectWithMemento(Handle<JSFunction> constructor, |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 FunctionMode function_mode); | 788 FunctionMode function_mode); |
| 795 | 789 |
| 796 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, | 790 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, |
| 797 FunctionMode function_mode); | 791 FunctionMode function_mode); |
| 798 }; | 792 }; |
| 799 | 793 |
| 800 } // namespace internal | 794 } // namespace internal |
| 801 } // namespace v8 | 795 } // namespace v8 |
| 802 | 796 |
| 803 #endif // V8_FACTORY_H_ | 797 #endif // V8_FACTORY_H_ |
| OLD | NEW |