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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 Handle<WeakHashTable> NewWeakHashTable(int at_least_space_for); | 60 Handle<WeakHashTable> NewWeakHashTable(int at_least_space_for); |
61 | 61 |
62 Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors, | 62 Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors, |
63 int slack = 0); | 63 int slack = 0); |
64 Handle<DeoptimizationInputData> NewDeoptimizationInputData( | 64 Handle<DeoptimizationInputData> NewDeoptimizationInputData( |
65 int deopt_entry_count, | 65 int deopt_entry_count, |
66 PretenureFlag pretenure); | 66 PretenureFlag pretenure); |
67 Handle<DeoptimizationOutputData> NewDeoptimizationOutputData( | 67 Handle<DeoptimizationOutputData> NewDeoptimizationOutputData( |
68 int deopt_entry_count, | 68 int deopt_entry_count, |
69 PretenureFlag pretenure); | 69 PretenureFlag pretenure); |
70 // Allocates a pre-tenured empty AccessorPair. | 70 |
| 71 // Create a pre-tenured empty AccessorPair. |
71 Handle<AccessorPair> NewAccessorPair(); | 72 Handle<AccessorPair> NewAccessorPair(); |
72 | 73 |
| 74 // Create an empty TypeFeedbackInfo. |
73 Handle<TypeFeedbackInfo> NewTypeFeedbackInfo(); | 75 Handle<TypeFeedbackInfo> NewTypeFeedbackInfo(); |
74 | 76 |
75 Handle<String> InternalizeUtf8String(Vector<const char> str); | 77 Handle<String> InternalizeUtf8String(Vector<const char> str); |
76 Handle<String> InternalizeUtf8String(const char* str) { | 78 Handle<String> InternalizeUtf8String(const char* str) { |
77 return InternalizeUtf8String(CStrVector(str)); | 79 return InternalizeUtf8String(CStrVector(str)); |
78 } | 80 } |
79 Handle<String> InternalizeString(Handle<String> str); | 81 Handle<String> InternalizeString(Handle<String> str); |
80 Handle<String> InternalizeOneByteString(Vector<const uint8_t> str); | 82 Handle<String> InternalizeOneByteString(Vector<const uint8_t> str); |
81 Handle<String> InternalizeOneByteString( | 83 Handle<String> InternalizeOneByteString( |
82 Handle<SeqOneByteString>, int from, int length); | 84 Handle<SeqOneByteString>, int from, int length); |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 Handle<JSFunction> BaseNewFunctionFromSharedFunctionInfo( | 391 Handle<JSFunction> BaseNewFunctionFromSharedFunctionInfo( |
390 Handle<SharedFunctionInfo> function_info, | 392 Handle<SharedFunctionInfo> function_info, |
391 Handle<Map> function_map, | 393 Handle<Map> function_map, |
392 PretenureFlag pretenure); | 394 PretenureFlag pretenure); |
393 | 395 |
394 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( | 396 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( |
395 Handle<SharedFunctionInfo> function_info, | 397 Handle<SharedFunctionInfo> function_info, |
396 Handle<Context> context, | 398 Handle<Context> context, |
397 PretenureFlag pretenure = TENURED); | 399 PretenureFlag pretenure = TENURED); |
398 | 400 |
| 401 // Create a serialized scope info. |
399 Handle<ScopeInfo> NewScopeInfo(int length); | 402 Handle<ScopeInfo> NewScopeInfo(int length); |
400 | 403 |
| 404 // Create an External object for V8's external API. |
401 Handle<JSObject> NewExternal(void* value); | 405 Handle<JSObject> NewExternal(void* value); |
402 | 406 |
403 Handle<Code> NewCode(const CodeDesc& desc, | 407 Handle<Code> NewCode(const CodeDesc& desc, |
404 Code::Flags flags, | 408 Code::Flags flags, |
405 Handle<Object> self_reference, | 409 Handle<Object> self_reference, |
406 bool immovable = false, | 410 bool immovable = false, |
407 bool crankshafted = false, | 411 bool crankshafted = false, |
408 int prologue_offset = Code::kPrologueOffsetNotSet); | 412 int prologue_offset = Code::kPrologueOffsetNotSet); |
409 | 413 |
410 Handle<Code> CopyCode(Handle<Code> code); | 414 Handle<Code> CopyCode(Handle<Code> code); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 | 596 |
593 // Update the map cache in the native context with (keys, map) | 597 // Update the map cache in the native context with (keys, map) |
594 Handle<MapCache> AddToMapCache(Handle<Context> context, | 598 Handle<MapCache> AddToMapCache(Handle<Context> context, |
595 Handle<FixedArray> keys, | 599 Handle<FixedArray> keys, |
596 Handle<Map> map); | 600 Handle<Map> map); |
597 }; | 601 }; |
598 | 602 |
599 } } // namespace v8::internal | 603 } } // namespace v8::internal |
600 | 604 |
601 #endif // V8_FACTORY_H_ | 605 #endif // V8_FACTORY_H_ |
OLD | NEW |