v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lithium-codegen-mips.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_MIPS_LITHIUM_CODEGEN_MIPS_H_
29 #define V8_MIPS_LITHIUM_CODEGEN_MIPS_H_
30 
31 #include "deoptimizer.h"
33 #include "mips/lithium-mips.h"
34 #include "lithium-codegen.h"
35 #include "safepoint-table.h"
36 #include "scopes.h"
37 #include "v8utils.h"
38 
39 namespace v8 {
40 namespace internal {
41 
42 // Forward declarations.
43 class LDeferredCode;
44 class SafepointGenerator;
45 
46 class LCodeGen: public LCodeGenBase {
47  public:
49  : LCodeGenBase(chunk, assembler, info),
50  deoptimizations_(4, info->zone()),
51  deopt_jump_table_(4, info->zone()),
52  deoptimization_literals_(8, info->zone()),
53  inlined_function_count_(0),
54  scope_(info->scope()),
55  translations_(info->zone()),
56  deferred_(8, info->zone()),
57  osr_pc_offset_(-1),
58  frame_is_built_(false),
59  safepoints_(info->zone()),
60  resolver_(this),
61  expected_safepoint_kind_(Safepoint::kSimple) {
62  PopulateDeoptimizationLiteralsWithInlinedFunctions();
63  }
64 
65 
66  int LookupDestination(int block_id) const {
67  return chunk()->LookupDestination(block_id);
68  }
69 
70  bool IsNextEmittedBlock(int block_id) const {
71  return LookupDestination(block_id) == GetNextEmittedBlock();
72  }
73 
74  bool NeedsEagerFrame() const {
75  return GetStackSlotCount() > 0 ||
76  info()->is_non_deferred_calling() ||
77  !info()->IsStub() ||
78  info()->requires_frame();
79  }
80  bool NeedsDeferredFrame() const {
81  return !NeedsEagerFrame() && info()->is_deferred_calling();
82  }
83 
84  RAStatus GetRAState() const {
85  return frame_is_built_ ? kRAHasBeenSaved : kRAHasNotBeenSaved;
86  }
87 
88  // Support for converting LOperands to assembler types.
89  // LOperand must be a register.
90  Register ToRegister(LOperand* op) const;
91 
92  // LOperand is loaded into scratch, unless already a register.
94 
95  // LOperand must be a double register.
97 
98  // LOperand is loaded into dbl_scratch, unless already a double register.
100  FloatRegister flt_scratch,
101  DoubleRegister dbl_scratch);
102  int32_t ToRepresentation(LConstantOperand* op, const Representation& r) const;
103  int32_t ToInteger32(LConstantOperand* op) const;
104  Smi* ToSmi(LConstantOperand* op) const;
105  double ToDouble(LConstantOperand* op) const;
107  MemOperand ToMemOperand(LOperand* op) const;
108  // Returns a MemOperand pointing to the high word of a DoubleStackSlot.
110 
111  bool IsInteger32(LConstantOperand* op) const;
112  bool IsSmi(LConstantOperand* op) const;
113  Handle<Object> ToHandle(LConstantOperand* op) const;
114 
115  // Try to generate code for the entire chunk, but it may fail if the
116  // chunk contains constructs we cannot handle. Returns true if the
117  // code generation attempt succeeded.
118  bool GenerateCode();
119 
120  // Finish the code by setting stack height, safepoint, and bailout
121  // information on it.
123 
124  void DoDeferredNumberTagD(LNumberTagD* instr);
125 
128  LOperand* value,
129  LOperand* temp1,
130  LOperand* temp2,
131  IntegerSignedness signedness);
132 
133  void DoDeferredTaggedToI(LTaggedToI* instr);
134  void DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr);
135  void DoDeferredStackCheck(LStackCheck* instr);
136  void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr);
137  void DoDeferredStringCharFromCode(LStringCharFromCode* instr);
138  void DoDeferredAllocate(LAllocate* instr);
139  void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr,
140  Label* map_check);
141 
142  void DoDeferredInstanceMigration(LCheckMaps* instr, Register object);
143 
144  // Parallel move support.
145  void DoParallelMove(LParallelMove* move);
146  void DoGap(LGap* instr);
147 
149  Register base,
150  bool key_is_constant,
151  int constant_key,
152  int element_size,
153  int shift_size,
154  int additional_index,
155  int additional_offset);
156 
157  // Emit frame translation commands for an environment.
158  void WriteTranslation(LEnvironment* environment, Translation* translation);
159 
160  // Declare methods that deal with the individual node types.
161 #define DECLARE_DO(type) void Do##type(L##type* node);
163 #undef DECLARE_DO
164 
165  private:
166  StrictMode strict_mode() const { return info()->strict_mode(); }
167 
168  Scope* scope() const { return scope_; }
169 
170  Register scratch0() { return kLithiumScratchReg; }
171  Register scratch1() { return kLithiumScratchReg2; }
172  DoubleRegister double_scratch0() { return kLithiumScratchDouble; }
173 
174  LInstruction* GetNextInstruction();
175 
176  void EmitClassOfTest(Label* if_true,
177  Label* if_false,
178  Handle<String> class_name,
179  Register input,
180  Register temporary,
181  Register temporary2);
182 
183  int GetStackSlotCount() const { return chunk()->spill_slot_count(); }
184 
185  void Abort(BailoutReason reason);
186 
187  void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); }
188 
189  void SaveCallerDoubles();
190  void RestoreCallerDoubles();
191 
192  // Code generation passes. Returns true if code generation should
193  // continue.
194  void GenerateBodyInstructionPre(LInstruction* instr) V8_OVERRIDE;
195  bool GeneratePrologue();
196  bool GenerateDeferredCode();
197  bool GenerateDeoptJumpTable();
198  bool GenerateSafepointTable();
199 
200  // Generates the custom OSR entrypoint and sets the osr_pc_offset.
201  void GenerateOsrPrologue();
202 
203  enum SafepointMode {
204  RECORD_SIMPLE_SAFEPOINT,
205  RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS
206  };
207 
208  void CallCode(Handle<Code> code,
209  RelocInfo::Mode mode,
210  LInstruction* instr);
211 
212  void CallCodeGeneric(Handle<Code> code,
213  RelocInfo::Mode mode,
214  LInstruction* instr,
215  SafepointMode safepoint_mode);
216 
217  void CallRuntime(const Runtime::Function* function,
218  int num_arguments,
219  LInstruction* instr,
220  SaveFPRegsMode save_doubles = kDontSaveFPRegs);
221 
222  void CallRuntime(Runtime::FunctionId id,
223  int num_arguments,
224  LInstruction* instr) {
225  const Runtime::Function* function = Runtime::FunctionForId(id);
226  CallRuntime(function, num_arguments, instr);
227  }
228 
229  void LoadContextFromDeferred(LOperand* context);
230  void CallRuntimeFromDeferred(Runtime::FunctionId id,
231  int argc,
232  LInstruction* instr,
233  LOperand* context);
234 
235  enum A1State {
236  A1_UNINITIALIZED,
237  A1_CONTAINS_TARGET
238  };
239 
240  // Generate a direct call to a known function. Expects the function
241  // to be in a1.
242  void CallKnownFunction(Handle<JSFunction> function,
244  int arity,
245  LInstruction* instr,
246  A1State a1_state);
247 
248  void RecordSafepointWithLazyDeopt(LInstruction* instr,
249  SafepointMode safepoint_mode);
250 
251  void RegisterEnvironmentForDeoptimization(LEnvironment* environment,
252  Safepoint::DeoptMode mode);
253  void DeoptimizeIf(Condition condition,
254  LEnvironment* environment,
255  Deoptimizer::BailoutType bailout_type,
256  Register src1 = zero_reg,
257  const Operand& src2 = Operand(zero_reg));
258  void DeoptimizeIf(Condition condition,
259  LEnvironment* environment,
260  Register src1 = zero_reg,
261  const Operand& src2 = Operand(zero_reg));
262  void ApplyCheckIf(Condition condition,
263  LBoundsCheck* check,
264  Register src1 = zero_reg,
265  const Operand& src2 = Operand(zero_reg));
266 
267  void AddToTranslation(LEnvironment* environment,
268  Translation* translation,
269  LOperand* op,
270  bool is_tagged,
271  bool is_uint32,
272  int* object_index_pointer,
273  int* dematerialized_index_pointer);
274  void PopulateDeoptimizationData(Handle<Code> code);
275  int DefineDeoptimizationLiteral(Handle<Object> literal);
276 
277  void PopulateDeoptimizationLiteralsWithInlinedFunctions();
278 
279  Register ToRegister(int index) const;
280  DoubleRegister ToDoubleRegister(int index) const;
281 
282  MemOperand BuildSeqStringOperand(Register string,
283  LOperand* index,
284  String::Encoding encoding);
285 
286  void EmitIntegerMathAbs(LMathAbs* instr);
287 
288  // Support for recording safepoint and position information.
289  void RecordSafepoint(LPointerMap* pointers,
290  Safepoint::Kind kind,
291  int arguments,
292  Safepoint::DeoptMode mode);
293  void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode);
294  void RecordSafepoint(Safepoint::DeoptMode mode);
295  void RecordSafepointWithRegisters(LPointerMap* pointers,
296  int arguments,
297  Safepoint::DeoptMode mode);
298  void RecordSafepointWithRegistersAndDoubles(LPointerMap* pointers,
299  int arguments,
300  Safepoint::DeoptMode mode);
301 
302  void RecordAndWritePosition(int position) V8_OVERRIDE;
303 
304  static Condition TokenToCondition(Token::Value op, bool is_unsigned);
305  void EmitGoto(int block);
306 
307  // EmitBranch expects to be the last instruction of a block.
308  template<class InstrType>
309  void EmitBranch(InstrType instr,
310  Condition condition,
311  Register src1,
312  const Operand& src2);
313  template<class InstrType>
314  void EmitBranchF(InstrType instr,
315  Condition condition,
316  FPURegister src1,
317  FPURegister src2);
318  template<class InstrType>
319  void EmitFalseBranch(InstrType instr,
320  Condition condition,
321  Register src1,
322  const Operand& src2);
323  template<class InstrType>
324  void EmitFalseBranchF(InstrType instr,
325  Condition condition,
326  FPURegister src1,
327  FPURegister src2);
328  void EmitCmpI(LOperand* left, LOperand* right);
329  void EmitNumberUntagD(Register input,
330  DoubleRegister result,
331  bool allow_undefined_as_nan,
332  bool deoptimize_on_minus_zero,
333  LEnvironment* env,
335 
336  // Emits optimized code for typeof x == "y". Modifies input register.
337  // Returns the condition on which a final split to
338  // true and false label should be made, to optimize fallthrough.
339  // Returns two registers in cmp1 and cmp2 that can be used in the
340  // Branch instruction after EmitTypeofIs.
341  Condition EmitTypeofIs(Label* true_label,
342  Label* false_label,
343  Register input,
344  Handle<String> type_name,
345  Register& cmp1,
346  Operand& cmp2);
347 
348  // Emits optimized code for %_IsObject(x). Preserves input register.
349  // Returns the condition on which a final split to
350  // true and false label should be made, to optimize fallthrough.
351  Condition EmitIsObject(Register input,
352  Register temp1,
353  Register temp2,
354  Label* is_not_object,
355  Label* is_object);
356 
357  // Emits optimized code for %_IsString(x). Preserves input register.
358  // Returns the condition on which a final split to
359  // true and false label should be made, to optimize fallthrough.
360  Condition EmitIsString(Register input,
361  Register temp1,
362  Label* is_not_string,
363  SmiCheck check_needed);
364 
365  // Emits optimized code for %_IsConstructCall().
366  // Caller should branch on equal condition.
367  void EmitIsConstructCall(Register temp1, Register temp2);
368 
369  // Emits optimized code to deep-copy the contents of statically known
370  // object graphs (e.g. object literal boilerplate).
371  void EmitDeepCopy(Handle<JSObject> object,
372  Register result,
373  Register source,
374  int* offset,
376  // Emit optimized code for integer division.
377  // Inputs are signed.
378  // All registers are clobbered.
379  // If 'remainder' is no_reg, it is not computed.
380  void EmitSignedIntegerDivisionByConstant(Register result,
381  Register dividend,
382  int32_t divisor,
383  Register remainder,
384  Register scratch,
385  LEnvironment* environment);
386 
387 
388  void EnsureSpaceForLazyDeopt(int space_needed) V8_OVERRIDE;
389  void DoLoadKeyedExternalArray(LLoadKeyed* instr);
390  void DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr);
391  void DoLoadKeyedFixedArray(LLoadKeyed* instr);
392  void DoStoreKeyedExternalArray(LStoreKeyed* instr);
393  void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr);
394  void DoStoreKeyedFixedArray(LStoreKeyed* instr);
395 
396  ZoneList<LEnvironment*> deoptimizations_;
397  ZoneList<Deoptimizer::JumpTableEntry> deopt_jump_table_;
398  ZoneList<Handle<Object> > deoptimization_literals_;
399  int inlined_function_count_;
400  Scope* const scope_;
401  TranslationBuffer translations_;
402  ZoneList<LDeferredCode*> deferred_;
403  int osr_pc_offset_;
404  bool frame_is_built_;
405 
406  // Builder that keeps track of safepoints in the code. The table
407  // itself is emitted at the end of the generated code.
408  SafepointTableBuilder safepoints_;
409 
410  // Compiler from a set of parallel moves to a sequential list of moves.
411  LGapResolver resolver_;
412 
413  Safepoint::Kind expected_safepoint_kind_;
414 
415  class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED {
416  public:
417  PushSafepointRegistersScope(LCodeGen* codegen,
418  Safepoint::Kind kind)
419  : codegen_(codegen) {
420  ASSERT(codegen_->info()->is_calling());
421  ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple);
422  codegen_->expected_safepoint_kind_ = kind;
423 
424  switch (codegen_->expected_safepoint_kind_) {
425  case Safepoint::kWithRegisters: {
426  StoreRegistersStateStub stub1(kDontSaveFPRegs);
427  codegen_->masm_->push(ra);
428  codegen_->masm_->CallStub(&stub1);
429  break;
430  }
431  case Safepoint::kWithRegistersAndDoubles: {
432  StoreRegistersStateStub stub2(kSaveFPRegs);
433  codegen_->masm_->push(ra);
434  codegen_->masm_->CallStub(&stub2);
435  break;
436  }
437  default:
438  UNREACHABLE();
439  }
440  }
441 
442  ~PushSafepointRegistersScope() {
443  Safepoint::Kind kind = codegen_->expected_safepoint_kind_;
444  ASSERT((kind & Safepoint::kWithRegisters) != 0);
445  switch (kind) {
446  case Safepoint::kWithRegisters: {
447  RestoreRegistersStateStub stub1(kDontSaveFPRegs);
448  codegen_->masm_->push(ra);
449  codegen_->masm_->CallStub(&stub1);
450  break;
451  }
452  case Safepoint::kWithRegistersAndDoubles: {
453  RestoreRegistersStateStub stub2(kSaveFPRegs);
454  codegen_->masm_->push(ra);
455  codegen_->masm_->CallStub(&stub2);
456  break;
457  }
458  default:
459  UNREACHABLE();
460  }
461  codegen_->expected_safepoint_kind_ = Safepoint::kSimple;
462  }
463 
464  private:
465  LCodeGen* codegen_;
466  };
467 
468  friend class LDeferredCode;
469  friend class LEnvironment;
470  friend class SafepointGenerator;
472 };
473 
474 
475 class LDeferredCode : public ZoneObject {
476  public:
477  explicit LDeferredCode(LCodeGen* codegen)
478  : codegen_(codegen),
479  external_exit_(NULL),
480  instruction_index_(codegen->current_instruction_) {
481  codegen->AddDeferredCode(this);
482  }
483 
484  virtual ~LDeferredCode() {}
485  virtual void Generate() = 0;
486  virtual LInstruction* instr() = 0;
487 
488  void SetExit(Label* exit) { external_exit_ = exit; }
489  Label* entry() { return &entry_; }
490  Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; }
491  int instruction_index() const { return instruction_index_; }
492 
493  protected:
494  LCodeGen* codegen() const { return codegen_; }
495  MacroAssembler* masm() const { return codegen_->masm(); }
496 
497  private:
498  LCodeGen* codegen_;
499  Label entry_;
500  Label exit_;
501  Label* external_exit_;
502  int instruction_index_;
503 };
504 
505 } } // namespace v8::internal
506 
507 #endif // V8_MIPS_LITHIUM_CODEGEN_MIPS_H_
#define kLithiumScratchReg2
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
Definition: flags.cc:269
void FinishCode(Handle< Code > code)
MemOperand ToHighMemOperand(LOperand *op) const
void DoDeferredStringCharFromCode(LStringCharFromCode *instr)
void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal *instr, Label *map_check)
Smi * ToSmi(LConstantOperand *op) const
Register EmitLoadRegister(LOperand *op, Register scratch)
bool IsSmi(LConstantOperand *op) const
int int32_t
Definition: unicode.cc:47
static const Function * FunctionForId(FunctionId id)
Definition: runtime.cc:15154
void DoDeferredMathAbsTaggedHeapNumber(LMathAbs *instr)
#define ASSERT(condition)
Definition: checks.h:329
void DoDeferredStringCharCodeAt(LStringCharCodeAt *instr)
MacroAssembler * masm() const
#define kLithiumScratchReg
#define LITHIUM_CONCRETE_INSTRUCTION_LIST(V)
Definition: lithium-arm.h:43
void DoDeferredStackCheck(LStackCheck *instr)
DwVfpRegister EmitLoadDoubleRegister(LOperand *op, SwVfpRegister flt_scratch, DwVfpRegister dbl_scratch)
int LookupDestination(int block_id) const
Operand ToOperand(LOperand *op)
#define UNREACHABLE()
Definition: checks.h:52
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization 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 VFP3 instructions if available enable use of NEON instructions if 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 d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_string(expose_natives_as
DwVfpRegister DoubleRegister
#define kLithiumScratchDouble
void DoDeferredNumberTagD(LNumberTagD *instr)
void check(i::Vector< const uint8_t > string)
DwVfpRegister ToDoubleRegister(LOperand *op) const
void DoDeferredAllocate(LAllocate *instr)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition: globals.h:359
int32_t ToInteger32(LConstantOperand *op) const
bool IsInteger32(LConstantOperand *op) const
Handle< Object > ToHandle(LConstantOperand *op) const
#define BASE_EMBEDDED
Definition: allocation.h:68
void DoDeferredInstanceMigration(LCheckMaps *instr, Register object)
#define DECLARE_DO(type)
void DoParallelMove(LParallelMove *move)
double ToDouble(LConstantOperand *op) const
#define V8_OVERRIDE
Definition: v8config.h:402
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function info
Definition: flags.cc:317
void WriteTranslation(LEnvironment *environment, Translation *translation)
virtual LInstruction * instr()=0
int32_t ToRepresentation(LConstantOperand *op, const Representation &r) const
MemOperand PrepareKeyedOperand(Register key, Register base, bool key_is_constant, int constant_key, int element_size, int shift_size, int additional_index, int additional_offset)
kInstanceClassNameOffset kNeedsAccessCheckBit kRemovePrototypeBit kIsExpressionBit kAllowLazyCompilation kUsesArguments formal_parameter_count
Definition: objects-inl.h:5190
virtual void Generate()=0
Register ToRegister(LOperand *op) const
void DoDeferredTaggedToI(LTaggedToI *instr)
void DoDeferredNumberTagIU(LInstruction *instr, LOperand *value, LOperand *temp1, LOperand *temp2, IntegerSignedness signedness)
MemOperand ToMemOperand(LOperand *op) const
bool IsNextEmittedBlock(int block_id) const
RAStatus GetRAState() const
LCodeGen(LChunk *chunk, MacroAssembler *assembler, CompilationInfo *info)