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
string-stream.cc
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 #include "v8.h"
29 
30 #include "factory.h"
31 #include "string-stream.h"
32 
33 #include "allocation-inl.h"
34 
35 namespace v8 {
36 namespace internal {
37 
38 static const int kMentionedObjectCacheMaxSize = 256;
39 
40 char* HeapStringAllocator::allocate(unsigned bytes) {
41  space_ = NewArray<char>(bytes);
42  return space_;
43 }
44 
45 
47  unsigned size) {
48  size_ = size;
49  space_ = memory;
50 }
51 
52 
53 bool StringStream::Put(char c) {
54  if (full()) return false;
55  ASSERT(length_ < capacity_);
56  // Since the trailing '\0' is not accounted for in length_ fullness is
57  // indicated by a difference of 1 between length_ and capacity_. Thus when
58  // reaching a difference of 2 we need to grow the buffer.
59  if (length_ == capacity_ - 2) {
60  unsigned new_capacity = capacity_;
61  char* new_buffer = allocator_->grow(&new_capacity);
62  if (new_capacity > capacity_) {
63  capacity_ = new_capacity;
64  buffer_ = new_buffer;
65  } else {
66  // Reached the end of the available buffer.
67  ASSERT(capacity_ >= 5);
68  length_ = capacity_ - 1; // Indicate fullness of the stream.
69  buffer_[length_ - 4] = '.';
70  buffer_[length_ - 3] = '.';
71  buffer_[length_ - 2] = '.';
72  buffer_[length_ - 1] = '\n';
73  buffer_[length_] = '\0';
74  return false;
75  }
76  }
77  buffer_[length_] = c;
78  buffer_[length_ + 1] = '\0';
79  length_++;
80  return true;
81 }
82 
83 
84 // A control character is one that configures a format element. For
85 // instance, in %.5s, .5 are control characters.
86 static bool IsControlChar(char c) {
87  switch (c) {
88  case '0': case '1': case '2': case '3': case '4': case '5':
89  case '6': case '7': case '8': case '9': case '.': case '-':
90  return true;
91  default:
92  return false;
93  }
94 }
95 
96 
98  // If we already ran out of space then return immediately.
99  if (full()) return;
100  int offset = 0;
101  int elm = 0;
102  while (offset < format.length()) {
103  if (format[offset] != '%' || elm == elms.length()) {
104  Put(format[offset]);
105  offset++;
106  continue;
107  }
108  // Read this formatting directive into a temporary buffer
110  int format_length = 0;
111  // Skip over the whole control character sequence until the
112  // format element type
113  temp[format_length++] = format[offset++];
114  while (offset < format.length() && IsControlChar(format[offset]))
115  temp[format_length++] = format[offset++];
116  if (offset >= format.length())
117  return;
118  char type = format[offset];
119  temp[format_length++] = type;
120  temp[format_length] = '\0';
121  offset++;
122  FmtElm current = elms[elm++];
123  switch (type) {
124  case 's': {
125  ASSERT_EQ(FmtElm::C_STR, current.type_);
126  const char* value = current.data_.u_c_str_;
127  Add(value);
128  break;
129  }
130  case 'w': {
131  ASSERT_EQ(FmtElm::LC_STR, current.type_);
132  Vector<const uc16> value = *current.data_.u_lc_str_;
133  for (int i = 0; i < value.length(); i++)
134  Put(static_cast<char>(value[i]));
135  break;
136  }
137  case 'o': {
138  ASSERT_EQ(FmtElm::OBJ, current.type_);
139  Object* obj = current.data_.u_obj_;
140  PrintObject(obj);
141  break;
142  }
143  case 'k': {
144  ASSERT_EQ(FmtElm::INT, current.type_);
145  int value = current.data_.u_int_;
146  if (0x20 <= value && value <= 0x7F) {
147  Put(value);
148  } else if (value <= 0xff) {
149  Add("\\x%02x", value);
150  } else {
151  Add("\\u%04x", value);
152  }
153  break;
154  }
155  case 'i': case 'd': case 'u': case 'x': case 'c': case 'X': {
156  int value = current.data_.u_int_;
157  EmbeddedVector<char, 24> formatted;
158  int length = OS::SNPrintF(formatted, temp.start(), value);
159  Add(Vector<const char>(formatted.start(), length));
160  break;
161  }
162  case 'f': case 'g': case 'G': case 'e': case 'E': {
163  double value = current.data_.u_double_;
164  EmbeddedVector<char, 28> formatted;
165  OS::SNPrintF(formatted, temp.start(), value);
166  Add(formatted.start());
167  break;
168  }
169  case 'p': {
170  void* value = current.data_.u_pointer_;
171  EmbeddedVector<char, 20> formatted;
172  OS::SNPrintF(formatted, temp.start(), value);
173  Add(formatted.start());
174  break;
175  }
176  default:
177  UNREACHABLE();
178  break;
179  }
180  }
181 
182  // Verify that the buffer is 0-terminated
183  ASSERT(buffer_[length_] == '\0');
184 }
185 
186 
187 void StringStream::PrintObject(Object* o) {
188  o->ShortPrint(this);
189  if (o->IsString()) {
191  return;
192  }
193  } else if (o->IsNumber() || o->IsOddball()) {
194  return;
195  }
196  if (o->IsHeapObject()) {
197  DebugObjectCache* debug_object_cache = Isolate::Current()->
198  string_stream_debug_object_cache();
199  for (int i = 0; i < debug_object_cache->length(); i++) {
200  if ((*debug_object_cache)[i] == o) {
201  Add("#%d#", i);
202  return;
203  }
204  }
205  if (debug_object_cache->length() < kMentionedObjectCacheMaxSize) {
206  Add("#%d#", debug_object_cache->length());
207  debug_object_cache->Add(HeapObject::cast(o));
208  } else {
209  Add("@%p", o);
210  }
211  }
212 }
213 
214 
215 void StringStream::Add(const char* format) {
216  Add(CStrVector(format));
217 }
218 
219 
221  Add(format, Vector<FmtElm>::empty());
222 }
223 
224 
225 void StringStream::Add(const char* format, FmtElm arg0) {
226  const char argc = 1;
227  FmtElm argv[argc] = { arg0 };
228  Add(CStrVector(format), Vector<FmtElm>(argv, argc));
229 }
230 
231 
232 void StringStream::Add(const char* format, FmtElm arg0, FmtElm arg1) {
233  const char argc = 2;
234  FmtElm argv[argc] = { arg0, arg1 };
235  Add(CStrVector(format), Vector<FmtElm>(argv, argc));
236 }
237 
238 
239 void StringStream::Add(const char* format, FmtElm arg0, FmtElm arg1,
240  FmtElm arg2) {
241  const char argc = 3;
242  FmtElm argv[argc] = { arg0, arg1, arg2 };
243  Add(CStrVector(format), Vector<FmtElm>(argv, argc));
244 }
245 
246 
247 void StringStream::Add(const char* format, FmtElm arg0, FmtElm arg1,
248  FmtElm arg2, FmtElm arg3) {
249  const char argc = 4;
250  FmtElm argv[argc] = { arg0, arg1, arg2, arg3 };
251  Add(CStrVector(format), Vector<FmtElm>(argv, argc));
252 }
253 
254 
256  char* str = NewArray<char>(length_ + 1);
257  memcpy(str, buffer_, length_);
258  str[length_] = '\0';
259  return SmartArrayPointer<const char>(str);
260 }
261 
262 
264  LOG(ISOLATE, StringEvent("StackDump", buffer_));
265 }
266 
267 
268 void StringStream::OutputToFile(FILE* out) {
269  // Dump the output to stdout, but make sure to break it up into
270  // manageable chunks to avoid losing parts of the output in the OS
271  // printing code. This is a problem on Windows in particular; see
272  // the VPrint() function implementations in platform-win32.cc.
273  unsigned position = 0;
274  for (unsigned next; (next = position + 2048) < length_; position = next) {
275  char save = buffer_[next];
276  buffer_[next] = '\0';
277  internal::PrintF(out, "%s", &buffer_[position]);
278  buffer_[next] = save;
279  }
280  internal::PrintF(out, "%s", &buffer_[position]);
281 }
282 
283 
285  return FACTORY->NewStringFromUtf8(Vector<const char>(buffer_, length_));
286 }
287 
288 
290  Isolate* isolate = Isolate::Current();
291  isolate->set_string_stream_current_security_token(NULL);
292  if (isolate->string_stream_debug_object_cache() == NULL) {
293  isolate->set_string_stream_debug_object_cache(
295  }
296  isolate->string_stream_debug_object_cache()->Clear();
297 }
298 
299 
300 #ifdef DEBUG
301 bool StringStream::IsMentionedObjectCacheClear() {
302  return (
303  Isolate::Current()->string_stream_debug_object_cache()->length() == 0);
304 }
305 #endif
306 
307 
309  return Put(str, 0, str->length());
310 }
311 
312 
313 bool StringStream::Put(String* str, int start, int end) {
314  StringInputBuffer name_buffer(str);
315  name_buffer.Seek(start);
316  for (int i = start; i < end && name_buffer.has_more(); i++) {
317  int c = name_buffer.GetNext();
318  if (c >= 127 || c < 32) {
319  c = '?';
320  }
321  if (!Put(c)) {
322  return false; // Output was truncated.
323  }
324  }
325  return true;
326 }
327 
328 
330  if (name->IsString()) {
331  String* str = String::cast(name);
332  if (str->length() > 0) {
333  Put(str);
334  } else {
335  Add("/* anonymous */");
336  }
337  } else {
338  Add("%o", name);
339  }
340 }
341 
342 
344  Map* map = js_object->map();
345  if (!HEAP->Contains(map) ||
346  !map->IsHeapObject() ||
347  !map->IsMap()) {
348  Add("<Invalid map>\n");
349  return;
350  }
351  int real_size = map->NumberOfOwnDescriptors();
352  DescriptorArray* descs = map->instance_descriptors();
353  for (int i = 0; i < descs->number_of_descriptors(); i++) {
354  PropertyDetails details = descs->GetDetails(i);
355  if (details.descriptor_index() > real_size) continue;
356  if (details.type() == FIELD) {
357  Object* key = descs->GetKey(i);
358  if (key->IsString() || key->IsNumber()) {
359  int len = 3;
360  if (key->IsString()) {
361  len = String::cast(key)->length();
362  }
363  for (; len < 18; len++)
364  Put(' ');
365  if (key->IsString()) {
366  Put(String::cast(key));
367  } else {
368  key->ShortPrint();
369  }
370  Add(": ");
371  Object* value = js_object->FastPropertyAt(descs->GetFieldIndex(i));
372  Add("%o\n", value);
373  }
374  }
375  }
376 }
377 
378 
379 void StringStream::PrintFixedArray(FixedArray* array, unsigned int limit) {
380  Heap* heap = HEAP;
381  for (unsigned int i = 0; i < 10 && i < limit; i++) {
382  Object* element = array->get(i);
383  if (element != heap->the_hole_value()) {
384  for (int len = 1; len < 18; len++)
385  Put(' ');
386  Add("%d: %o\n", i, array->get(i));
387  }
388  }
389  if (limit >= 10) {
390  Add(" ...\n");
391  }
392 }
393 
394 
396  unsigned int limit = byte_array->length();
397  for (unsigned int i = 0; i < 10 && i < limit; i++) {
398  byte b = byte_array->get(i);
399  Add(" %d: %3d 0x%02x", i, b, b);
400  if (b >= ' ' && b <= '~') {
401  Add(" '%c'", b);
402  } else if (b == '\n') {
403  Add(" '\n'");
404  } else if (b == '\r') {
405  Add(" '\r'");
406  } else if (b >= 1 && b <= 26) {
407  Add(" ^%c", b + 'A' - 1);
408  }
409  Add("\n");
410  }
411  if (limit >= 10) {
412  Add(" ...\n");
413  }
414 }
415 
416 
418  DebugObjectCache* debug_object_cache =
419  Isolate::Current()->string_stream_debug_object_cache();
420  Add("==== Key ============================================\n\n");
421  for (int i = 0; i < debug_object_cache->length(); i++) {
422  HeapObject* printee = (*debug_object_cache)[i];
423  Add(" #%d# %p: ", i, printee);
424  printee->ShortPrint(this);
425  Add("\n");
426  if (printee->IsJSObject()) {
427  if (printee->IsJSValue()) {
428  Add(" value(): %o\n", JSValue::cast(printee)->value());
429  }
430  PrintUsingMap(JSObject::cast(printee));
431  if (printee->IsJSArray()) {
432  JSArray* array = JSArray::cast(printee);
433  if (array->HasFastObjectElements()) {
434  unsigned int limit = FixedArray::cast(array->elements())->length();
435  unsigned int length =
436  static_cast<uint32_t>(JSArray::cast(array)->length()->Number());
437  if (length < limit) limit = length;
438  PrintFixedArray(FixedArray::cast(array->elements()), limit);
439  }
440  }
441  } else if (printee->IsByteArray()) {
443  } else if (printee->IsFixedArray()) {
444  unsigned int limit = FixedArray::cast(printee)->length();
445  PrintFixedArray(FixedArray::cast(printee), limit);
446  }
447  }
448 }
449 
450 
452  Isolate* isolate = Isolate::Current();
453  Heap* heap = isolate->heap();
454  if (!f->IsHeapObject() || !heap->Contains(HeapObject::cast(f))) {
455  return;
456  }
457  Map* map = HeapObject::cast(f)->map();
458  if (!map->IsHeapObject() ||
459  !heap->Contains(map) ||
460  !map->IsMap() ||
461  !f->IsJSFunction()) {
462  return;
463  }
464 
465  JSFunction* fun = JSFunction::cast(f);
466  Object* perhaps_context = fun->unchecked_context();
467  if (perhaps_context->IsHeapObject() &&
468  heap->Contains(HeapObject::cast(perhaps_context)) &&
469  perhaps_context->IsContext()) {
470  Context* context = fun->context();
471  if (!heap->Contains(context)) {
472  Add("(Function context is outside heap)\n");
473  return;
474  }
475  Object* token = context->native_context()->security_token();
476  if (token != isolate->string_stream_current_security_token()) {
477  Add("Security context: %o\n", token);
478  isolate->set_string_stream_current_security_token(token);
479  }
480  } else {
481  Add("(Function context is corrupt)\n");
482  }
483 }
484 
485 
487  if (f->IsHeapObject() &&
488  HEAP->Contains(HeapObject::cast(f)) &&
489  HEAP->Contains(HeapObject::cast(f)->map()) &&
490  HeapObject::cast(f)->map()->IsMap()) {
491  if (f->IsJSFunction()) {
492  JSFunction* fun = JSFunction::cast(f);
493  // Common case: on-stack function present and resolved.
494  PrintPrototype(fun, receiver);
495  *code = fun->code();
496  } else if (f->IsSymbol()) {
497  // Unresolved and megamorphic calls: Instead of the function
498  // we have the function name on the stack.
499  PrintName(f);
500  Add("/* unresolved */ ");
501  } else {
502  // Unless this is the frame of a built-in function, we should always have
503  // the callee function or name on the stack. If we don't, we have a
504  // problem or a change of the stack frame layout.
505  Add("%o", f);
506  Add("/* warning: no JSFunction object or function name found */ ");
507  }
508  /* } else if (is_trampoline()) {
509  Print("trampoline ");
510  */
511  } else {
512  if (!f->IsHeapObject()) {
513  Add("/* warning: 'function' was not a heap object */ ");
514  return;
515  }
516  if (!HEAP->Contains(HeapObject::cast(f))) {
517  Add("/* warning: 'function' was not on the heap */ ");
518  return;
519  }
520  if (!HEAP->Contains(HeapObject::cast(f)->map())) {
521  Add("/* warning: function's map was not on the heap */ ");
522  return;
523  }
524  if (!HeapObject::cast(f)->map()->IsMap()) {
525  Add("/* warning: function's map was not a valid map */ ");
526  return;
527  }
528  Add("/* warning: Invalid JSFunction object found */ ");
529  }
530 }
531 
532 
534  Object* name = fun->shared()->name();
535  bool print_name = false;
536  Heap* heap = HEAP;
537  for (Object* p = receiver; p != heap->null_value(); p = p->GetPrototype()) {
538  if (p->IsJSObject()) {
539  Object* key = JSObject::cast(p)->SlowReverseLookup(fun);
540  if (key != heap->undefined_value()) {
541  if (!name->IsString() ||
542  !key->IsString() ||
543  !String::cast(name)->Equals(String::cast(key))) {
544  print_name = true;
545  }
546  if (name->IsString() && String::cast(name)->length() == 0) {
547  print_name = false;
548  }
549  name = key;
550  }
551  } else {
552  print_name = true;
553  }
554  }
555  PrintName(name);
556  // Also known as - if the name in the function doesn't match the name under
557  // which it was looked up.
558  if (print_name) {
559  Add("(aka ");
560  PrintName(fun->shared()->name());
561  Put(')');
562  }
563 }
564 
565 
566 char* HeapStringAllocator::grow(unsigned* bytes) {
567  unsigned new_bytes = *bytes * 2;
568  // Check for overflow.
569  if (new_bytes <= *bytes) {
570  return space_;
571  }
572  char* new_space = NewArray<char>(new_bytes);
573  if (new_space == NULL) {
574  return space_;
575  }
576  memcpy(new_space, space_, *bytes);
577  *bytes = new_bytes;
578  DeleteArray(space_);
579  space_ = new_space;
580  return new_space;
581 }
582 
583 
584 // Only grow once to the maximum allowable size.
585 char* NoAllocationStringAllocator::grow(unsigned* bytes) {
586  ASSERT(size_ >= *bytes);
587  *bytes = size_;
588  return space_;
589 }
590 
591 
592 } } // namespace v8::internal
char * allocate(unsigned bytes)
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 memory(in Mbytes)") DEFINE_bool(gc_global
virtual void Seek(unsigned pos)
Definition: objects.cc:6676
void PrintF(const char *format,...)
Definition: v8utils.cc:40
static String * cast(Object *obj)
#define LOG(isolate, Call)
Definition: log.h:81
int NumberOfOwnDescriptors()
Definition: objects.h:4944
static HeapObject * cast(Object *obj)
void PrintSecurityTokenIfChanged(Object *function)
static ByteArray * cast(Object *obj)
#define ASSERT(condition)
Definition: checks.h:270
Object * SlowReverseLookup(Object *value)
Definition: objects.cc:4867
void PrintPrototype(JSFunction *fun, Object *receiver)
void PrintUsingMap(JSObject *js_object)
List< HeapObject *, PreallocatedStorageAllocationPolicy > DebugObjectCache
Definition: isolate.h:318
Handle< String > ToString()
bool Equals(String *other)
Definition: objects-inl.h:2419
void Add(Vector< const char > format, Vector< FmtElm > elms)
uint8_t byte
Definition: globals.h:156
void PrintFixedArray(FixedArray *array, unsigned int limit)
String * GetKey(int descriptor_number)
Definition: objects-inl.h:2093
char * grow(unsigned *bytes)
#define UNREACHABLE()
Definition: checks.h:50
T * start() const
Definition: utils.h:390
NoAllocationStringAllocator(char *memory, unsigned size)
const char * u_c_str_
Context * native_context()
Definition: contexts.cc:58
int GetFieldIndex(int descriptor_number)
Definition: objects-inl.h:2141
int length() const
Definition: utils.h:384
Object * FastPropertyAt(int index)
Definition: objects-inl.h:1566
PropertyDetails GetDetails(int descriptor_number)
Definition: objects-inl.h:2129
void PrintByteArray(ByteArray *ba)
Vector< const char > CStrVector(const char *data)
Definition: utils.h:526
static JSArray * cast(Object *obj)
static const int kMaxShortPrintLength
Definition: objects.h:7393
static int SNPrintF(Vector< char > str, const char *format,...)
#define ISOLATE
Definition: isolate.h:1435
byte get(int index)
Definition: objects-inl.h:2711
bool Contains(Address addr)
Definition: heap.cc:5367
const Vector< const uc16 > * u_lc_str_
static JSValue * cast(Object *obj)
Definition: objects-inl.h:4600
#define HEAP
Definition: isolate.h:1433
#define ASSERT_EQ(v1, v2)
Definition: checks.h:271
void PrintFunction(Object *function, Object *receiver, Code **code)
static FixedArray * cast(Object *obj)
#define FACTORY
Definition: isolate.h:1434
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 NULL
Definition: flags.cc:301
Object * get(int index)
Definition: objects-inl.h:1737
virtual char * grow(unsigned *bytes)=0
void OutputToFile(FILE *out)
static void ClearMentionedObjectCache()
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
SmartArrayPointer< const char > ToCString() const
void DeleteArray(T *array)
Definition: allocation.h:91
static JSObject * cast(Object *obj)
static JSFunction * cast(Object *obj)