V8 Project
scopeinfo.cc
Go to the documentation of this file.
1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include <stdlib.h>
6 
7 #include "src/v8.h"
8 
9 #include "src/scopeinfo.h"
10 #include "src/scopes.h"
11 
12 namespace v8 {
13 namespace internal {
14 
15 
17  // Collect stack and context locals.
18  ZoneList<Variable*> stack_locals(scope->StackLocalCount(), zone);
19  ZoneList<Variable*> context_locals(scope->ContextLocalCount(), zone);
20  scope->CollectStackAndContextLocals(&stack_locals, &context_locals);
21  const int stack_local_count = stack_locals.length();
22  const int context_local_count = context_locals.length();
23  // Make sure we allocate the correct amount.
24  DCHECK(scope->StackLocalCount() == stack_local_count);
25  DCHECK(scope->ContextLocalCount() == context_local_count);
26 
27  // Determine use and location of the function variable if it is present.
28  FunctionVariableInfo function_name_info;
29  VariableMode function_variable_mode;
30  if (scope->is_function_scope() && scope->function() != NULL) {
31  Variable* var = scope->function()->proxy()->var();
32  if (!var->is_used()) {
33  function_name_info = UNUSED;
34  } else if (var->IsContextSlot()) {
35  function_name_info = CONTEXT;
36  } else {
37  DCHECK(var->IsStackLocal());
38  function_name_info = STACK;
39  }
40  function_variable_mode = var->mode();
41  } else {
42  function_name_info = NONE;
43  function_variable_mode = VAR;
44  }
45 
46  const bool has_function_name = function_name_info != NONE;
47  const int parameter_count = scope->num_parameters();
48  const int length = kVariablePartIndex
49  + parameter_count + stack_local_count + 2 * context_local_count
50  + (has_function_name ? 2 : 0);
51 
52  Factory* factory = zone->isolate()->factory();
53  Handle<ScopeInfo> scope_info = factory->NewScopeInfo(length);
54 
55  // Encode the flags.
56  int flags = ScopeTypeField::encode(scope->scope_type()) |
59  FunctionVariableField::encode(function_name_info) |
60  FunctionVariableMode::encode(function_variable_mode) |
63  scope_info->SetFlags(flags);
64  scope_info->SetParameterCount(parameter_count);
65  scope_info->SetStackLocalCount(stack_local_count);
66  scope_info->SetContextLocalCount(context_local_count);
67 
68  int index = kVariablePartIndex;
69  // Add parameters.
70  DCHECK(index == scope_info->ParameterEntriesIndex());
71  for (int i = 0; i < parameter_count; ++i) {
72  scope_info->set(index++, *scope->parameter(i)->name());
73  }
74 
75  // Add stack locals' names. We are assuming that the stack locals'
76  // slots are allocated in increasing order, so we can simply add
77  // them to the ScopeInfo object.
78  DCHECK(index == scope_info->StackLocalEntriesIndex());
79  for (int i = 0; i < stack_local_count; ++i) {
80  DCHECK(stack_locals[i]->index() == i);
81  scope_info->set(index++, *stack_locals[i]->name());
82  }
83 
84  // Due to usage analysis, context-allocated locals are not necessarily in
85  // increasing order: Some of them may be parameters which are allocated before
86  // the non-parameter locals. When the non-parameter locals are sorted
87  // according to usage, the allocated slot indices may not be in increasing
88  // order with the variable list anymore. Thus, we first need to sort them by
89  // context slot index before adding them to the ScopeInfo object.
90  context_locals.Sort(&Variable::CompareIndex);
91 
92  // Add context locals' names.
93  DCHECK(index == scope_info->ContextLocalNameEntriesIndex());
94  for (int i = 0; i < context_local_count; ++i) {
95  scope_info->set(index++, *context_locals[i]->name());
96  }
97 
98  // Add context locals' info.
99  DCHECK(index == scope_info->ContextLocalInfoEntriesIndex());
100  for (int i = 0; i < context_local_count; ++i) {
101  Variable* var = context_locals[i];
102  uint32_t value =
106  scope_info->set(index++, Smi::FromInt(value));
107  }
108 
109  // If present, add the function variable name and its index.
110  DCHECK(index == scope_info->FunctionNameEntryIndex());
111  if (has_function_name) {
112  int var_index = scope->function()->proxy()->var()->index();
113  scope_info->set(index++, *scope->function()->proxy()->name());
114  scope_info->set(index++, Smi::FromInt(var_index));
115  DCHECK(function_name_info != STACK ||
116  (var_index == scope_info->StackLocalCount() &&
117  var_index == scope_info->StackSlotCount() - 1));
118  DCHECK(function_name_info != CONTEXT ||
119  var_index == scope_info->ContextLength() - 1);
120  }
121 
122  DCHECK(index == scope_info->length());
123  DCHECK(scope->num_parameters() == scope_info->ParameterCount());
124  DCHECK(scope->num_stack_slots() == scope_info->StackSlotCount());
125  DCHECK(scope->num_heap_slots() == scope_info->ContextLength() ||
126  (scope->num_heap_slots() == kVariablePartIndex &&
127  scope_info->ContextLength() == 0));
128  return scope_info;
129 }
130 
131 
133  return reinterpret_cast<ScopeInfo*>(isolate->heap()->empty_fixed_array());
134 }
135 
136 
138  DCHECK(length() > 0);
139  return ScopeTypeField::decode(Flags());
140 }
141 
142 
144  return length() > 0 && CallsEvalField::decode(Flags());
145 }
146 
147 
149  return length() > 0 ? StrictModeField::decode(Flags()) : SLOPPY;
150 }
151 
152 
154  return StackLocalCount() + ContextLocalCount();
155 }
156 
157 
159  if (length() > 0) {
160  bool function_name_stack_slot =
162  return StackLocalCount() + (function_name_stack_slot ? 1 : 0);
163  }
164  return 0;
165 }
166 
167 
169  if (length() > 0) {
170  int context_locals = ContextLocalCount();
171  bool function_name_context_slot =
173  bool has_context = context_locals > 0 ||
174  function_name_context_slot ||
175  scope_type() == WITH_SCOPE ||
176  (scope_type() == FUNCTION_SCOPE && CallsEval()) ||
178  if (has_context) {
179  return Context::MIN_CONTEXT_SLOTS + context_locals +
180  (function_name_context_slot ? 1 : 0);
181  }
182  }
183  return 0;
184 }
185 
186 
188  if (length() > 0) {
189  return NONE != FunctionVariableField::decode(Flags());
190  } else {
191  return false;
192  }
193 }
194 
195 
197  if (length() > 0) {
198  return ContextLocalCount() > 0;
199  } else {
200  return false;
201  }
202 }
203 
204 
206  return ContextLength() > 0;
207 }
208 
209 
212  return String::cast(get(FunctionNameEntryIndex()));
213 }
214 
215 
217  DCHECK(0 <= var && var < ParameterCount());
218  int info_index = ParameterEntriesIndex() + var;
219  return String::cast(get(info_index));
220 }
221 
222 
224  DCHECK(0 <= var && var < LocalCount());
225  DCHECK(StackLocalEntriesIndex() + StackLocalCount() ==
227  int info_index = StackLocalEntriesIndex() + var;
228  return String::cast(get(info_index));
229 }
230 
231 
233  DCHECK(0 <= var && var < StackLocalCount());
234  int info_index = StackLocalEntriesIndex() + var;
235  return String::cast(get(info_index));
236 }
237 
238 
240  DCHECK(0 <= var && var < ContextLocalCount());
241  int info_index = ContextLocalNameEntriesIndex() + var;
242  return String::cast(get(info_index));
243 }
244 
245 
247  DCHECK(0 <= var && var < ContextLocalCount());
248  int info_index = ContextLocalInfoEntriesIndex() + var;
249  int value = Smi::cast(get(info_index))->value();
250  return ContextLocalMode::decode(value);
251 }
252 
253 
255  DCHECK(0 <= var && var < ContextLocalCount());
256  int info_index = ContextLocalInfoEntriesIndex() + var;
257  int value = Smi::cast(get(info_index))->value();
258  return ContextLocalInitFlag::decode(value);
259 }
260 
261 
263  DCHECK(0 <= var && var < ContextLocalCount());
264  int info_index = ContextLocalInfoEntriesIndex() + var;
265  int value = Smi::cast(get(info_index))->value();
267 }
268 
269 
271  DCHECK(0 <= var && var < LocalCount());
272  // There's currently no flag stored on the ScopeInfo to indicate that a
273  // variable is a compiler-introduced temporary. However, to avoid conflict
274  // with user declarations, the current temporaries like .generator_object and
275  // .result start with a dot, so we can use that as a flag. It's a hack!
277  return name->length() > 0 && name->Get(0) == '.';
278 }
279 
280 
282  DCHECK(name->IsInternalizedString());
283  if (length() > 0) {
284  int start = StackLocalEntriesIndex();
285  int end = StackLocalEntriesIndex() + StackLocalCount();
286  for (int i = start; i < end; ++i) {
287  if (name == get(i)) {
288  return i - start;
289  }
290  }
291  }
292  return -1;
293 }
294 
295 
298  InitializationFlag* init_flag,
299  MaybeAssignedFlag* maybe_assigned_flag) {
300  DCHECK(name->IsInternalizedString());
301  DCHECK(mode != NULL);
302  DCHECK(init_flag != NULL);
303  if (scope_info->length() > 0) {
304  ContextSlotCache* context_slot_cache =
305  scope_info->GetIsolate()->context_slot_cache();
306  int result = context_slot_cache->Lookup(*scope_info, *name, mode, init_flag,
307  maybe_assigned_flag);
308  if (result != ContextSlotCache::kNotFound) {
309  DCHECK(result < scope_info->ContextLength());
310  return result;
311  }
312 
313  int start = scope_info->ContextLocalNameEntriesIndex();
314  int end = scope_info->ContextLocalNameEntriesIndex() +
315  scope_info->ContextLocalCount();
316  for (int i = start; i < end; ++i) {
317  if (*name == scope_info->get(i)) {
318  int var = i - start;
319  *mode = scope_info->ContextLocalMode(var);
320  *init_flag = scope_info->ContextLocalInitFlag(var);
321  *maybe_assigned_flag = scope_info->ContextLocalMaybeAssignedFlag(var);
322  result = Context::MIN_CONTEXT_SLOTS + var;
323  context_slot_cache->Update(scope_info, name, *mode, *init_flag,
324  *maybe_assigned_flag, result);
325  DCHECK(result < scope_info->ContextLength());
326  return result;
327  }
328  }
329  // Cache as not found. Mode, init flag and maybe assigned flag don't matter.
330  context_slot_cache->Update(scope_info, name, INTERNAL, kNeedsInitialization,
331  kNotAssigned, -1);
332  }
333  return -1;
334 }
335 
336 
338  DCHECK(name->IsInternalizedString());
339  if (length() > 0) {
340  // We must read parameters from the end since for
341  // multiply declared parameters the value of the
342  // last declaration of that parameter is used
343  // inside a function (and thus we need to look
344  // at the last index). Was bug# 1110337.
345  int start = ParameterEntriesIndex();
346  int end = ParameterEntriesIndex() + ParameterCount();
347  for (int i = end - 1; i >= start; --i) {
348  if (name == get(i)) {
349  return i - start;
350  }
351  }
352  }
353  return -1;
354 }
355 
356 
358  DCHECK(name->IsInternalizedString());
359  DCHECK(mode != NULL);
360  if (length() > 0) {
361  if (FunctionVariableField::decode(Flags()) == CONTEXT &&
362  FunctionName() == name) {
364  return Smi::cast(get(FunctionNameEntryIndex() + 1))->value();
365  }
366  }
367  return -1;
368 }
369 
370 
372  Handle<Context> context,
373  Handle<JSObject> scope_object) {
374  Isolate* isolate = scope_info->GetIsolate();
375  int local_count = scope_info->ContextLocalCount();
376  if (local_count == 0) return true;
377  // Fill all context locals to the context extension.
378  int first_context_var = scope_info->StackLocalCount();
379  int start = scope_info->ContextLocalNameEntriesIndex();
380  for (int i = 0; i < local_count; ++i) {
381  if (scope_info->LocalIsSynthetic(first_context_var + i)) continue;
382  int context_index = Context::MIN_CONTEXT_SLOTS + i;
384  isolate,
386  scope_object,
387  Handle<String>(String::cast(scope_info->get(i + start))),
388  Handle<Object>(context->get(context_index), isolate),
389  ::NONE),
390  false);
391  }
392  return true;
393 }
394 
395 
397  DCHECK(length() > 0);
398  return kVariablePartIndex;
399 }
400 
401 
403  return ParameterEntriesIndex() + ParameterCount();
404 }
405 
406 
408  return StackLocalEntriesIndex() + StackLocalCount();
409 }
410 
411 
413  return ContextLocalNameEntriesIndex() + ContextLocalCount();
414 }
415 
416 
418  return ContextLocalInfoEntriesIndex() + ContextLocalCount();
419 }
420 
421 
423  // Uses only lower 32 bits if pointers are larger.
424  uintptr_t addr_hash =
425  static_cast<uint32_t>(reinterpret_cast<uintptr_t>(data)) >> 2;
426  return static_cast<int>((addr_hash ^ name->Hash()) % kLength);
427 }
428 
429 
431  InitializationFlag* init_flag,
432  MaybeAssignedFlag* maybe_assigned_flag) {
433  int index = Hash(data, name);
434  Key& key = keys_[index];
435  if ((key.data == data) && key.name->Equals(name)) {
436  Value result(values_[index]);
437  if (mode != NULL) *mode = result.mode();
438  if (init_flag != NULL) *init_flag = result.initialization_flag();
439  if (maybe_assigned_flag != NULL)
440  *maybe_assigned_flag = result.maybe_assigned_flag();
441  return result.index() + kNotFound;
442  }
443  return kNotFound;
444 }
445 
446 
449  MaybeAssignedFlag maybe_assigned_flag,
450  int slot_index) {
452  Handle<String> internalized_name;
453  DCHECK(slot_index > kNotFound);
455  ToHandle(&internalized_name)) {
456  int index = Hash(*data, *internalized_name);
457  Key& key = keys_[index];
458  key.data = *data;
459  key.name = *internalized_name;
460  // Please note value only takes a uint as index.
461  values_[index] = Value(mode, init_flag, maybe_assigned_flag,
462  slot_index - kNotFound).raw();
463 #ifdef DEBUG
464  ValidateEntry(data, name, mode, init_flag, maybe_assigned_flag, slot_index);
465 #endif
466  }
467 }
468 
469 
471  for (int index = 0; index < kLength; index++) keys_[index].data = NULL;
472 }
473 
474 
475 #ifdef DEBUG
476 
477 void ContextSlotCache::ValidateEntry(Handle<Object> data, Handle<String> name,
479  InitializationFlag init_flag,
480  MaybeAssignedFlag maybe_assigned_flag,
481  int slot_index) {
483  Handle<String> internalized_name;
485  ToHandle(&internalized_name)) {
486  int index = Hash(*data, *name);
487  Key& key = keys_[index];
488  DCHECK(key.data == *data);
489  DCHECK(key.name->Equals(*name));
490  Value result(values_[index]);
491  DCHECK(result.mode() == mode);
492  DCHECK(result.initialization_flag() == init_flag);
493  DCHECK(result.maybe_assigned_flag() == maybe_assigned_flag);
494  DCHECK(result.index() + kNotFound == slot_index);
495  }
496 }
497 
498 
499 static void PrintList(const char* list_name,
500  int nof_internal_slots,
501  int start,
502  int end,
503  ScopeInfo* scope_info) {
504  if (start < end) {
505  PrintF("\n // %s\n", list_name);
506  if (nof_internal_slots > 0) {
507  PrintF(" %2d - %2d [internal slots]\n", 0 , nof_internal_slots - 1);
508  }
509  for (int i = nof_internal_slots; start < end; ++i, ++start) {
510  PrintF(" %2d ", i);
511  String::cast(scope_info->get(start))->ShortPrint();
512  PrintF("\n");
513  }
514  }
515 }
516 
517 
518 void ScopeInfo::Print() {
519  PrintF("ScopeInfo ");
520  if (HasFunctionName()) {
522  } else {
523  PrintF("/* no function name */");
524  }
525  PrintF("{");
526 
527  PrintList("parameters", 0,
529  ParameterEntriesIndex() + ParameterCount(),
530  this);
531  PrintList("stack slots", 0,
533  StackLocalEntriesIndex() + StackLocalCount(),
534  this);
535  PrintList("context slots",
538  ContextLocalNameEntriesIndex() + ContextLocalCount(),
539  this);
540 
541  PrintF("}\n");
542 }
543 #endif // DEBUG
544 
545 
546 //---------------------------------------------------------------------------
547 // ModuleInfo.
548 
550  Isolate* isolate, Interface* interface, Scope* scope) {
551  Handle<ModuleInfo> info = Allocate(isolate, interface->Length());
552  info->set_host_index(interface->Index());
553  int i = 0;
554  for (Interface::Iterator it = interface->iterator();
555  !it.done(); it.Advance(), ++i) {
556  Variable* var = scope->LookupLocal(it.name());
557  info->set_name(i, *(it.name()->string()));
558  info->set_mode(i, var->mode());
559  DCHECK((var->mode() == MODULE) == (it.interface()->IsModule()));
560  if (var->mode() == MODULE) {
561  DCHECK(it.interface()->IsFrozen());
562  DCHECK(it.interface()->Index() >= 0);
563  info->set_index(i, it.interface()->Index());
564  } else {
565  DCHECK(var->index() >= 0);
566  info->set_index(i, var->index());
567  }
568  }
569  DCHECK(i == info->length());
570  return info;
571 }
572 
573 } } // namespace v8::internal
The superclass of all JavaScript values and objects.
Definition: v8.h:1440
static U encode(T value)
Definition: utils.h:217
static T decode(U value)
Definition: utils.h:228
static int Hash(Object *data, String *name)
Definition: scopeinfo.cc:422
int Lookup(Object *data, String *name, VariableMode *mode, InitializationFlag *init_flag, MaybeAssignedFlag *maybe_assigned_flag)
Definition: scopeinfo.cc:430
static const int kNotFound
Definition: scopeinfo.h:35
static const int kLength
Definition: scopeinfo.h:54
uint32_t values_[kLength]
Definition: scopeinfo.h:104
void Update(Handle< Object > data, Handle< String > name, VariableMode mode, InitializationFlag init_flag, MaybeAssignedFlag maybe_assigned_flag, int slot_index)
Definition: scopeinfo.cc:447
Object * get(int index)
Definition: objects-inl.h:2165
Iterator iterator() const
Definition: interface.h:170
Factory * factory()
Definition: isolate.h:982
void Sort(int(*cmp)(const T *x, const T *y))
Definition: list-inl.h:194
static Handle< ModuleInfo > Create(Isolate *isolate, Interface *interface, Scope *scope)
Definition: scopeinfo.cc:549
static Handle< ModuleInfo > Allocate(Isolate *isolate, int length)
Definition: scopeinfo.h:157
void ShortPrint(FILE *out=stdout)
Definition: objects.cc:905
static MUST_USE_RESULT MaybeHandle< Object > DefineObjectProperty(Handle< JSObject > object, Handle< Object > key, Handle< Object > value, PropertyAttributes attr)
Definition: runtime.cc:2277
int ParameterIndex(String *name)
Definition: scopeinfo.cc:337
InitializationFlag ContextLocalInitFlag(int var)
Definition: scopeinfo.cc:254
static int ContextSlotIndex(Handle< ScopeInfo > scope_info, Handle< String > name, VariableMode *mode, InitializationFlag *init_flag, MaybeAssignedFlag *maybe_assigned_flag)
Definition: scopeinfo.cc:296
StrictMode strict_mode()
Definition: scopeinfo.cc:148
VariableMode ContextLocalMode(int var)
Definition: scopeinfo.cc:246
bool LocalIsSynthetic(int var)
Definition: scopeinfo.cc:270
int FunctionContextSlotIndex(String *name, VariableMode *mode)
Definition: scopeinfo.cc:357
int ContextLocalNameEntriesIndex()
Definition: scopeinfo.cc:407
static Handle< ScopeInfo > Create(Scope *scope, Zone *zone)
Definition: scopeinfo.cc:16
static bool CopyContextLocalsToScopeObject(Handle< ScopeInfo > scope_info, Handle< Context > context, Handle< JSObject > scope_object)
Definition: scopeinfo.cc:371
int StackSlotIndex(String *name)
Definition: scopeinfo.cc:281
String * ContextLocalName(int var)
Definition: scopeinfo.cc:239
String * LocalName(int var)
Definition: scopeinfo.cc:223
String * ParameterName(int var)
Definition: scopeinfo.cc:216
int ContextLocalInfoEntriesIndex()
Definition: scopeinfo.cc:412
ScopeType scope_type()
Definition: scopeinfo.cc:137
String * StackLocalName(int var)
Definition: scopeinfo.cc:232
static ScopeInfo * Empty(Isolate *isolate)
Definition: scopeinfo.cc:132
MaybeAssignedFlag ContextLocalMaybeAssignedFlag(int var)
Definition: scopeinfo.cc:262
int ContextLocalCount() const
Definition: scopes.cc:1405
int num_heap_slots() const
Definition: scopes.h:352
bool asm_function() const
Definition: scopes.h:288
int num_parameters() const
Definition: scopes.h:321
VariableDeclaration * function() const
Definition: scopes.h:309
bool calls_eval() const
Definition: scopes.h:280
void CollectStackAndContextLocals(ZoneList< Variable * > *stack_locals, ZoneList< Variable * > *context_locals)
Definition: scopes.cc:584
bool is_function_scope() const
Definition: scopes.h:265
ScopeType scope_type() const
Definition: scopes.h:299
bool asm_module() const
Definition: scopes.h:287
int num_stack_slots() const
Definition: scopes.h:351
StrictMode strict_mode() const
Definition: scopes.h:302
Variable * parameter(int index) const
Definition: scopes.h:316
int StackLocalCount() const
Definition: scopes.cc:1399
Variable * LookupLocal(const AstRawString *name)
Definition: scopes.cc:375
static Smi * FromInt(int value)
Definition: objects-inl.h:1321
static MUST_USE_RESULT MaybeHandle< String > InternalizeStringIfExists(Isolate *isolate, Handle< String > string)
Definition: objects.cc:14663
bool Equals(String *other)
Definition: objects-inl.h:3336
Handle< String > name() const
Definition: variables.h:71
VariableMode mode() const
Definition: variables.h:73
MaybeAssignedFlag maybe_assigned() const
Definition: variables.h:83
InitializationFlag initialization_flag() const
Definition: variables.h:126
bool IsStackLocal() const
Definition: variables.h:95
bool IsContextSlot() const
Definition: variables.h:97
static int CompareIndex(Variable *const *v, Variable *const *w)
Definition: variables.cc:67
Isolate * isolate() const
Definition: zone.h:68
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define RETURN_ON_EXCEPTION_VALUE(isolate, call, value)
Definition: isolate.h:154
#define DCHECK(condition)
Definition: logging.h:205
InitializationFlag
Definition: globals.h:751
@ kNeedsInitialization
Definition: globals.h:752
@ kNotAssigned
Definition: globals.h:757
void PrintF(const char *format,...)
Definition: utils.cc:80
@ FUNCTION_SCOPE
Definition: globals.h:647
@ MODULE_SCOPE
Definition: globals.h:648
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20
MaybeAssignedFlag maybe_assigned_flag()
Definition: scopeinfo.h:86
InitializationFlag initialization_flag()
Definition: scopeinfo.h:82