v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
factory.h
Go to the documentation of this file.
1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are
4 // met:
5 //
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided
11 // with the distribution.
12 // * Neither the name of Google Inc. nor the names of its
13 // contributors may be used to endorse or promote products derived
14 // from this software without specific prior written permission.
15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 
28 #ifndef V8_FACTORY_H_
29 #define V8_FACTORY_H_
30 
31 #include "globals.h"
32 #include "handles.h"
33 #include "heap.h"
34 
35 namespace v8 {
36 namespace internal {
37 
38 // Interface for handle based allocation.
39 
40 class Factory {
41  public:
42  // Allocate a new uninitialized fixed array.
44  int size,
45  PretenureFlag pretenure = NOT_TENURED);
46 
47  // Allocate a new fixed array with non-existing entries (the hole).
49  int size,
50  PretenureFlag pretenure = NOT_TENURED);
51 
52  // Allocate a new uninitialized fixed double array.
54  int size,
55  PretenureFlag pretenure = NOT_TENURED);
56 
58  int at_least_space_for);
59 
61  int at_least_space_for);
62 
63  Handle<StringDictionary> NewStringDictionary(int at_least_space_for);
64 
65  Handle<ObjectHashSet> NewObjectHashSet(int at_least_space_for);
66 
67  Handle<ObjectHashTable> NewObjectHashTable(int at_least_space_for);
68 
69  Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors,
70  int slack = 0);
72  int deopt_entry_count,
73  PretenureFlag pretenure);
75  int deopt_entry_count,
76  PretenureFlag pretenure);
77  // Allocates a pre-tenured empty AccessorPair.
79 
81 
86  int from,
87  int length);
89  Handle<String> LookupAsciiSymbol(const char* str) {
90  return LookupSymbol(CStrVector(str));
91  }
92 
93 
94  // String creation functions. Most of the string creation functions take
95  // a Heap::PretenureFlag argument to optionally request that they be
96  // allocated in the old generation. The pretenure flag defaults to
97  // DONT_TENURE.
98  //
99  // Creates a new String object. There are two String encodings: ASCII and
100  // two byte. One should choose between the three string factory functions
101  // based on the encoding of the string buffer that the string is
102  // initialized from.
103  // - ...FromAscii initializes the string from a buffer that is ASCII
104  // encoded (it does not check that the buffer is ASCII encoded) and
105  // the result will be ASCII encoded.
106  // - ...FromUtf8 initializes the string from a buffer that is UTF-8
107  // encoded. If the characters are all single-byte characters, the
108  // result will be ASCII encoded, otherwise it will converted to two
109  // byte.
110  // - ...FromTwoByte initializes the string from a buffer that is two
111  // byte encoded. If the characters are all single-byte characters,
112  // the result will be converted to ASCII, otherwise it will be left as
113  // two byte.
114  //
115  // ASCII strings are pretenured when used as keys in the SourceCodeCache.
117  Vector<const char> str,
118  PretenureFlag pretenure = NOT_TENURED);
119 
120  // UTF8 strings are pretenured when used for regexp literal patterns and
121  // flags in the parser.
123  Vector<const char> str,
124  PretenureFlag pretenure = NOT_TENURED);
125 
127  Vector<const uc16> str,
128  PretenureFlag pretenure = NOT_TENURED);
129 
130  // Allocates and partially initializes an ASCII or TwoByte String. The
131  // characters of the string are uninitialized. Currently used in regexp code
132  // only, where they are pretenured.
134  int length,
135  PretenureFlag pretenure = NOT_TENURED);
137  int length,
138  PretenureFlag pretenure = NOT_TENURED);
139 
140  // Create a new cons string object which consists of a pair of strings.
142  Handle<String> second);
143 
144  // Create a new string object which holds a substring of a string.
146  int begin,
147  int end);
148 
149  // Create a new string object which holds a proper substring of a string.
151  int begin,
152  int end);
153 
154  // Creates a new external String object. There are two String encodings
155  // in the system: ASCII and two byte. Unlike other String types, it does
156  // not make sense to have a UTF-8 factory function for external strings,
157  // because we cannot change the underlying buffer.
159  const ExternalAsciiString::Resource* resource);
161  const ExternalTwoByteString::Resource* resource);
162 
163  // Create a global (but otherwise uninitialized) context.
165 
166  // Create a global context.
168  Handle<ScopeInfo> scope_info);
169 
170  // Create a module context.
172 
173  // Create a function context.
175 
176  // Create a catch context.
178  Handle<Context> previous,
179  Handle<String> name,
180  Handle<Object> thrown_object);
181 
182  // Create a 'with' context.
184  Handle<Context> previous,
185  Handle<JSObject> extension);
186 
187  // Create a block context.
189  Handle<Context> previous,
190  Handle<ScopeInfo> scope_info);
191 
192  // Return the Symbol matching the passed in string.
194 
195  // Allocate a new struct. The struct is pretenured (allocated directly in
196  // the old generation).
198 
200 
202 
203  // Foreign objects are pretenured when allocated by the bootstrapper.
205  PretenureFlag pretenure = NOT_TENURED);
206 
207  // Allocate a new foreign object. The foreign is pretenured (allocated
208  // directly in the old generation).
210 
211  Handle<ByteArray> NewByteArray(int length,
212  PretenureFlag pretenure = NOT_TENURED);
213 
215  int length,
216  ExternalArrayType array_type,
217  void* external_pointer,
218  PretenureFlag pretenure = NOT_TENURED);
219 
221  Handle<Object> value);
222 
224  InstanceType type,
225  int instance_size,
226  ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND);
227 
229 
231 
232  // Copy the map adding more inobject properties if possible without
233  // overflowing the instance size.
234  Handle<Map> CopyMap(Handle<Map> map, int extra_inobject_props);
236 
238  ElementsKind elements_kind);
239 
241 
244 
245  // Numbers (e.g. literals) are pretenured by the parser.
246  Handle<Object> NewNumber(double value,
247  PretenureFlag pretenure = NOT_TENURED);
248 
250  PretenureFlag pretenure = NOT_TENURED);
251  Handle<Object> NewNumberFromUint(uint32_t value,
252  PretenureFlag pretenure = NOT_TENURED);
253 
254  // These objects are used by the api to create env-independent data
255  // structures in the heap.
257 
259 
260  // JS objects are pretenured when allocated by the bootstrapper and
261  // runtime.
263  PretenureFlag pretenure = NOT_TENURED);
264 
265  // Global objects are pretenured.
267 
268  // JS objects are pretenured when allocated by the bootstrapper and
269  // runtime.
271 
272  // JS modules are pretenured.
274  Handle<ScopeInfo> scope_info);
275 
276  // JS arrays are pretenured when allocated by the parser.
278  int capacity,
280  PretenureFlag pretenure = NOT_TENURED);
281 
283  Handle<FixedArrayBase> elements,
285  PretenureFlag pretenure = NOT_TENURED);
286 
288  int capacity,
289  int length);
290 
291  void SetContent(Handle<JSArray> array, Handle<FixedArrayBase> elements);
292 
295  Handle<FixedArrayBase> elements,
296  uint32_t length,
297  EnsureElementsMode mode);
298 
300 
301  // Change the type of the argument into a JS object/function and reinitialize.
302  void BecomeJSObject(Handle<JSReceiver> object);
304 
305  void SetIdentityHash(Handle<JSObject> object, Smi* hash);
306 
308  Handle<Object> prototype);
309 
311  Handle<String> name,
312  LanguageMode language_mode);
313 
314  Handle<JSFunction> NewFunction(Handle<Object> super, bool is_global);
315 
317  Handle<SharedFunctionInfo> function_info,
318  Handle<Map> function_map,
319  PretenureFlag pretenure);
320 
322  Handle<SharedFunctionInfo> function_info,
323  Handle<Context> context,
324  PretenureFlag pretenure = TENURED);
325 
326  Handle<ScopeInfo> NewScopeInfo(int length);
327 
328  Handle<Code> NewCode(const CodeDesc& desc,
330  Handle<Object> self_reference,
331  bool immovable = false);
332 
334 
336 
339  Handle<Context> native_context);
340 
341  // Interface for creating error objects.
342 
343  Handle<Object> NewError(const char* maker, const char* type,
344  Handle<JSArray> args);
345  Handle<String> EmergencyNewError(const char* type, Handle<JSArray> args);
346  Handle<Object> NewError(const char* maker, const char* type,
347  Vector< Handle<Object> > args);
348  Handle<Object> NewError(const char* type,
349  Vector< Handle<Object> > args);
351  Handle<Object> NewError(const char* constructor,
353 
354  Handle<Object> NewTypeError(const char* type,
355  Vector< Handle<Object> > args);
357 
358  Handle<Object> NewRangeError(const char* type,
359  Vector< Handle<Object> > args);
361 
362  Handle<Object> NewSyntaxError(const char* type, Handle<JSArray> args);
364 
365  Handle<Object> NewReferenceError(const char* type,
366  Vector< Handle<Object> > args);
368 
369  Handle<Object> NewEvalError(const char* type,
370  Vector< Handle<Object> > args);
371 
372 
374  InstanceType type,
375  int instance_size,
377  bool force_initial_map);
378 
380  Handle<SharedFunctionInfo> shared, Handle<Object> prototype);
381 
382 
384  InstanceType type,
385  int instance_size,
386  Handle<JSObject> prototype,
388  bool force_initial_map);
389 
392 
394  Handle<String> Uint32ToString(uint32_t value);
395 
400  };
401 
405 
407 
408  // Installs interceptors on the instance. 'desc' is a function template,
409  // and instance is an object instance created by the function of this
410  // function template.
412  Handle<JSObject> instance,
413  bool* pending_exception);
414 
415 #define ROOT_ACCESSOR(type, name, camel_name) \
416  inline Handle<type> name() { \
417  return Handle<type>(BitCast<type**>( \
418  &isolate()->heap()->roots_[Heap::k##camel_name##RootIndex])); \
419  }
421 #undef ROOT_ACCESSOR_ACCESSOR
422 
423 #define SYMBOL_ACCESSOR(name, str) \
424  inline Handle<String> name() { \
425  return Handle<String>(BitCast<String**>( \
426  &isolate()->heap()->roots_[Heap::k##name##RootIndex])); \
427  }
429 #undef SYMBOL_ACCESSOR
430 
432  return Handle<String>(&isolate()->heap()->hidden_symbol_);
433  }
434 
436  Handle<String> name,
437  int number_of_literals,
439  Handle<ScopeInfo> scope_info);
441 
443  Handle<String> type,
444  Handle<JSArray> arguments,
445  int start_position,
446  int end_position,
447  Handle<Object> script,
448  Handle<Object> stack_trace,
449  Handle<Object> stack_frames);
450 
453  uint32_t key,
454  Handle<Object> value);
455 
458  uint32_t key,
459  Handle<Object> value);
460 
461 #ifdef ENABLE_DEBUGGER_SUPPORT
462  Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared);
463 #endif
464 
465  // Return a map using the map cache in the native context.
466  // The key the an ordered set of property names.
469 
470  // Creates a new FixedArray that holds the data associated with the
471  // atom regexp and stores it in the regexp.
473  JSRegExp::Type type,
474  Handle<String> source,
476  Handle<Object> match_pattern);
477 
478  // Creates a new FixedArray that holds the data associated with the
479  // irregexp regexp and stores it in the regexp.
481  JSRegExp::Type type,
482  Handle<String> source,
484  int capture_count);
485 
486  // Returns the value for a known global constant (a property of the global
487  // object which is neither configurable nor writable) like 'undefined'.
488  // Returns a null handle when the given name is unknown.
490 
491  // Converts the given boolean condition to JavaScript boolean value.
492  Handle<Object> ToBoolean(bool value);
493 
494  private:
495  Isolate* isolate() { return reinterpret_cast<Isolate*>(this); }
496 
497  Handle<JSFunction> NewFunctionHelper(Handle<String> name,
498  Handle<Object> prototype);
499 
500  Handle<JSFunction> NewFunctionWithoutPrototypeHelper(
501  Handle<String> name,
502  LanguageMode language_mode);
503 
504  // Create a new map cache.
505  Handle<MapCache> NewMapCache(int at_least_space_for);
506 
507  // Update the map cache in the native context with (keys, map)
508  Handle<MapCache> AddToMapCache(Handle<Context> context,
510  Handle<Map> map);
511 };
512 
513 
514 } } // namespace v8::internal
515 
516 #endif // V8_FACTORY_H_
byte * Address
Definition: globals.h:157
Handle< JSObject > NewFunctionPrototype(Handle< JSFunction > function)
Definition: factory.cc:469
Handle< JSObject > NewJSObject(Handle< JSFunction > constructor, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:904
Handle< String > NewExternalStringFromAscii(const ExternalAsciiString::Resource *resource)
Definition: factory.cc:270
Handle< Context > NewModuleContext(Handle< ScopeInfo > scope_info)
Definition: factory.cc:305
Handle< JSFunction > NewFunctionFromSharedFunctionInfo(Handle< SharedFunctionInfo > function_info, Handle< Context > context, PretenureFlag pretenure=TENURED)
Definition: factory.cc:548
Handle< String > SymbolFromString(Handle< String > value)
Definition: factory.cc:898
Handle< DescriptorArray > NewDescriptorArray(int number_of_descriptors, int slack=0)
Definition: factory.cc:115
Handle< FixedArray > NewFixedArrayWithHoles(int size, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:53
Handle< String > NewSubString(Handle< String > str, int begin, int end)
Definition: factory.cc:251
Handle< Script > NewScript(Handle< String > source)
Definition: factory.cc:374
Handle< SeqAsciiString > NewRawAsciiString(int length, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:225
Handle< ObjectHashTable > NewObjectHashTable(int at_least_space_for)
Definition: factory.cc:107
Handle< JSFunction > BaseNewFunctionFromSharedFunctionInfo(Handle< SharedFunctionInfo > function_info, Handle< Map > function_map, PretenureFlag pretenure)
Definition: factory.cc:534
Handle< JSArray > NewJSArray(int capacity, ElementsKind elements_kind=TERMINAL_FAST_ELEMENTS_KIND, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:937
Handle< String > hidden_symbol()
Definition: factory.h:431
Handle< Context > NewCatchContext(Handle< JSFunction > function, Handle< Context > previous, Handle< String > name, Handle< Object > thrown_object)
Definition: factory.cc:322
int int32_t
Definition: unicode.cc:47
Handle< Context > NewFunctionContext(int length, Handle< JSFunction > function)
Definition: factory.cc:313
Handle< AccessorInfo > NewAccessorInfo()
Definition: factory.cc:366
Handle< JSFunction > NewFunctionWithPrototype(Handle< String > name, InstanceType type, int instance_size, Handle< JSObject > prototype, Handle< Code > code, bool force_initial_map)
Definition: factory.cc:817
ExternalArrayType
Definition: v8.h:1431
Handle< SharedFunctionInfo > NewSharedFunctionInfo(Handle< String > name, int number_of_literals, Handle< Code > code, Handle< ScopeInfo > scope_info)
Definition: factory.cc:1030
Handle< Object > NewNumber(double value, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:597
Handle< JSObject > NewArgumentsObject(Handle< Object > callee, int length)
Definition: factory.cc:1198
Handle< Code > CopyCode(Handle< Code > code)
Definition: factory.cc:884
Handle< String > NumberToString(Handle< Object > number)
Definition: factory.cc:1076
void EnsureCanContainHeapObjectElements(Handle< JSArray > array)
Definition: factory.cc:981
#define SYMBOL_ACCESSOR(name, str)
Definition: factory.h:423
Handle< String > LookupAsciiSymbol(Vector< const char > str)
Definition: factory.cc:174
Handle< JSMessageObject > NewJSMessageObject(Handle< String > type, Handle< JSArray > arguments, int start_position, int end_position, Handle< Object > script, Handle< Object > stack_trace, Handle< Object > stack_frames)
Definition: factory.cc:1050
Handle< Object > NewSyntaxError(const char *type, Handle< JSArray > args)
Definition: factory.cc:652
Handle< String > EmergencyNewError(const char *type, Handle< JSArray > args)
Definition: factory.cc:698
Handle< SeededNumberDictionary > DictionaryAtNumberPut(Handle< SeededNumberDictionary >, uint32_t key, Handle< Object > value)
Definition: factory.cc:1088
Handle< Map > GetElementsTransitionMap(Handle< JSObject > object, ElementsKind elements_kind)
Definition: factory.cc:513
Handle< String > NewStringFromUtf8(Vector< const char > str, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:207
Handle< Object > NewRangeError(const char *type, Vector< Handle< Object > > args)
Definition: factory.cc:641
void ConfigureInstance(Handle< FunctionTemplateInfo > desc, Handle< JSObject > instance, bool *pending_exception)
Definition: factory.cc:1403
Handle< StringDictionary > NewStringDictionary(int at_least_space_for)
Definition: factory.cc:73
Handle< Map > CopyWithPreallocatedFieldDescriptors(Handle< Map > map)
Definition: factory.cc:477
Handle< Map > CopyMap(Handle< Map > map, int extra_inobject_props)
Definition: factory.cc:483
Handle< JSFunction > NewFunction(Handle< String > name, Handle< Object > prototype)
Definition: factory.cc:1120
Handle< SeqTwoByteString > NewRawTwoByteString(int length, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:234
Handle< JSObject > NewNeanderObject()
Definition: factory.cc:621
Handle< ScopeInfo > NewScopeInfo(int length)
Definition: factory.cc:865
void SetRegExpAtomData(Handle< JSRegExp > regexp, JSRegExp::Type type, Handle< String > source, JSRegExp::Flags flags, Handle< Object > match_pattern)
Definition: factory.cc:1367
void SetElementsCapacityAndLength(Handle< JSArray > array, int capacity, int length)
Definition: factory.cc:963
#define ROOT_LIST(V)
Definition: heap.h:159
Handle< Object > ToBoolean(bool value)
Definition: factory.cc:1428
Handle< Object > GlobalConstantFor(Handle< String > name)
Definition: factory.cc:1419
Handle< String > LookupSymbol(Vector< const char > str)
Definition: factory.cc:161
Handle< JSObject > NewJSObjectFromMap(Handle< Map > map)
Definition: factory.cc:929
#define ROOT_ACCESSOR(type, name, camel_name)
Definition: factory.h:415
Handle< String > NewStringFromTwoByte(Vector< const uc16 > str, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:216
Handle< ExternalArray > NewExternalArray(int length, ExternalArrayType array_type, void *external_pointer, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:435
Handle< ByteArray > NewByteArray(int length, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:426
Handle< FixedDoubleArray > NewFixedDoubleArray(int size, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:63
Handle< FixedArray > NewFixedArray(int size, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:44
#define SYMBOL_LIST(V)
Definition: heap.h:163
Handle< GlobalObject > NewGlobalObject(Handle< JSFunction > constructor)
Definition: factory.cc:920
Handle< Object > ToObject(Handle< Object > object)
Definition: factory.cc:1154
Handle< Context > NewBlockContext(Handle< JSFunction > function, Handle< Context > previous, Handle< ScopeInfo > scope_info)
Definition: factory.cc:346
Handle< FixedArray > CopyFixedArray(Handle< FixedArray > array)
Definition: factory.cc:523
Vector< const char > CStrVector(const char *data)
Definition: utils.h:526
Handle< String > LookupAsciiSymbol(const char *str)
Definition: factory.h:89
void SetContent(Handle< JSArray > array, Handle< FixedArrayBase > elements)
Definition: factory.cc:973
Handle< JSArray > NewJSArrayWithElements(Handle< FixedArrayBase > elements, ElementsKind elements_kind=TERMINAL_FAST_ELEMENTS_KIND, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:951
Handle< Object > NewNumberFromInt(int32_t value, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:605
Handle< String > NewProperSubString(Handle< String > str, int begin, int end)
Definition: factory.cc:260
Handle< DeoptimizationInputData > NewDeoptimizationInputData(int deopt_entry_count, PretenureFlag pretenure)
Definition: factory.cc:124
Handle< JSProxy > NewJSProxy(Handle< Object > handler, Handle< Object > prototype)
Definition: factory.cc:998
Handle< JSFunction > NewFunctionWithoutPrototype(Handle< String > name, LanguageMode language_mode)
Definition: factory.cc:1144
Handle< DeoptimizationOutputData > NewDeoptimizationOutputData(int deopt_entry_count, PretenureFlag pretenure)
Definition: factory.cc:135
Handle< String > NewStringFromAscii(Vector< const char > str, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:199
Handle< String > NewExternalStringFromTwoByte(const ExternalTwoByteString::Resource *resource)
Definition: factory.cc:279
Handle< TypeFeedbackInfo > NewTypeFeedbackInfo()
Definition: factory.cc:153
Handle< Object > NewReferenceError(const char *type, Vector< Handle< Object > > args)
Definition: factory.cc:662
Handle< JSFunction > CreateApiFunction(Handle< FunctionTemplateInfo > data, ApiInstanceType type=JavaScriptObject)
Definition: factory.cc:1206
void EnsureCanContainElements(Handle< JSArray > array, Handle< FixedArrayBase > elements, uint32_t length, EnsureElementsMode mode)
Definition: factory.cc:988
void BecomeJSObject(Handle< JSReceiver > object)
Definition: factory.cc:1007
Handle< Object > NewTypeError(const char *type, Vector< Handle< Object > > args)
Definition: factory.cc:630
Handle< JSModule > NewJSModule(Handle< Context > context, Handle< ScopeInfo > scope_info)
Definition: factory.cc:912
Handle< Context > NewGlobalContext(Handle< JSFunction > function, Handle< ScopeInfo > scope_info)
Definition: factory.cc:296
Handle< Map > ObjectLiteralMapFromCache(Handle< Context > context, Handle< FixedArray > keys)
Definition: factory.cc:1346
Handle< Foreign > NewForeign(Address addr, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:414
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of MIPS FPU instructions if expose natives in global object expose gc extension number of stack frames to capture disable builtin natives files print a stack trace if an assertion failure occurs use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations prepare for turning on always opt minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions automatically set the debug break flag when debugger commands are in the queue always cause a debug break before aborting maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print more details following each garbage collection print amount of external allocated memory after each time it is adjusted flush code that we expect not to use again before full gc do incremental marking steps track object counts and memory usage use caching Perform compaction on every full GC Never perform compaction on full GC testing only Compact code space on full incremental collections Default seed for initializing random allows verbose printing trace parsing and preparsing Check icache flushes in ARM and MIPS simulator Stack alingment in bytes in print stack trace when throwing exceptions randomize hashes to avoid predictable hash Fixed seed to use to hash property keys(0 means random)" "(with snapshots this option cannot override the baked-in seed)") DEFINE_bool(preemption
void SetIdentityHash(Handle< JSObject > object, Smi *hash)
Definition: factory.cc:1023
Handle< String > Uint32ToString(uint32_t value)
Definition: factory.cc:1082
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of MIPS FPU instructions if expose natives in global object expose gc extension number of stack frames to capture disable builtin natives files print a stack trace if an assertion failure occurs use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations prepare for turning on always opt minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions automatically set the debug break flag when debugger commands are in the queue always cause a debug break before aborting maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print more details following each garbage collection print amount of external allocated memory after each time it is adjusted flush code that we expect not to use again before full gc do incremental marking steps track object counts and memory usage use caching Perform compaction on every full GC Never perform compaction on full GC testing only Compact code space on full incremental collections Default seed for initializing random allows verbose printing trace parsing and preparsing Check icache flushes in ARM and MIPS simulator Stack alingment in bytes in print stack trace when throwing exceptions randomize hashes to avoid predictable hash Fixed seed to use to hash property activate a timer that switches between V8 threads testing_bool_flag float flag Seed used for threading test randomness A filename with extra code to be included in the Print usage message
Definition: flags.cc:495
Handle< FixedDoubleArray > CopyFixedDoubleArray(Handle< FixedDoubleArray > array)
Definition: factory.cc:528
Handle< String > LookupTwoByteSymbol(Vector< const uc16 > str)
Definition: factory.cc:192
Handle< JSFunction > InstallMembers(Handle< JSFunction > function)
Handle< Context > NewWithContext(Handle< JSFunction > function, Handle< Context > previous, Handle< JSObject > extension)
Definition: factory.cc:336
Handle< Code > NewCode(const CodeDesc &desc, Code::Flags flags, Handle< Object > self_reference, bool immovable=false)
Definition: factory.cc:873
Handle< Struct > NewStruct(InstanceType type)
Definition: factory.cc:358
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
void SetRegExpIrregexpData(Handle< JSRegExp > regexp, JSRegExp::Type type, Handle< String > source, JSRegExp::Flags flags, int capture_count)
Definition: factory.cc:1381
Handle< AccessorPair > NewAccessorPair()
Definition: factory.cc:146
Handle< Context > NewNativeContext()
Definition: factory.cc:288
Handle< Object > NewEvalError(const char *type, Vector< Handle< Object > > args)
Definition: factory.cc:686
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of MIPS FPU instructions if expose natives in global object expose gc extension number of stack frames to capture disable builtin natives files print a stack trace if an assertion failure occurs use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations prepare for turning on always opt minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions automatically set the debug break flag when debugger commands are in the queue always cause a debug break before aborting maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print more details following each garbage collection print amount of external allocated memory after each time it is adjusted flush code that we expect not to use again before full gc do incremental marking steps track object counts and memory usage use caching Perform compaction on every full GC Never perform compaction on full GC testing only Compact code space on full incremental collections Default seed for initializing random allows verbose printing trace parsing and preparsing Check icache flushes in ARM and MIPS simulator Stack alingment in bytes in print stack trace when throwing exceptions randomize hashes to avoid predictable hash Fixed seed to use to hash property activate a timer that switches between V8 threads testing_bool_flag float flag Seed used for threading test randomness A filename with extra code to be included in the Print usage including flags
Definition: flags.cc:495
Handle< Map > NewMap(InstanceType type, int instance_size, ElementsKind elements_kind=TERMINAL_FAST_ELEMENTS_KIND)
Definition: factory.cc:459
Handle< String > NewConsString(Handle< String > first, Handle< String > second)
Definition: factory.cc:243
Handle< Object > NewNumberFromUint(uint32_t value, PretenureFlag pretenure=NOT_TENURED)
Definition: factory.cc:613
Handle< ObjectHashSet > NewObjectHashSet(int at_least_space_for)
Definition: factory.cc:99
Handle< JSGlobalPropertyCell > NewJSGlobalPropertyCell(Handle< Object > value)
Definition: factory.cc:450
Handle< UnseededNumberDictionary > NewUnseededNumberDictionary(int at_least_space_for)
Definition: factory.cc:90
void BecomeJSFunction(Handle< JSReceiver > object)
Definition: factory.cc:1015
Handle< Object > NewError(const char *maker, const char *type, Handle< JSArray > args)
Definition: factory.cc:735
Handle< SeededNumberDictionary > NewSeededNumberDictionary(int at_least_space_for)
Definition: factory.cc:81