v8  3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lithium-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_MIPS_H_
29 #define V8_MIPS_LITHIUM_MIPS_H_
30 
31 #include "hydrogen.h"
32 #include "lithium-allocator.h"
33 #include "lithium.h"
34 #include "safepoint-table.h"
35 #include "utils.h"
36 
37 namespace v8 {
38 namespace internal {
39 
40 // Forward declarations.
41 class LCodeGen;
42 
43 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \
44  V(ControlInstruction) \
45  V(Call) \
46  LITHIUM_CONCRETE_INSTRUCTION_LIST(V)
47 
48 
49 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
50  V(AccessArgumentsAt) \
51  V(AddI) \
52  V(AllocateObject) \
53  V(ApplyArguments) \
54  V(ArgumentsElements) \
55  V(ArgumentsLength) \
56  V(ArithmeticD) \
57  V(ArithmeticT) \
58  V(ArrayLiteral) \
59  V(BitI) \
60  V(BitNotI) \
61  V(BoundsCheck) \
62  V(Branch) \
63  V(CallConstantFunction) \
64  V(CallFunction) \
65  V(CallGlobal) \
66  V(CallKeyed) \
67  V(CallKnownGlobal) \
68  V(CallNamed) \
69  V(CallNew) \
70  V(CallRuntime) \
71  V(CallStub) \
72  V(CheckFunction) \
73  V(CheckInstanceType) \
74  V(CheckMaps) \
75  V(CheckNonSmi) \
76  V(CheckPrototypeMaps) \
77  V(CheckSmi) \
78  V(ClampDToUint8) \
79  V(ClampIToUint8) \
80  V(ClampTToUint8) \
81  V(ClassOfTestAndBranch) \
82  V(CmpConstantEqAndBranch) \
83  V(CmpIDAndBranch) \
84  V(CmpObjectEqAndBranch) \
85  V(CmpMapAndBranch) \
86  V(CmpT) \
87  V(ConstantD) \
88  V(ConstantI) \
89  V(ConstantT) \
90  V(Context) \
91  V(DeclareGlobals) \
92  V(DeleteProperty) \
93  V(Deoptimize) \
94  V(DivI) \
95  V(DoubleToI) \
96  V(ElementsKind) \
97  V(FastLiteral) \
98  V(FixedArrayBaseLength) \
99  V(FunctionLiteral) \
100  V(GetCachedArrayIndex) \
101  V(GlobalObject) \
102  V(GlobalReceiver) \
103  V(Goto) \
104  V(HasCachedArrayIndexAndBranch) \
105  V(HasInstanceTypeAndBranch) \
106  V(In) \
107  V(InstanceOf) \
108  V(InstanceOfKnownGlobal) \
109  V(InstructionGap) \
110  V(Integer32ToDouble) \
111  V(InvokeFunction) \
112  V(IsConstructCallAndBranch) \
113  V(IsNilAndBranch) \
114  V(IsObjectAndBranch) \
115  V(IsStringAndBranch) \
116  V(IsSmiAndBranch) \
117  V(IsUndetectableAndBranch) \
118  V(StringCompareAndBranch) \
119  V(JSArrayLength) \
120  V(Label) \
121  V(LazyBailout) \
122  V(LoadContextSlot) \
123  V(LoadElements) \
124  V(LoadExternalArrayPointer) \
125  V(LoadFunctionPrototype) \
126  V(LoadGlobalCell) \
127  V(LoadGlobalGeneric) \
128  V(LoadKeyedFastDoubleElement) \
129  V(LoadKeyedFastElement) \
130  V(LoadKeyedGeneric) \
131  V(LoadKeyedSpecializedArrayElement) \
132  V(LoadNamedField) \
133  V(LoadNamedFieldPolymorphic) \
134  V(LoadNamedGeneric) \
135  V(ModI) \
136  V(MulI) \
137  V(NumberTagD) \
138  V(NumberTagI) \
139  V(NumberUntagD) \
140  V(ObjectLiteral) \
141  V(OsrEntry) \
142  V(OuterContext) \
143  V(Parameter) \
144  V(Power) \
145  V(PushArgument) \
146  V(Random) \
147  V(RegExpLiteral) \
148  V(Return) \
149  V(ShiftI) \
150  V(SmiTag) \
151  V(SmiUntag) \
152  V(StackCheck) \
153  V(StoreContextSlot) \
154  V(StoreGlobalCell) \
155  V(StoreGlobalGeneric) \
156  V(StoreKeyedFastDoubleElement) \
157  V(StoreKeyedFastElement) \
158  V(StoreKeyedGeneric) \
159  V(StoreKeyedSpecializedArrayElement) \
160  V(StoreNamedField) \
161  V(StoreNamedGeneric) \
162  V(StringAdd) \
163  V(StringCharCodeAt) \
164  V(StringCharFromCode) \
165  V(StringLength) \
166  V(SubI) \
167  V(TaggedToI) \
168  V(ThisFunction) \
169  V(Throw) \
170  V(ToFastProperties) \
171  V(TransitionElementsKind) \
172  V(Typeof) \
173  V(TypeofIsAndBranch) \
174  V(UnaryMathOperation) \
175  V(UnknownOSRValue) \
176  V(ValueOf) \
177  V(ForInPrepareMap) \
178  V(ForInCacheArray) \
179  V(CheckMapValue) \
180  V(LoadFieldByIndex) \
181  V(DateField) \
182  V(WrapReceiver) \
183  V(Drop)
184 
185 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
186  virtual Opcode opcode() const { return LInstruction::k##type; } \
187  virtual void CompileToNative(LCodeGen* generator); \
188  virtual const char* Mnemonic() const { return mnemonic; } \
189  static L##type* cast(LInstruction* instr) { \
190  ASSERT(instr->Is##type()); \
191  return reinterpret_cast<L##type*>(instr); \
192  }
193 
194 
195 #define DECLARE_HYDROGEN_ACCESSOR(type) \
196  H##type* hydrogen() const { \
197  return H##type::cast(hydrogen_value()); \
198  }
199 
200 
201 class LInstruction: public ZoneObject {
202  public:
204  : environment_(NULL),
205  hydrogen_value_(NULL),
206  is_call_(false) { }
207  virtual ~LInstruction() { }
208 
209  virtual void CompileToNative(LCodeGen* generator) = 0;
210  virtual const char* Mnemonic() const = 0;
211  virtual void PrintTo(StringStream* stream);
212  virtual void PrintDataTo(StringStream* stream);
213  virtual void PrintOutputOperandTo(StringStream* stream);
214 
215  enum Opcode {
216  // Declare a unique enum value for each instruction.
217 #define DECLARE_OPCODE(type) k##type,
220 #undef DECLARE_OPCODE
221  };
222 
223  virtual Opcode opcode() const = 0;
224 
225  // Declare non-virtual type testers for all leaf IR classes.
226 #define DECLARE_PREDICATE(type) \
227  bool Is##type() const { return opcode() == k##type; }
229 #undef DECLARE_PREDICATE
230 
231  // Declare virtual predicates for instructions that don't have
232  // an opcode.
233  virtual bool IsGap() const { return false; }
234 
235  virtual bool IsControl() const { return false; }
236 
237  void set_environment(LEnvironment* env) { environment_ = env; }
238  LEnvironment* environment() const { return environment_; }
239  bool HasEnvironment() const { return environment_ != NULL; }
240 
241  void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); }
242  LPointerMap* pointer_map() const { return pointer_map_.get(); }
243  bool HasPointerMap() const { return pointer_map_.is_set(); }
244 
245  void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; }
246  HValue* hydrogen_value() const { return hydrogen_value_; }
247 
249 
250  void MarkAsCall() { is_call_ = true; }
251 
252  // Interface to the register allocator and iterators.
253  bool IsMarkedAsCall() const { return is_call_; }
254 
255  virtual bool HasResult() const = 0;
256  virtual LOperand* result() = 0;
257 
258  virtual int InputCount() = 0;
259  virtual LOperand* InputAt(int i) = 0;
260  virtual int TempCount() = 0;
261  virtual LOperand* TempAt(int i) = 0;
262 
263  LOperand* FirstInput() { return InputAt(0); }
264  LOperand* Output() { return HasResult() ? result() : NULL; }
265 
266 #ifdef DEBUG
267  void VerifyCall();
268 #endif
269 
270  private:
271  LEnvironment* environment_;
272  SetOncePointer<LPointerMap> pointer_map_;
273  HValue* hydrogen_value_;
274  bool is_call_;
275  bool is_save_doubles_;
276 };
277 
278 
279 // R = number of result operands (0 or 1).
280 // I = number of input operands.
281 // T = number of temporary operands.
282 template<int R, int I, int T>
283 class LTemplateInstruction: public LInstruction {
284  public:
285  // Allow 0 or 1 output operands.
286  STATIC_ASSERT(R == 0 || R == 1);
287  virtual bool HasResult() const { return R != 0; }
288  void set_result(LOperand* operand) { results_[0] = operand; }
289  LOperand* result() { return results_[0]; }
290 
291  int InputCount() { return I; }
292  LOperand* InputAt(int i) { return inputs_[i]; }
293 
294  int TempCount() { return T; }
295  LOperand* TempAt(int i) { return temps_[i]; }
296 
297  protected:
301 };
302 
303 
304 class LGap: public LTemplateInstruction<0, 0, 0> {
305  public:
306  explicit LGap(HBasicBlock* block)
307  : block_(block) {
308  parallel_moves_[BEFORE] = NULL;
309  parallel_moves_[START] = NULL;
310  parallel_moves_[END] = NULL;
311  parallel_moves_[AFTER] = NULL;
312  }
313 
314  // Can't use the DECLARE-macro here because of sub-classes.
315  virtual bool IsGap() const { return true; }
316  virtual void PrintDataTo(StringStream* stream);
317  static LGap* cast(LInstruction* instr) {
318  ASSERT(instr->IsGap());
319  return reinterpret_cast<LGap*>(instr);
320  }
321 
322  bool IsRedundant() const;
323 
324  HBasicBlock* block() const { return block_; }
325 
327  BEFORE,
328  START,
329  END,
330  AFTER,
332  LAST_INNER_POSITION = AFTER
333  };
334 
336  if (parallel_moves_[pos] == NULL) {
337  parallel_moves_[pos] = new(zone) LParallelMove(zone);
338  }
339  return parallel_moves_[pos];
340  }
341 
343  return parallel_moves_[pos];
344  }
345 
346  private:
347  LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1];
348  HBasicBlock* block_;
349 };
350 
351 
352 class LInstructionGap: public LGap {
353  public:
354  explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
355 
356  DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap")
357 };
358 
359 
360 class LGoto: public LTemplateInstruction<0, 0, 0> {
361  public:
362  explicit LGoto(int block_id) : block_id_(block_id) { }
363 
364  DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
365  virtual void PrintDataTo(StringStream* stream);
366  virtual bool IsControl() const { return true; }
367 
368  int block_id() const { return block_id_; }
369 
370  private:
371  int block_id_;
372 };
373 
374 
375 class LLazyBailout: public LTemplateInstruction<0, 0, 0> {
376  public:
377  LLazyBailout() : gap_instructions_size_(0) { }
378 
379  DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout")
380 
382  gap_instructions_size_ = gap_instructions_size;
383  }
384  int gap_instructions_size() { return gap_instructions_size_; }
385 
386  private:
387  int gap_instructions_size_;
388 };
389 
390 
391 class LDeoptimize: public LTemplateInstruction<0, 0, 0> {
392  public:
393  DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
394 };
395 
396 
397 class LLabel: public LGap {
398  public:
400  : LGap(block), replacement_(NULL) { }
401 
402  DECLARE_CONCRETE_INSTRUCTION(Label, "label")
403 
404  virtual void PrintDataTo(StringStream* stream);
405 
406  int block_id() const { return block()->block_id(); }
407  bool is_loop_header() const { return block()->IsLoopHeader(); }
408  Label* label() { return &label_; }
409  LLabel* replacement() const { return replacement_; }
410  void set_replacement(LLabel* label) { replacement_ = label; }
411  bool HasReplacement() const { return replacement_ != NULL; }
412 
413  private:
414  Label label_;
415  LLabel* replacement_;
416 };
417 
418 
419 class LParameter: public LTemplateInstruction<1, 0, 0> {
420  public:
421  DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
422 };
423 
424 
425 class LCallStub: public LTemplateInstruction<1, 0, 0> {
426  public:
427  DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub")
428  DECLARE_HYDROGEN_ACCESSOR(CallStub)
429 
431  return hydrogen()->transcendental_type();
432  }
433 };
434 
435 
436 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> {
437  public:
438  DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
439 };
440 
441 
442 template<int I, int T>
443 class LControlInstruction: public LTemplateInstruction<0, I, T> {
444  public:
445  virtual bool IsControl() const { return true; }
446 
447  int SuccessorCount() { return hydrogen()->SuccessorCount(); }
448  HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
449  int true_block_id() { return hydrogen()->SuccessorAt(0)->block_id(); }
450  int false_block_id() { return hydrogen()->SuccessorAt(1)->block_id(); }
451 
452  private:
453  HControlInstruction* hydrogen() {
455  }
456 };
457 
458 
459 class LWrapReceiver: public LTemplateInstruction<1, 2, 0> {
460  public:
462  inputs_[0] = receiver;
463  inputs_[1] = function;
464  }
465 
466  DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver")
467 
468  LOperand* receiver() { return inputs_[0]; }
469  LOperand* function() { return inputs_[1]; }
470 };
471 
472 
473 class LApplyArguments: public LTemplateInstruction<1, 4, 0> {
474  public:
477  LOperand* length,
478  LOperand* elements) {
479  inputs_[0] = function;
480  inputs_[1] = receiver;
481  inputs_[2] = length;
482  inputs_[3] = elements;
483  }
484 
485  DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply-arguments")
486 
487  LOperand* function() { return inputs_[0]; }
488  LOperand* receiver() { return inputs_[1]; }
489  LOperand* length() { return inputs_[2]; }
490  LOperand* elements() { return inputs_[3]; }
491 };
492 
493 
494 class LAccessArgumentsAt: public LTemplateInstruction<1, 3, 0> {
495  public:
497  inputs_[0] = arguments;
498  inputs_[1] = length;
499  inputs_[2] = index;
500  }
501 
502  DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at")
503 
504  LOperand* arguments() { return inputs_[0]; }
505  LOperand* length() { return inputs_[1]; }
506  LOperand* index() { return inputs_[2]; }
507 
508  virtual void PrintDataTo(StringStream* stream);
509 };
510 
511 
512 class LArgumentsLength: public LTemplateInstruction<1, 1, 0> {
513  public:
514  explicit LArgumentsLength(LOperand* elements) {
515  inputs_[0] = elements;
516  }
517 
518  DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length")
519 };
520 
521 
522 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> {
523  public:
524  DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements")
525  DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements)
526 };
527 
528 
529 class LModI: public LTemplateInstruction<1, 2, 3> {
530  public:
531  // Used when the right hand is a constant power of 2.
533  LOperand* right) {
534  inputs_[0] = left;
535  inputs_[1] = right;
536  temps_[0] = NULL;
537  temps_[1] = NULL;
538  temps_[2] = NULL;
539  }
540 
541  // Used for the standard case.
543  LOperand* right,
544  LOperand* temp1,
545  LOperand* temp2,
546  LOperand* temp3) {
547  inputs_[0] = left;
548  inputs_[1] = right;
549  temps_[0] = temp1;
550  temps_[1] = temp2;
551  temps_[2] = temp3;
552  }
553 
554  DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i")
556 };
557 
558 
559 class LDivI: public LTemplateInstruction<1, 2, 0> {
560  public:
561  LDivI(LOperand* left, LOperand* right) {
562  inputs_[0] = left;
563  inputs_[1] = right;
564  }
565 
566  DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i")
568 };
569 
570 
571 class LMulI: public LTemplateInstruction<1, 2, 1> {
572  public:
573  LMulI(LOperand* left, LOperand* right, LOperand* temp) {
574  inputs_[0] = left;
575  inputs_[1] = right;
576  temps_[0] = temp;
577  }
578 
579  DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i")
581 };
582 
583 
584 class LCmpIDAndBranch: public LControlInstruction<2, 0> {
585  public:
587  inputs_[0] = left;
588  inputs_[1] = right;
589  }
590 
591  DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch")
592  DECLARE_HYDROGEN_ACCESSOR(CompareIDAndBranch)
593 
594  Token::Value op() const { return hydrogen()->token(); }
595  bool is_double() const {
596  return hydrogen()->GetInputRepresentation().IsDouble();
597  }
598 
599  virtual void PrintDataTo(StringStream* stream);
600 };
601 
602 
603 class LUnaryMathOperation: public LTemplateInstruction<1, 1, 1> {
604  public:
606  inputs_[0] = value;
607  temps_[0] = temp;
608  }
609 
610  DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation")
611  DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
612 
613  virtual void PrintDataTo(StringStream* stream);
614  BuiltinFunctionId op() const { return hydrogen()->op(); }
615 };
616 
617 
618 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> {
619  public:
621  inputs_[0] = left;
622  inputs_[1] = right;
623  }
624 
625  DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch,
626  "cmp-object-eq-and-branch")
627  DECLARE_HYDROGEN_ACCESSOR(CompareObjectEqAndBranch)
628 };
629 
630 
631 class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> {
632  public:
634  inputs_[0] = left;
635  }
636 
637  DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch,
638  "cmp-constant-eq-and-branch")
639  DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch)
640 };
641 
642 
643 class LIsNilAndBranch: public LControlInstruction<1, 0> {
644  public:
645  explicit LIsNilAndBranch(LOperand* value) {
646  inputs_[0] = value;
647  }
648 
649  DECLARE_CONCRETE_INSTRUCTION(IsNilAndBranch, "is-nil-and-branch")
650  DECLARE_HYDROGEN_ACCESSOR(IsNilAndBranch)
651 
652  EqualityKind kind() const { return hydrogen()->kind(); }
653  NilValue nil() const { return hydrogen()->nil(); }
654 
655  virtual void PrintDataTo(StringStream* stream);
656 };
657 
658 
659 class LIsObjectAndBranch: public LControlInstruction<1, 1> {
660  public:
662  inputs_[0] = value;
663  temps_[0] = temp;
664  }
665 
666  DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
667  DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
668 
669  virtual void PrintDataTo(StringStream* stream);
670 };
671 
672 
673 class LIsStringAndBranch: public LControlInstruction<1, 1> {
674  public:
676  inputs_[0] = value;
677  temps_[0] = temp;
678  }
679 
680  DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
681  DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
682 
683  virtual void PrintDataTo(StringStream* stream);
684 };
685 
686 
687 class LIsSmiAndBranch: public LControlInstruction<1, 0> {
688  public:
689  explicit LIsSmiAndBranch(LOperand* value) {
690  inputs_[0] = value;
691  }
692 
693  DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
694  DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
695 
696  virtual void PrintDataTo(StringStream* stream);
697 };
698 
699 
700 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> {
701  public:
702  explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) {
703  inputs_[0] = value;
704  temps_[0] = temp;
705  }
706 
707  DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch,
708  "is-undetectable-and-branch")
709  DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
710 
711  virtual void PrintDataTo(StringStream* stream);
712 };
713 
714 
715 class LStringCompareAndBranch: public LControlInstruction<2, 0> {
716  public:
718  inputs_[0] = left;
719  inputs_[1] = right;
720  }
721 
722  DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch,
723  "string-compare-and-branch")
724  DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch)
725 
726  Token::Value op() const { return hydrogen()->token(); }
727 
728  virtual void PrintDataTo(StringStream* stream);
729 };
730 
731 
732 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> {
733  public:
735  inputs_[0] = value;
736  }
737 
738  DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch,
739  "has-instance-type-and-branch")
740  DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
741 
742  virtual void PrintDataTo(StringStream* stream);
743 };
744 
745 
746 class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> {
747  public:
748  explicit LGetCachedArrayIndex(LOperand* value) {
749  inputs_[0] = value;
750  }
751 
752  DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index")
753  DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex)
754 };
755 
756 
757 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> {
758  public:
760  inputs_[0] = value;
761  }
762 
763  DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch,
764  "has-cached-array-index-and-branch")
765  DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
766 
767  virtual void PrintDataTo(StringStream* stream);
768 };
769 
770 
771 class LClassOfTestAndBranch: public LControlInstruction<1, 1> {
772  public:
774  inputs_[0] = value;
775  temps_[0] = temp;
776  }
777 
778  DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch,
779  "class-of-test-and-branch")
780  DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
781 
782  virtual void PrintDataTo(StringStream* stream);
783 };
784 
785 
786 class LCmpT: public LTemplateInstruction<1, 2, 0> {
787  public:
788  LCmpT(LOperand* left, LOperand* right) {
789  inputs_[0] = left;
790  inputs_[1] = right;
791  }
792 
793  DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t")
794  DECLARE_HYDROGEN_ACCESSOR(CompareGeneric)
795 
796  Token::Value op() const { return hydrogen()->token(); }
797 };
798 
799 
800 class LInstanceOf: public LTemplateInstruction<1, 2, 0> {
801  public:
802  LInstanceOf(LOperand* left, LOperand* right) {
803  inputs_[0] = left;
804  inputs_[1] = right;
805  }
806 
807  DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of")
808 };
809 
810 
811 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> {
812  public:
814  inputs_[0] = value;
815  temps_[0] = temp;
816  }
817 
818  DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
819  "instance-of-known-global")
820  DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
821 
822  Handle<JSFunction> function() const { return hydrogen()->function(); }
824  return lazy_deopt_env_;
825  }
827  lazy_deopt_env_ = env;
828  }
829 
830  private:
831  LEnvironment* lazy_deopt_env_;
832 };
833 
834 
835 class LBoundsCheck: public LTemplateInstruction<0, 2, 0> {
836  public:
837  LBoundsCheck(LOperand* index, LOperand* length) {
838  inputs_[0] = index;
839  inputs_[1] = length;
840  }
841 
842  LOperand* index() { return inputs_[0]; }
843  LOperand* length() { return inputs_[1]; }
844 
845  DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check")
846 };
847 
848 
849 class LBitI: public LTemplateInstruction<1, 2, 0> {
850  public:
851  LBitI(LOperand* left, LOperand* right) {
852  inputs_[0] = left;
853  inputs_[1] = right;
854  }
855 
856  Token::Value op() const { return hydrogen()->op(); }
857 
858  DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i")
860 };
861 
862 
863 class LShiftI: public LTemplateInstruction<1, 2, 0> {
864  public:
865  LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt)
866  : op_(op), can_deopt_(can_deopt) {
867  inputs_[0] = left;
868  inputs_[1] = right;
869  }
870 
871  Token::Value op() const { return op_; }
872 
873  bool can_deopt() const { return can_deopt_; }
874 
875  DECLARE_CONCRETE_INSTRUCTION(ShiftI, "shift-i")
876 
877  private:
878  Token::Value op_;
879  bool can_deopt_;
880 };
881 
882 
883 class LSubI: public LTemplateInstruction<1, 2, 0> {
884  public:
885  LSubI(LOperand* left, LOperand* right) {
886  inputs_[0] = left;
887  inputs_[1] = right;
888  }
889 
890  DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i")
892 };
893 
894 
895 class LConstantI: public LTemplateInstruction<1, 0, 0> {
896  public:
897  DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i")
898  DECLARE_HYDROGEN_ACCESSOR(Constant)
899 
900  int32_t value() const { return hydrogen()->Integer32Value(); }
901 };
902 
903 
904 class LConstantD: public LTemplateInstruction<1, 0, 0> {
905  public:
906  DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d")
907  DECLARE_HYDROGEN_ACCESSOR(Constant)
908 
909  double value() const { return hydrogen()->DoubleValue(); }
910 };
911 
912 
913 class LConstantT: public LTemplateInstruction<1, 0, 0> {
914  public:
915  DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t")
916  DECLARE_HYDROGEN_ACCESSOR(Constant)
917 
918  Handle<Object> value() const { return hydrogen()->handle(); }
919 };
920 
921 
922 class LBranch: public LControlInstruction<1, 0> {
923  public:
924  explicit LBranch(LOperand* value) {
925  inputs_[0] = value;
926  }
927 
928  DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
930 
931  virtual void PrintDataTo(StringStream* stream);
932 };
933 
934 
935 class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 1> {
936  public:
938  inputs_[0] = value;
939  temps_[0] = temp;
940  }
941 
942  DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch")
943  DECLARE_HYDROGEN_ACCESSOR(CompareMap)
944 
945  virtual bool IsControl() const { return true; }
946 
947  Handle<Map> map() const { return hydrogen()->map(); }
948  int true_block_id() const {
949  return hydrogen()->FirstSuccessor()->block_id();
950  }
951  int false_block_id() const {
952  return hydrogen()->SecondSuccessor()->block_id();
953  }
954 };
955 
956 
957 class LJSArrayLength: public LTemplateInstruction<1, 1, 0> {
958  public:
959  explicit LJSArrayLength(LOperand* value) {
960  inputs_[0] = value;
961  }
962 
963  DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js-array-length")
964  DECLARE_HYDROGEN_ACCESSOR(JSArrayLength)
965 };
966 
967 
968 class LFixedArrayBaseLength: public LTemplateInstruction<1, 1, 0> {
969  public:
970  explicit LFixedArrayBaseLength(LOperand* value) {
971  inputs_[0] = value;
972  }
973 
974  DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength,
975  "fixed-array-base-length")
976  DECLARE_HYDROGEN_ACCESSOR(FixedArrayBaseLength)
977 };
978 
979 
980 class LElementsKind: public LTemplateInstruction<1, 1, 0> {
981  public:
982  explicit LElementsKind(LOperand* value) {
983  inputs_[0] = value;
984  }
985 
988 };
989 
990 
991 class LValueOf: public LTemplateInstruction<1, 1, 1> {
992  public:
993  LValueOf(LOperand* value, LOperand* temp) {
994  inputs_[0] = value;
995  temps_[0] = temp;
996  }
997 
998  DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of")
1000 };
1001 
1002 
1003 class LDateField: public LTemplateInstruction<1, 1, 1> {
1004  public:
1005  LDateField(LOperand* date, LOperand* temp, Smi* index) : index_(index) {
1006  inputs_[0] = date;
1007  temps_[0] = temp;
1008  }
1009 
1010  DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field")
1011  DECLARE_HYDROGEN_ACCESSOR(ValueOf)
1012  Smi* index() const { return index_; }
1013 
1014  private:
1015  Smi* index_;
1016 };
1017 
1018 
1019 class LThrow: public LTemplateInstruction<0, 1, 0> {
1020  public:
1021  explicit LThrow(LOperand* value) {
1022  inputs_[0] = value;
1023  }
1024 
1026 };
1027 
1028 
1029 class LBitNotI: public LTemplateInstruction<1, 1, 0> {
1030  public:
1031  explicit LBitNotI(LOperand* value) {
1032  inputs_[0] = value;
1033  }
1034 
1035  DECLARE_CONCRETE_INSTRUCTION(BitNotI, "bit-not-i")
1036 };
1037 
1038 
1039 class LAddI: public LTemplateInstruction<1, 2, 0> {
1040  public:
1041  LAddI(LOperand* left, LOperand* right) {
1042  inputs_[0] = left;
1043  inputs_[1] = right;
1044  }
1045 
1046  DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i")
1048 };
1049 
1050 
1051 class LPower: public LTemplateInstruction<1, 2, 0> {
1052  public:
1053  LPower(LOperand* left, LOperand* right) {
1054  inputs_[0] = left;
1055  inputs_[1] = right;
1056  }
1057 
1058  DECLARE_CONCRETE_INSTRUCTION(Power, "power")
1060 };
1061 
1062 
1063 class LRandom: public LTemplateInstruction<1, 1, 0> {
1064  public:
1065  explicit LRandom(LOperand* global_object) {
1066  inputs_[0] = global_object;
1067  }
1068 
1069  DECLARE_CONCRETE_INSTRUCTION(Random, "random")
1071 };
1072 
1073 
1074 class LArithmeticD: public LTemplateInstruction<1, 2, 0> {
1075  public:
1077  : op_(op) {
1078  inputs_[0] = left;
1079  inputs_[1] = right;
1080  }
1081 
1082  Token::Value op() const { return op_; }
1083 
1084  virtual Opcode opcode() const { return LInstruction::kArithmeticD; }
1085  virtual void CompileToNative(LCodeGen* generator);
1086  virtual const char* Mnemonic() const;
1087 
1088  private:
1089  Token::Value op_;
1090 };
1091 
1092 
1093 class LArithmeticT: public LTemplateInstruction<1, 2, 0> {
1094  public:
1096  : op_(op) {
1097  inputs_[0] = left;
1098  inputs_[1] = right;
1099  }
1100 
1101  virtual Opcode opcode() const { return LInstruction::kArithmeticT; }
1102  virtual void CompileToNative(LCodeGen* generator);
1103  virtual const char* Mnemonic() const;
1104 
1105  Token::Value op() const { return op_; }
1106 
1107  private:
1108  Token::Value op_;
1109 };
1110 
1111 
1112 class LReturn: public LTemplateInstruction<0, 1, 0> {
1113  public:
1114  explicit LReturn(LOperand* value) {
1115  inputs_[0] = value;
1116  }
1117 
1118  DECLARE_CONCRETE_INSTRUCTION(Return, "return")
1119 };
1120 
1121 
1122 class LLoadNamedField: public LTemplateInstruction<1, 1, 0> {
1123  public:
1124  explicit LLoadNamedField(LOperand* object) {
1125  inputs_[0] = object;
1126  }
1127 
1128  DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field")
1129  DECLARE_HYDROGEN_ACCESSOR(LoadNamedField)
1130 };
1131 
1132 
1133 class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 1, 0> {
1134  public:
1136  inputs_[0] = object;
1137  }
1138 
1139  DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field-polymorphic")
1140  DECLARE_HYDROGEN_ACCESSOR(LoadNamedFieldPolymorphic)
1141 
1142  LOperand* object() { return inputs_[0]; }
1143 };
1144 
1145 
1146 class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> {
1147  public:
1148  explicit LLoadNamedGeneric(LOperand* object) {
1149  inputs_[0] = object;
1150  }
1151 
1152  DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic")
1153  DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric)
1154 
1155  LOperand* object() { return inputs_[0]; }
1156  Handle<Object> name() const { return hydrogen()->name(); }
1157 };
1158 
1159 
1160 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 0> {
1161  public:
1162  explicit LLoadFunctionPrototype(LOperand* function) {
1163  inputs_[0] = function;
1164  }
1165 
1166  DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype")
1167  DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype)
1168 
1169  LOperand* function() { return inputs_[0]; }
1170 };
1171 
1172 
1173 class LLoadElements: public LTemplateInstruction<1, 1, 0> {
1174  public:
1175  explicit LLoadElements(LOperand* object) {
1176  inputs_[0] = object;
1177  }
1178 
1179  DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements")
1180 };
1181 
1182 
1183 class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> {
1184  public:
1186  inputs_[0] = object;
1187  }
1188 
1189  DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer,
1190  "load-external-array-pointer")
1191 };
1192 
1193 
1194 class LLoadKeyedFastElement: public LTemplateInstruction<1, 2, 0> {
1195  public:
1197  inputs_[0] = elements;
1198  inputs_[1] = key;
1199  }
1200 
1201  DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element")
1202  DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement)
1203 
1204  LOperand* elements() { return inputs_[0]; }
1205  LOperand* key() { return inputs_[1]; }
1206  uint32_t additional_index() const { return hydrogen()->index_offset(); }
1207 };
1208 
1209 
1210 class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> {
1211  public:
1213  inputs_[0] = elements;
1214  inputs_[1] = key;
1215  }
1216 
1217  DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement,
1218  "load-keyed-fast-double-element")
1219  DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastDoubleElement)
1220 
1221  LOperand* elements() { return inputs_[0]; }
1222  LOperand* key() { return inputs_[1]; }
1223  uint32_t additional_index() const { return hydrogen()->index_offset(); }
1224 };
1225 
1226 
1227 class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> {
1228  public:
1230  LOperand* key) {
1231  inputs_[0] = external_pointer;
1232  inputs_[1] = key;
1233  }
1234 
1235  DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement,
1236  "load-keyed-specialized-array-element")
1237  DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement)
1238 
1239  LOperand* external_pointer() { return inputs_[0]; }
1240  LOperand* key() { return inputs_[1]; }
1241  ElementsKind elements_kind() const {
1242  return hydrogen()->elements_kind();
1243  }
1244  uint32_t additional_index() const { return hydrogen()->index_offset(); }
1245 };
1246 
1247 
1248 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> {
1249  public:
1251  inputs_[0] = obj;
1252  inputs_[1] = key;
1253  }
1254 
1255  DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic")
1256 
1257  LOperand* object() { return inputs_[0]; }
1258  LOperand* key() { return inputs_[1]; }
1259 };
1260 
1261 
1262 class LLoadGlobalCell: public LTemplateInstruction<1, 0, 0> {
1263  public:
1264  DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell")
1265  DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell)
1266 };
1267 
1268 
1269 class LLoadGlobalGeneric: public LTemplateInstruction<1, 1, 0> {
1270  public:
1271  explicit LLoadGlobalGeneric(LOperand* global_object) {
1272  inputs_[0] = global_object;
1273  }
1274 
1275  DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic")
1276  DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric)
1277 
1278  LOperand* global_object() { return inputs_[0]; }
1279  Handle<Object> name() const { return hydrogen()->name(); }
1280  bool for_typeof() const { return hydrogen()->for_typeof(); }
1281 };
1282 
1283 
1284 class LStoreGlobalCell: public LTemplateInstruction<0, 1, 1> {
1285  public:
1287  inputs_[0] = value;
1288  temps_[0] = temp;
1289  }
1290 
1291  DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell")
1292  DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell)
1293 
1294  LOperand* value() { return inputs_[0]; }
1295 };
1296 
1297 
1298 class LStoreGlobalGeneric: public LTemplateInstruction<0, 2, 0> {
1299  public:
1300  explicit LStoreGlobalGeneric(LOperand* global_object,
1301  LOperand* value) {
1302  inputs_[0] = global_object;
1303  inputs_[1] = value;
1304  }
1305 
1306  DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic")
1307  DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric)
1308 
1309  LOperand* global_object() { return InputAt(0); }
1310  Handle<Object> name() const { return hydrogen()->name(); }
1311  LOperand* value() { return InputAt(1); }
1312  StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1313 };
1314 
1315 
1316 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> {
1317  public:
1318  explicit LLoadContextSlot(LOperand* context) {
1319  inputs_[0] = context;
1320  }
1321 
1322  DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot")
1323  DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot)
1324 
1325  LOperand* context() { return InputAt(0); }
1326  int slot_index() { return hydrogen()->slot_index(); }
1327 
1328  virtual void PrintDataTo(StringStream* stream);
1329 };
1330 
1331 
1332 class LStoreContextSlot: public LTemplateInstruction<0, 2, 0> {
1333  public:
1335  inputs_[0] = context;
1336  inputs_[1] = value;
1337  }
1338 
1339  DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot")
1340  DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot)
1341 
1342  LOperand* context() { return InputAt(0); }
1343  LOperand* value() { return InputAt(1); }
1344  int slot_index() { return hydrogen()->slot_index(); }
1345 
1346  virtual void PrintDataTo(StringStream* stream);
1347 };
1348 
1349 
1350 class LPushArgument: public LTemplateInstruction<0, 1, 0> {
1351  public:
1352  explicit LPushArgument(LOperand* value) {
1353  inputs_[0] = value;
1354  }
1355 
1356  DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument")
1357 };
1358 
1359 
1360 class LDrop: public LTemplateInstruction<0, 0, 0> {
1361  public:
1362  explicit LDrop(int count) : count_(count) { }
1363 
1364  int count() const { return count_; }
1365 
1366  DECLARE_CONCRETE_INSTRUCTION(Drop, "drop")
1367 
1368  private:
1369  int count_;
1370 };
1371 
1372 
1373 class LThisFunction: public LTemplateInstruction<1, 0, 0> {
1374  public:
1375  DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
1377 };
1378 
1379 
1380 class LContext: public LTemplateInstruction<1, 0, 0> {
1381  public:
1383 };
1384 
1385 
1386 class LOuterContext: public LTemplateInstruction<1, 1, 0> {
1387  public:
1388  explicit LOuterContext(LOperand* context) {
1389  inputs_[0] = context;
1390  }
1391 
1392  DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
1393 
1394  LOperand* context() { return InputAt(0); }
1395 };
1396 
1397 
1398 class LDeclareGlobals: public LTemplateInstruction<0, 0, 0> {
1399  public:
1400  DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals")
1401  DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals)
1402 };
1403 
1404 
1405 class LGlobalObject: public LTemplateInstruction<1, 1, 0> {
1406  public:
1407  explicit LGlobalObject(LOperand* context) {
1408  inputs_[0] = context;
1409  }
1410 
1411  DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object")
1412 
1413  LOperand* context() { return InputAt(0); }
1414 };
1415 
1416 
1417 class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> {
1418  public:
1419  explicit LGlobalReceiver(LOperand* global_object) {
1420  inputs_[0] = global_object;
1421  }
1422 
1423  DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver")
1424 
1425  LOperand* global() { return InputAt(0); }
1426 };
1427 
1428 
1429 class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> {
1430  public:
1431  DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function")
1432  DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction)
1433 
1434  virtual void PrintDataTo(StringStream* stream);
1435 
1436  Handle<JSFunction> function() { return hydrogen()->function(); }
1437  int arity() const { return hydrogen()->argument_count() - 1; }
1438 };
1439 
1440 
1441 class LInvokeFunction: public LTemplateInstruction<1, 1, 0> {
1442  public:
1443  explicit LInvokeFunction(LOperand* function) {
1444  inputs_[0] = function;
1445  }
1446 
1447  DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
1448  DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
1449 
1450  LOperand* function() { return inputs_[0]; }
1451 
1452  virtual void PrintDataTo(StringStream* stream);
1453 
1454  int arity() const { return hydrogen()->argument_count() - 1; }
1455  Handle<JSFunction> known_function() { return hydrogen()->known_function(); }
1456 };
1457 
1458 
1459 class LCallKeyed: public LTemplateInstruction<1, 1, 0> {
1460  public:
1461  explicit LCallKeyed(LOperand* key) {
1462  inputs_[0] = key;
1463  }
1464 
1465  DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")
1466  DECLARE_HYDROGEN_ACCESSOR(CallKeyed)
1467 
1468  virtual void PrintDataTo(StringStream* stream);
1469 
1470  int arity() const { return hydrogen()->argument_count() - 1; }
1471 };
1472 
1473 
1474 
1475 class LCallNamed: public LTemplateInstruction<1, 0, 0> {
1476  public:
1477  DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named")
1478  DECLARE_HYDROGEN_ACCESSOR(CallNamed)
1479 
1480  virtual void PrintDataTo(StringStream* stream);
1481 
1482  Handle<String> name() const { return hydrogen()->name(); }
1483  int arity() const { return hydrogen()->argument_count() - 1; }
1484 };
1485 
1486 
1487 class LCallFunction: public LTemplateInstruction<1, 1, 0> {
1488  public:
1489  explicit LCallFunction(LOperand* function) {
1490  inputs_[0] = function;
1491  }
1492 
1493  DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
1494  DECLARE_HYDROGEN_ACCESSOR(CallFunction)
1495 
1496  LOperand* function() { return inputs_[0]; }
1497  int arity() const { return hydrogen()->argument_count() - 1; }
1498 };
1499 
1500 
1501 class LCallGlobal: public LTemplateInstruction<1, 0, 0> {
1502  public:
1503  DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
1504  DECLARE_HYDROGEN_ACCESSOR(CallGlobal)
1505 
1506  virtual void PrintDataTo(StringStream* stream);
1507 
1508  Handle<String> name() const {return hydrogen()->name(); }
1509  int arity() const { return hydrogen()->argument_count() - 1; }
1510 };
1511 
1512 
1513 class LCallKnownGlobal: public LTemplateInstruction<1, 0, 0> {
1514  public:
1515  DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global")
1516  DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal)
1517 
1518  virtual void PrintDataTo(StringStream* stream);
1519 
1520  Handle<JSFunction> target() const { return hydrogen()->target(); }
1521  int arity() const { return hydrogen()->argument_count() - 1; }
1522 };
1523 
1524 
1525 class LCallNew: public LTemplateInstruction<1, 1, 0> {
1526  public:
1527  explicit LCallNew(LOperand* constructor) {
1528  inputs_[0] = constructor;
1529  }
1530 
1533 
1534  virtual void PrintDataTo(StringStream* stream);
1535 
1536  int arity() const { return hydrogen()->argument_count() - 1; }
1537 };
1538 
1539 
1540 class LCallRuntime: public LTemplateInstruction<1, 0, 0> {
1541  public:
1542  DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
1543  DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
1544 
1545  const Runtime::Function* function() const { return hydrogen()->function(); }
1546  int arity() const { return hydrogen()->argument_count(); }
1547 };
1548 
1549 
1550 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> {
1551  public:
1552  explicit LInteger32ToDouble(LOperand* value) {
1553  inputs_[0] = value;
1554  }
1555 
1556  DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double")
1557 };
1558 
1559 
1560 class LNumberTagI: public LTemplateInstruction<1, 1, 0> {
1561  public:
1562  explicit LNumberTagI(LOperand* value) {
1563  inputs_[0] = value;
1564  }
1565 
1566  DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i")
1567 };
1568 
1569 
1570 class LNumberTagD: public LTemplateInstruction<1, 1, 2> {
1571  public:
1572  LNumberTagD(LOperand* value, LOperand* temp1, LOperand* temp2) {
1573  inputs_[0] = value;
1574  temps_[0] = temp1;
1575  temps_[1] = temp2;
1576  }
1577 
1578  DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d")
1579 };
1580 
1581 
1582 // Sometimes truncating conversion from a tagged value to an int32.
1583 class LDoubleToI: public LTemplateInstruction<1, 1, 2> {
1584  public:
1585  LDoubleToI(LOperand* value, LOperand* temp1, LOperand* temp2) {
1586  inputs_[0] = value;
1587  temps_[0] = temp1;
1588  temps_[1] = temp2;
1589  }
1590 
1591  DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i")
1593 
1594  bool truncating() { return hydrogen()->CanTruncateToInt32(); }
1595 };
1596 
1597 
1598 // Truncating conversion from a tagged value to an int32.
1599 class LTaggedToI: public LTemplateInstruction<1, 1, 3> {
1600  public:
1602  LOperand* temp1,
1603  LOperand* temp2,
1604  LOperand* temp3) {
1605  inputs_[0] = value;
1606  temps_[0] = temp1;
1607  temps_[1] = temp2;
1608  temps_[2] = temp3;
1609  }
1610 
1611  DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i")
1613 
1614  bool truncating() { return hydrogen()->CanTruncateToInt32(); }
1615 };
1616 
1617 
1618 class LSmiTag: public LTemplateInstruction<1, 1, 0> {
1619  public:
1620  explicit LSmiTag(LOperand* value) {
1621  inputs_[0] = value;
1622  }
1623 
1624  DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag")
1625 };
1626 
1627 
1628 class LNumberUntagD: public LTemplateInstruction<1, 1, 0> {
1629  public:
1630  explicit LNumberUntagD(LOperand* value) {
1631  inputs_[0] = value;
1632  }
1633 
1634  DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag")
1636 };
1637 
1638 
1639 class LSmiUntag: public LTemplateInstruction<1, 1, 0> {
1640  public:
1641  LSmiUntag(LOperand* value, bool needs_check)
1642  : needs_check_(needs_check) {
1643  inputs_[0] = value;
1644  }
1645 
1646  DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag")
1647 
1648  bool needs_check() const { return needs_check_; }
1649 
1650  private:
1651  bool needs_check_;
1652 };
1653 
1654 
1655 class LStoreNamedField: public LTemplateInstruction<0, 2, 1> {
1656  public:
1658  inputs_[0] = obj;
1659  inputs_[1] = val;
1660  temps_[0] = temp;
1661  }
1662 
1663  DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
1664  DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
1665 
1666  virtual void PrintDataTo(StringStream* stream);
1667 
1668  LOperand* object() { return inputs_[0]; }
1669  LOperand* value() { return inputs_[1]; }
1670 
1671  Handle<Object> name() const { return hydrogen()->name(); }
1672  bool is_in_object() { return hydrogen()->is_in_object(); }
1673  int offset() { return hydrogen()->offset(); }
1674  Handle<Map> transition() const { return hydrogen()->transition(); }
1675 };
1676 
1677 
1678 class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> {
1679  public:
1681  inputs_[0] = obj;
1682  inputs_[1] = val;
1683  }
1684 
1685  DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
1686  DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
1687 
1688  virtual void PrintDataTo(StringStream* stream);
1689 
1690  LOperand* object() { return inputs_[0]; }
1691  LOperand* value() { return inputs_[1]; }
1692  Handle<Object> name() const { return hydrogen()->name(); }
1693  StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1694 };
1695 
1696 
1697 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> {
1698  public:
1700  inputs_[0] = obj;
1701  inputs_[1] = key;
1702  inputs_[2] = val;
1703  }
1704 
1705  DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
1706  "store-keyed-fast-element")
1707  DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
1708 
1709  virtual void PrintDataTo(StringStream* stream);
1710 
1711  LOperand* object() { return inputs_[0]; }
1712  LOperand* key() { return inputs_[1]; }
1713  LOperand* value() { return inputs_[2]; }
1714  uint32_t additional_index() const { return hydrogen()->index_offset(); }
1715 };
1716 
1717 
1718 class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> {
1719  public:
1721  LOperand* key,
1722  LOperand* val) {
1723  inputs_[0] = elements;
1724  inputs_[1] = key;
1725  inputs_[2] = val;
1726  }
1727 
1728  DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement,
1729  "store-keyed-fast-double-element")
1730  DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastDoubleElement)
1731 
1732  virtual void PrintDataTo(StringStream* stream);
1733 
1734  LOperand* elements() { return inputs_[0]; }
1735  LOperand* key() { return inputs_[1]; }
1736  LOperand* value() { return inputs_[2]; }
1737  uint32_t additional_index() const { return hydrogen()->index_offset(); }
1738 
1739  bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
1740 };
1741 
1742 
1743 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> {
1744  public:
1746  inputs_[0] = obj;
1747  inputs_[1] = key;
1748  inputs_[2] = val;
1749  }
1750 
1751  DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
1752  DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
1753 
1754  virtual void PrintDataTo(StringStream* stream);
1755 
1756  LOperand* object() { return inputs_[0]; }
1757  LOperand* key() { return inputs_[1]; }
1758  LOperand* value() { return inputs_[2]; }
1759  StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1760 };
1761 
1762 class LStoreKeyedSpecializedArrayElement: public LTemplateInstruction<0, 3, 0> {
1763  public:
1765  LOperand* key,
1766  LOperand* val) {
1767  inputs_[0] = external_pointer;
1768  inputs_[1] = key;
1769  inputs_[2] = val;
1770  }
1771 
1772  DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement,
1773  "store-keyed-specialized-array-element")
1774  DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement)
1775 
1776  LOperand* external_pointer() { return inputs_[0]; }
1777  LOperand* key() { return inputs_[1]; }
1778  LOperand* value() { return inputs_[2]; }
1779  ElementsKind elements_kind() const {
1780  return hydrogen()->elements_kind();
1781  }
1782  uint32_t additional_index() const { return hydrogen()->index_offset(); }
1783 };
1784 
1785 
1786 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> {
1787  public:
1789  LOperand* new_map_temp,
1790  LOperand* temp_reg) {
1791  inputs_[0] = object;
1792  temps_[0] = new_map_temp;
1793  temps_[1] = temp_reg;
1794  }
1795 
1796  DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind,
1797  "transition-elements-kind")
1798  DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
1799 
1800  virtual void PrintDataTo(StringStream* stream);
1801 
1802  LOperand* object() { return inputs_[0]; }
1803  LOperand* new_map_reg() { return temps_[0]; }
1804  LOperand* temp_reg() { return temps_[1]; }
1805  Handle<Map> original_map() { return hydrogen()->original_map(); }
1806  Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); }
1807 };
1808 
1809 
1810 class LStringAdd: public LTemplateInstruction<1, 2, 0> {
1811  public:
1812  LStringAdd(LOperand* left, LOperand* right) {
1813  inputs_[0] = left;
1814  inputs_[1] = right;
1815  }
1816 
1817  DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add")
1818  DECLARE_HYDROGEN_ACCESSOR(StringAdd)
1819 
1820  LOperand* left() { return inputs_[0]; }
1821  LOperand* right() { return inputs_[1]; }
1822 };
1823 
1824 
1825 
1826 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> {
1827  public:
1829  inputs_[0] = string;
1830  inputs_[1] = index;
1831  }
1832 
1833  DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at")
1834  DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt)
1835 
1836  LOperand* string() { return inputs_[0]; }
1837  LOperand* index() { return inputs_[1]; }
1838 };
1839 
1840 
1841 class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> {
1842  public:
1843  explicit LStringCharFromCode(LOperand* char_code) {
1844  inputs_[0] = char_code;
1845  }
1846 
1847  DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code")
1848  DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode)
1849 
1850  LOperand* char_code() { return inputs_[0]; }
1851 };
1852 
1853 
1854 class LStringLength: public LTemplateInstruction<1, 1, 0> {
1855  public:
1856  explicit LStringLength(LOperand* string) {
1857  inputs_[0] = string;
1858  }
1859 
1860  DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length")
1861  DECLARE_HYDROGEN_ACCESSOR(StringLength)
1862 
1863  LOperand* string() { return inputs_[0]; }
1864 };
1865 
1866 
1867 class LCheckFunction: public LTemplateInstruction<0, 1, 0> {
1868  public:
1869  explicit LCheckFunction(LOperand* value) {
1870  inputs_[0] = value;
1871  }
1872 
1873  LOperand* value() { return InputAt(0); }
1874 
1875  DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function")
1876  DECLARE_HYDROGEN_ACCESSOR(CheckFunction)
1877 };
1878 
1879 
1880 class LCheckInstanceType: public LTemplateInstruction<0, 1, 0> {
1881  public:
1882  explicit LCheckInstanceType(LOperand* value) {
1883  inputs_[0] = value;
1884  }
1885 
1886  DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type")
1887  DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType)
1888 };
1889 
1890 
1891 class LCheckMaps: public LTemplateInstruction<0, 1, 0> {
1892  public:
1893  explicit LCheckMaps(LOperand* value) {
1894  inputs_[0] = value;
1895  }
1896 
1897  DECLARE_CONCRETE_INSTRUCTION(CheckMaps, "check-maps")
1898  DECLARE_HYDROGEN_ACCESSOR(CheckMaps)
1899 };
1900 
1901 
1902 class LCheckPrototypeMaps: public LTemplateInstruction<0, 0, 2> {
1903  public:
1905  temps_[0] = temp1;
1906  temps_[1] = temp2;
1907  }
1908 
1909  DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps")
1910  DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps)
1911 
1912  Handle<JSObject> prototype() const { return hydrogen()->prototype(); }
1913  Handle<JSObject> holder() const { return hydrogen()->holder(); }
1914 };
1915 
1916 
1917 class LCheckSmi: public LTemplateInstruction<0, 1, 0> {
1918  public:
1919  explicit LCheckSmi(LOperand* value) {
1920  inputs_[0] = value;
1921  }
1922 
1923  DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi")
1924 };
1925 
1926 
1927 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> {
1928  public:
1929  explicit LCheckNonSmi(LOperand* value) {
1930  inputs_[0] = value;
1931  }
1932 
1933  DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi")
1934 };
1935 
1936 
1937 class LClampDToUint8: public LTemplateInstruction<1, 1, 1> {
1938  public:
1940  inputs_[0] = value;
1941  temps_[0] = temp;
1942  }
1943 
1944  LOperand* unclamped() { return inputs_[0]; }
1945 
1946  DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8")
1947 };
1948 
1949 
1950 class LClampIToUint8: public LTemplateInstruction<1, 1, 0> {
1951  public:
1952  explicit LClampIToUint8(LOperand* value) {
1953  inputs_[0] = value;
1954  }
1955 
1956  LOperand* unclamped() { return inputs_[0]; }
1957 
1958  DECLARE_CONCRETE_INSTRUCTION(ClampIToUint8, "clamp-i-to-uint8")
1959 };
1960 
1961 
1962 class LClampTToUint8: public LTemplateInstruction<1, 1, 1> {
1963  public:
1965  inputs_[0] = value;
1966  temps_[0] = temp;
1967  }
1968 
1969  LOperand* unclamped() { return inputs_[0]; }
1970 
1971  DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
1972 };
1973 
1974 
1975 class LAllocateObject: public LTemplateInstruction<1, 0, 2> {
1976  public:
1978  temps_[0] = temp1;
1979  temps_[1] = temp2;
1980  }
1981 
1982  DECLARE_CONCRETE_INSTRUCTION(AllocateObject, "allocate-object")
1983  DECLARE_HYDROGEN_ACCESSOR(AllocateObject)
1984 };
1985 
1986 
1987 class LFastLiteral: public LTemplateInstruction<1, 0, 0> {
1988  public:
1989  DECLARE_CONCRETE_INSTRUCTION(FastLiteral, "fast-literal")
1990  DECLARE_HYDROGEN_ACCESSOR(FastLiteral)
1991 };
1992 
1993 
1994 class LArrayLiteral: public LTemplateInstruction<1, 0, 0> {
1995  public:
1996  DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal")
1998 };
1999 
2000 
2001 class LObjectLiteral: public LTemplateInstruction<1, 0, 0> {
2002  public:
2003  DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object-literal")
2005 };
2006 
2007 
2008 class LRegExpLiteral: public LTemplateInstruction<1, 0, 0> {
2009  public:
2010  DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal")
2012 };
2013 
2014 
2015 class LFunctionLiteral: public LTemplateInstruction<1, 0, 0> {
2016  public:
2017  DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal")
2019 
2020  Handle<SharedFunctionInfo> shared_info() { return hydrogen()->shared_info(); }
2021 };
2022 
2023 
2024 class LToFastProperties: public LTemplateInstruction<1, 1, 0> {
2025  public:
2026  explicit LToFastProperties(LOperand* value) {
2027  inputs_[0] = value;
2028  }
2029 
2030  DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties")
2031  DECLARE_HYDROGEN_ACCESSOR(ToFastProperties)
2032 };
2033 
2034 
2035 class LTypeof: public LTemplateInstruction<1, 1, 0> {
2036  public:
2037  explicit LTypeof(LOperand* value) {
2038  inputs_[0] = value;
2039  }
2040 
2041  DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof")
2042 };
2043 
2044 
2045 class LTypeofIsAndBranch: public LControlInstruction<1, 0> {
2046  public:
2047  explicit LTypeofIsAndBranch(LOperand* value) {
2048  inputs_[0] = value;
2049  }
2050 
2051  DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch")
2052  DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch)
2053 
2054  Handle<String> type_literal() { return hydrogen()->type_literal(); }
2055 
2056  virtual void PrintDataTo(StringStream* stream);
2057 };
2058 
2059 
2060 class LIsConstructCallAndBranch: public LControlInstruction<0, 1> {
2061  public:
2063  temps_[0] = temp;
2064  }
2065 
2066  DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch,
2067  "is-construct-call-and-branch")
2068 };
2069 
2070 
2071 class LDeleteProperty: public LTemplateInstruction<1, 2, 0> {
2072  public:
2074  inputs_[0] = obj;
2075  inputs_[1] = key;
2076  }
2077 
2078  DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property")
2079 
2080  LOperand* object() { return inputs_[0]; }
2081  LOperand* key() { return inputs_[1]; }
2082 };
2083 
2084 
2085 class LOsrEntry: public LTemplateInstruction<0, 0, 0> {
2086  public:
2087  LOsrEntry();
2088 
2089  DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
2090 
2091  LOperand** SpilledRegisterArray() { return register_spills_; }
2092  LOperand** SpilledDoubleRegisterArray() { return double_register_spills_; }
2093 
2094  void MarkSpilledRegister(int allocation_index, LOperand* spill_operand);
2095  void MarkSpilledDoubleRegister(int allocation_index,
2096  LOperand* spill_operand);
2097 
2098  private:
2099  // Arrays of spill slot operands for registers with an assigned spill
2100  // slot, i.e., that must also be restored to the spill slot on OSR entry.
2101  // NULL if the register has no assigned spill slot. Indexed by allocation
2102  // index.
2103  LOperand* register_spills_[Register::kNumAllocatableRegisters];
2104  LOperand* double_register_spills_[DoubleRegister::kNumAllocatableRegisters];
2105 };
2106 
2107 
2108 class LStackCheck: public LTemplateInstruction<0, 0, 0> {
2109  public:
2110  DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check")
2111  DECLARE_HYDROGEN_ACCESSOR(StackCheck)
2112 
2113  Label* done_label() { return &done_label_; }
2114 
2115  private:
2116  Label done_label_;
2117 };
2118 
2119 
2120 class LIn: public LTemplateInstruction<1, 2, 0> {
2121  public:
2122  LIn(LOperand* key, LOperand* object) {
2123  inputs_[0] = key;
2124  inputs_[1] = object;
2125  }
2126 
2127  LOperand* key() { return inputs_[0]; }
2128  LOperand* object() { return inputs_[1]; }
2129 
2131 };
2132 
2133 
2134 class LForInPrepareMap: public LTemplateInstruction<1, 1, 0> {
2135  public:
2136  explicit LForInPrepareMap(LOperand* object) {
2137  inputs_[0] = object;
2138  }
2139 
2140  LOperand* object() { return inputs_[0]; }
2141 
2142  DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map")
2143 };
2144 
2145 
2146 class LForInCacheArray: public LTemplateInstruction<1, 1, 0> {
2147  public:
2148  explicit LForInCacheArray(LOperand* map) {
2149  inputs_[0] = map;
2150  }
2151 
2152  LOperand* map() { return inputs_[0]; }
2153 
2154  DECLARE_CONCRETE_INSTRUCTION(ForInCacheArray, "for-in-cache-array")
2155 
2156  int idx() {
2157  return HForInCacheArray::cast(this->hydrogen_value())->idx();
2158  }
2159 };
2160 
2161 
2162 class LCheckMapValue: public LTemplateInstruction<0, 2, 0> {
2163  public:
2165  inputs_[0] = value;
2166  inputs_[1] = map;
2167  }
2168 
2169  LOperand* value() { return inputs_[0]; }
2170  LOperand* map() { return inputs_[1]; }
2171 
2172  DECLARE_CONCRETE_INSTRUCTION(CheckMapValue, "check-map-value")
2173 };
2174 
2175 
2176 class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> {
2177  public:
2179  inputs_[0] = object;
2180  inputs_[1] = index;
2181  }
2182 
2183  LOperand* object() { return inputs_[0]; }
2184  LOperand* index() { return inputs_[1]; }
2185 
2186  DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index")
2187 };
2188 
2189 
2190 class LChunkBuilder;
2191 class LChunk: public ZoneObject {
2192  public:
2193  explicit LChunk(CompilationInfo* info, HGraph* graph);
2194 
2195  void AddInstruction(LInstruction* instruction, HBasicBlock* block);
2196  LConstantOperand* DefineConstantOperand(HConstant* constant);
2197  Handle<Object> LookupLiteral(LConstantOperand* operand) const;
2198  Representation LookupLiteralRepresentation(LConstantOperand* operand) const;
2199 
2200  int GetNextSpillIndex(bool is_double);
2201  LOperand* GetNextSpillSlot(bool is_double);
2202 
2203  int ParameterAt(int index);
2204  int GetParameterStackSlot(int index) const;
2205  int spill_slot_count() const { return spill_slot_count_; }
2206  CompilationInfo* info() const { return info_; }
2207  HGraph* graph() const { return graph_; }
2208  const ZoneList<LInstruction*>* instructions() const { return &instructions_; }
2209  void AddGapMove(int index, LOperand* from, LOperand* to);
2210  LGap* GetGapAt(int index) const;
2211  bool IsGapAt(int index) const;
2212  int NearestGapPos(int index) const;
2213  void MarkEmptyBlocks();
2214  const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; }
2215  LLabel* GetLabel(int block_id) const {
2216  HBasicBlock* block = graph_->blocks()->at(block_id);
2217  int first_instruction = block->first_instruction_index();
2218  return LLabel::cast(instructions_[first_instruction]);
2219  }
2220  int LookupDestination(int block_id) const {
2221  LLabel* cur = GetLabel(block_id);
2222  while (cur->replacement() != NULL) {
2223  cur = cur->replacement();
2224  }
2225  return cur->block_id();
2226  }
2227  Label* GetAssemblyLabel(int block_id) const {
2228  LLabel* label = GetLabel(block_id);
2229  ASSERT(!label->HasReplacement());
2230  return label->label();
2231  }
2232 
2234  return &inlined_closures_;
2235  }
2236 
2238  inlined_closures_.Add(closure, zone());
2239  }
2240 
2241  Zone* zone() const { return graph_->zone(); }
2242 
2243  private:
2244  int spill_slot_count_;
2245  CompilationInfo* info_;
2246  HGraph* const graph_;
2247  ZoneList<LInstruction*> instructions_;
2248  ZoneList<LPointerMap*> pointer_maps_;
2249  ZoneList<Handle<JSFunction> > inlined_closures_;
2250 };
2251 
2252 
2253 class LChunkBuilder BASE_EMBEDDED {
2254  public:
2255  LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
2256  : chunk_(NULL),
2257  info_(info),
2258  graph_(graph),
2259  zone_(graph->zone()),
2260  status_(UNUSED),
2261  current_instruction_(NULL),
2262  current_block_(NULL),
2263  next_block_(NULL),
2264  argument_count_(0),
2265  allocator_(allocator),
2266  position_(RelocInfo::kNoPosition),
2267  instruction_pending_deoptimization_environment_(NULL),
2268  pending_deoptimization_ast_id_(AstNode::kNoNumber) { }
2269 
2270  // Build the sequence for the graph.
2271  LChunk* Build();
2272 
2273  // Declare methods that deal with the individual node types.
2274 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2276 #undef DECLARE_DO
2277 
2278  private:
2279  enum Status {
2280  UNUSED,
2281  BUILDING,
2282  DONE,
2283  ABORTED
2284  };
2285 
2286  LChunk* chunk() const { return chunk_; }
2287  CompilationInfo* info() const { return info_; }
2288  HGraph* graph() const { return graph_; }
2289  Zone* zone() const { return zone_; }
2290 
2291  bool is_unused() const { return status_ == UNUSED; }
2292  bool is_building() const { return status_ == BUILDING; }
2293  bool is_done() const { return status_ == DONE; }
2294  bool is_aborted() const { return status_ == ABORTED; }
2295 
2296  void Abort(const char* format, ...);
2297 
2298  // Methods for getting operands for Use / Define / Temp.
2299  LUnallocated* ToUnallocated(Register reg);
2300  LUnallocated* ToUnallocated(DoubleRegister reg);
2301 
2302  // Methods for setting up define-use relationships.
2303  MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand);
2304  MUST_USE_RESULT LOperand* UseFixed(HValue* value, Register fixed_register);
2305  MUST_USE_RESULT LOperand* UseFixedDouble(HValue* value,
2306  DoubleRegister fixed_register);
2307 
2308  // A value that is guaranteed to be allocated to a register.
2309  // Operand created by UseRegister is guaranteed to be live until the end of
2310  // instruction. This means that register allocator will not reuse it's
2311  // register for any other operand inside instruction.
2312  // Operand created by UseRegisterAtStart is guaranteed to be live only at
2313  // instruction start. Register allocator is free to assign the same register
2314  // to some other operand used inside instruction (i.e. temporary or
2315  // output).
2316  MUST_USE_RESULT LOperand* UseRegister(HValue* value);
2317  MUST_USE_RESULT LOperand* UseRegisterAtStart(HValue* value);
2318 
2319  // An input operand in a register that may be trashed.
2320  MUST_USE_RESULT LOperand* UseTempRegister(HValue* value);
2321 
2322  // An input operand in a register or stack slot.
2323  MUST_USE_RESULT LOperand* Use(HValue* value);
2324  MUST_USE_RESULT LOperand* UseAtStart(HValue* value);
2325 
2326  // An input operand in a register, stack slot or a constant operand.
2327  MUST_USE_RESULT LOperand* UseOrConstant(HValue* value);
2328  MUST_USE_RESULT LOperand* UseOrConstantAtStart(HValue* value);
2329 
2330  // An input operand in a register or a constant operand.
2331  MUST_USE_RESULT LOperand* UseRegisterOrConstant(HValue* value);
2332  MUST_USE_RESULT LOperand* UseRegisterOrConstantAtStart(HValue* value);
2333 
2334  // An input operand in register, stack slot or a constant operand.
2335  // Will not be moved to a register even if one is freely available.
2336  MUST_USE_RESULT LOperand* UseAny(HValue* value);
2337 
2338  // Temporary operand that must be in a register.
2339  MUST_USE_RESULT LUnallocated* TempRegister();
2340  MUST_USE_RESULT LOperand* FixedTemp(Register reg);
2341  MUST_USE_RESULT LOperand* FixedTemp(DoubleRegister reg);
2342 
2343  // Methods for setting up define-use relationships.
2344  // Return the same instruction that they are passed.
2345  template<int I, int T>
2346  LInstruction* Define(LTemplateInstruction<1, I, T>* instr,
2347  LUnallocated* result);
2348  template<int I, int T>
2349  LInstruction* DefineAsRegister(LTemplateInstruction<1, I, T>* instr);
2350  template<int I, int T>
2351  LInstruction* DefineAsSpilled(LTemplateInstruction<1, I, T>* instr,
2352  int index);
2353  template<int I, int T>
2354  LInstruction* DefineSameAsFirst(LTemplateInstruction<1, I, T>* instr);
2355  template<int I, int T>
2356  LInstruction* DefineFixed(LTemplateInstruction<1, I, T>* instr,
2357  Register reg);
2358  template<int I, int T>
2359  LInstruction* DefineFixedDouble(LTemplateInstruction<1, I, T>* instr,
2360  DoubleRegister reg);
2361  LInstruction* AssignEnvironment(LInstruction* instr);
2362  LInstruction* AssignPointerMap(LInstruction* instr);
2363 
2364  enum CanDeoptimize { CAN_DEOPTIMIZE_EAGERLY, CANNOT_DEOPTIMIZE_EAGERLY };
2365 
2366  // By default we assume that instruction sequences generated for calls
2367  // cannot deoptimize eagerly and we do not attach environment to this
2368  // instruction.
2370  LInstruction* instr,
2371  HInstruction* hinstr,
2372  CanDeoptimize can_deoptimize = CANNOT_DEOPTIMIZE_EAGERLY);
2373 
2374  LEnvironment* CreateEnvironment(HEnvironment* hydrogen_env,
2375  int* argument_index_accumulator);
2376 
2377  void VisitInstruction(HInstruction* current);
2378 
2379  void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block);
2380  LInstruction* DoBit(Token::Value op, HBitwiseBinaryOperation* instr);
2381  LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr);
2382  LInstruction* DoArithmeticD(Token::Value op,
2383  HArithmeticBinaryOperation* instr);
2384  LInstruction* DoArithmeticT(Token::Value op,
2385  HArithmeticBinaryOperation* instr);
2386 
2387  LChunk* chunk_;
2388  CompilationInfo* info_;
2389  HGraph* const graph_;
2390  Zone* zone_;
2391  Status status_;
2392  HInstruction* current_instruction_;
2393  HBasicBlock* current_block_;
2394  HBasicBlock* next_block_;
2395  int argument_count_;
2396  LAllocator* allocator_;
2397  int position_;
2398  LInstruction* instruction_pending_deoptimization_environment_;
2399  int pending_deoptimization_ast_id_;
2400 
2401  DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2402 };
2403 
2404 #undef DECLARE_HYDROGEN_ACCESSOR
2405 #undef DECLARE_CONCRETE_INSTRUCTION
2406 
2407 } } // namespace v8::internal
2408 
2409 #endif // V8_MIPS_LITHIUM_MIPS_H_
LCmpT(LOperand *left, LOperand *right)
Definition: lithium-mips.h:788
LStringCharCodeAt(LOperand *string, LOperand *index)
LDateField(LOperand *date, LOperand *temp, Smi *index)
LArgumentsLength(LOperand *elements)
Definition: lithium-mips.h:514
#define LITHIUM_CONCRETE_INSTRUCTION_LIST(V)
Definition: lithium-mips.h:49
LLoadContextSlot(LOperand *context)
LGlobalReceiver(LOperand *global_object)
static LGap * cast(LInstruction *instr)
Definition: lithium-mips.h:317
virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment *env)
Definition: lithium-mips.h:248
LLoadFieldByIndex(LOperand *object, LOperand *index)
Handle< Object > name() const
LCallKeyed(LOperand *key)
void set_pointer_map(LPointerMap *p)
Definition: lithium-mips.h:241
LThrow(LOperand *value)
bool IsMarkedAsCall() const
Definition: lithium-mips.h:253
Handle< Object > name() const
virtual LOperand * InputAt(int i)=0
LStoreKeyedGeneric(LOperand *obj, LOperand *key, LOperand *val)
int count() const
LClassOfTestAndBranch(LOperand *value, LOperand *temp)
Definition: lithium-mips.h:773
LClampDToUint8(LOperand *value, LOperand *temp)
void set_environment(LEnvironment *env)
Definition: lithium-mips.h:237
void set_result(LOperand *operand)
Definition: lithium-mips.h:288
LReturn(LOperand *value)
virtual void PrintOutputOperandTo(StringStream *stream)
Definition: lithium-arm.cc:120
EmbeddedContainer< LOperand *, T > temps_
Definition: lithium-arm.h:301
LSmiTag(LOperand *value)
Definition: v8.h:863
Token::Value op() const
LWrapReceiver(LOperand *receiver, LOperand *function)
Definition: lithium-mips.h:461
#define DECLARE_OPCODE(type)
Definition: lithium-mips.h:217
LParallelMove * GetOrCreateParallelMove(InnerPosition pos, Zone *zone)
Definition: lithium-mips.h:335
LNumberTagI(LOperand *value)
LInstructionGap(HBasicBlock *block)
Definition: lithium-mips.h:354
value format" "after each garbage collection") DEFINE_bool(print_cumulative_gc_stat, false, "print cumulative GC statistics in name=value format on exit") DEFINE_bool(trace_gc_verbose, false, "print more details following each garbage collection") DEFINE_bool(trace_fragmentation, false, "report fragmentation for old pointer and data pages") DEFINE_bool(collect_maps, true, "garbage collect maps from which no objects can be reached") DEFINE_bool(flush_code, true, "flush code that we expect not to use again before full gc") DEFINE_bool(incremental_marking, true, "use incremental marking") DEFINE_bool(incremental_marking_steps, true, "do incremental marking steps") DEFINE_bool(trace_incremental_marking, false, "trace progress of the incremental marking") DEFINE_bool(use_idle_notification, true, "Use idle notification to reduce memory footprint.") DEFINE_bool(send_idle_notification, false, "Send idle notifcation between stress runs.") DEFINE_bool(use_ic, true, "use inline caching") DEFINE_bool(native_code_counters, false, "generate extra code for manipulating stats counters") DEFINE_bool(always_compact, false, "Perform compaction on every full GC") DEFINE_bool(lazy_sweeping, true, "Use lazy sweeping for old pointer and data spaces") DEFINE_bool(never_compact, false, "Never perform compaction on full GC-testing only") DEFINE_bool(compact_code_space, true, "Compact code space on full non-incremental collections") DEFINE_bool(cleanup_code_caches_at_gc, true, "Flush inline caches prior to mark compact collection and" "flush code caches in maps during mark compact cycle.") DEFINE_int(random_seed, 0, "Default seed for initializing random generator" "(0, the default, means to use system random).") DEFINE_bool(use_verbose_printer, true, "allows verbose printing") DEFINE_bool(allow_natives_syntax, false, "allow natives syntax") DEFINE_bool(trace_sim, false, "Trace simulator execution") DEFINE_bool(check_icache, false, "Check icache flushes in ARM and MIPS simulator") DEFINE_int(stop_sim_at, 0, "Simulator stop after x number of instructions") DEFINE_int(sim_stack_alignment, 8, "Stack alingment in bytes in simulator(4 or 8, 8 is default)") DEFINE_bool(trace_exception, false, "print stack trace when throwing exceptions") DEFINE_bool(preallocate_message_memory, false, "preallocate some memory to build stack traces.") DEFINE_bool(randomize_hashes, true, "randomize hashes to avoid predictable hash collisions" "(with snapshots this option cannot override the baked-in seed)") DEFINE_int(hash_seed, 0, "Fixed seed to use to hash property keys(0 means random)" "(with snapshots this option cannot override the baked-in seed)") DEFINE_bool(preemption, false, "activate a 100ms timer that switches between V8 threads") DEFINE_bool(regexp_optimization, true, "generate optimized regexp code") DEFINE_bool(testing_bool_flag, true, "testing_bool_flag") DEFINE_int(testing_int_flag, 13, "testing_int_flag") DEFINE_float(testing_float_flag, 2.5, "float-flag") DEFINE_string(testing_string_flag, "Hello, world!", "string-flag") DEFINE_int(testing_prng_seed, 42, "Seed used for threading test randomness") DEFINE_string(testing_serialization_file, "/tmp/serdes", "file in which to serialize heap") DEFINE_bool(help, false, "Print usage message, including flags, on console") DEFINE_bool(dump_counters, false, "Dump counters on exit") DEFINE_string(map_counters, "", "Map counters to a file") DEFINE_args(js_arguments, JSARGUMENTS_INIT, "Pass all remaining arguments to the script.Alias for\"--\".") DEFINE_bool(debug_compile_events, true,"Enable debugger compile events") DEFINE_bool(debug_script_collected_events, true,"Enable debugger script collected events") DEFINE_bool(gdbjit, false,"enable GDBJIT interface (disables compacting GC)") DEFINE_bool(gdbjit_full, false,"enable GDBJIT interface for all code objects") DEFINE_bool(gdbjit_dump, false,"dump elf objects with debug info to disk") DEFINE_string(gdbjit_dump_filter,"","dump only objects containing this substring") DEFINE_bool(force_marking_deque_overflows, false,"force overflows of marking deque by reducing it's size ""to 64 words") DEFINE_bool(stress_compaction, false,"stress the GC compactor to flush out bugs (implies ""--force_marking_deque_overflows)")#define FLAG DEFINE_bool(enable_slow_asserts, false,"enable asserts that are slow to execute") DEFINE_bool(trace_codegen, false,"print name of functions for which code is generated") DEFINE_bool(print_source, false,"pretty print source code") DEFINE_bool(print_builtin_source, false,"pretty print source code for builtins") DEFINE_bool(print_ast, false,"print source AST") DEFINE_bool(print_builtin_ast, false,"print source AST for builtins") DEFINE_string(stop_at,"","function name where to insert a breakpoint") DEFINE_bool(print_builtin_scopes, false,"print scopes for builtins") DEFINE_bool(print_scopes, false,"print scopes") DEFINE_bool(trace_contexts, false,"trace contexts operations") DEFINE_bool(gc_greedy, false,"perform GC prior to some allocations") DEFINE_bool(gc_verbose, false,"print stuff during garbage collection") DEFINE_bool(heap_stats, false,"report heap statistics before and after GC") DEFINE_bool(code_stats, false,"report code statistics after GC") DEFINE_bool(verify_heap, false,"verify heap pointers before and after GC") DEFINE_bool(print_handles, false,"report handles after GC") DEFINE_bool(print_global_handles, false,"report global handles after GC") DEFINE_bool(trace_ic, false,"trace inline cache state transitions") DEFINE_bool(print_interfaces, false,"print interfaces") DEFINE_bool(print_interface_details, false,"print interface inference details") DEFINE_int(print_interface_depth, 5,"depth for printing interfaces") DEFINE_bool(trace_normalization, false,"prints when objects are turned into dictionaries.") DEFINE_bool(trace_lazy, false,"trace lazy compilation") DEFINE_bool(collect_heap_spill_statistics, false,"report heap spill statistics along with heap_stats ""(requires heap_stats)") DEFINE_bool(trace_isolates, false,"trace isolate state changes") DEFINE_bool(log_state_changes, false,"Log state changes.") DEFINE_bool(regexp_possessive_quantifier, false,"enable possessive quantifier syntax for testing") DEFINE_bool(trace_regexp_bytecodes, false,"trace regexp bytecode execution") DEFINE_bool(trace_regexp_assembler, false,"trace regexp macro assembler calls.")#define FLAG DEFINE_bool(log, false,"Minimal logging (no API, code, GC, suspect, or handles samples).") DEFINE_bool(log_all, false,"Log all events to the log file.") DEFINE_bool(log_runtime, false,"Activate runtime system %Log call.") DEFINE_bool(log_api, false,"Log API events to the log file.") DEFINE_bool(log_code, false,"Log code events to the log file without profiling.") DEFINE_bool(log_gc, false,"Log heap samples on garbage collection for the hp2ps tool.") DEFINE_bool(log_handles, false,"Log global handle events.") DEFINE_bool(log_snapshot_positions, false,"log positions of (de)serialized objects in the snapshot.") DEFINE_bool(log_suspect, false,"Log suspect operations.") DEFINE_bool(prof, false,"Log statistical profiling information (implies --log-code).") DEFINE_bool(prof_auto, true,"Used with --prof, starts profiling automatically") DEFINE_bool(prof_lazy, false,"Used with --prof, only does sampling and logging"" when profiler is active (implies --noprof_auto).") DEFINE_bool(prof_browser_mode, true,"Used with --prof, turns on browser-compatible mode for profiling.") DEFINE_bool(log_regexp, false,"Log regular expression execution.") DEFINE_bool(sliding_state_window, false,"Update sliding state window counters.") DEFINE_string(logfile,"v8.log","Specify the name of the log file.") DEFINE_bool(ll_prof, false,"Enable low-level linux profiler.")#define FLAG DEFINE_bool(trace_elements_transitions, false,"trace elements transitions") DEFINE_bool(print_code_stubs, false,"print code stubs") DEFINE_bool(test_secondary_stub_cache, false,"test secondary stub cache by disabling the primary one") DEFINE_bool(test_primary_stub_cache, false,"test primary stub cache by disabling the secondary one") DEFINE_bool(print_code, false,"print generated code") DEFINE_bool(print_opt_code, false,"print optimized code") DEFINE_bool(print_unopt_code, false,"print unoptimized code before ""printing optimized code based on it") DEFINE_bool(print_code_verbose, false,"print more information for code") DEFINE_bool(print_builtin_code, false,"print generated code for builtins")#43"/Users/thlorenz/dev/dx/v8-perf/build/v8/src/flags.cc"2#define FLAG_MODE_DEFINE_DEFAULTS#1"/Users/thlorenz/dev/dx/v8-perf/build/v8/src/flag-definitions.h"1#define FLAG_FULL(ftype, ctype, nam, def, cmt)#define FLAG_READONLY(ftype, ctype, nam, def, cmt)#define DEFINE_implication(whenflag, thenflag)#define DEFINE_bool(nam, def, cmt)#define DEFINE_int(nam, def, cmt)#define DEFINE_float(nam, def, cmt)#define DEFINE_string(nam, def, cmt)#define DEFINE_args(nam, def, cmt)#define FLAG DEFINE_bool(use_strict, false,"enforce strict mode") DEFINE_bool(es5_readonly, false,"activate correct semantics for inheriting readonliness") DEFINE_bool(es52_globals, false,"activate new semantics for global var declarations") DEFINE_bool(harmony_typeof, false,"enable harmony semantics for typeof") DEFINE_bool(harmony_scoping, false,"enable harmony block scoping") DEFINE_bool(harmony_modules, false,"enable harmony modules (implies block scoping)") DEFINE_bool(harmony_proxies, false,"enable harmony proxies") DEFINE_bool(harmony_collections, false,"enable harmony collections (sets, maps, and weak maps)") DEFINE_bool(harmony, false,"enable all harmony features (except typeof)") DEFINE_implication(harmony, harmony_scoping) DEFINE_implication(harmony, harmony_modules) DEFINE_implication(harmony, harmony_proxies) DEFINE_implication(harmony, harmony_collections) DEFINE_implication(harmony_modules, harmony_scoping) DEFINE_bool(packed_arrays, false,"optimizes arrays that have no holes") DEFINE_bool(smi_only_arrays, true,"tracks arrays with only smi values") DEFINE_bool(clever_optimizations, true,"Optimize object size, Array shift, DOM strings and string +") DEFINE_bool(unbox_double_arrays, true,"automatically unbox arrays of doubles") DEFINE_bool(string_slices, true,"use string slices") DEFINE_bool(crankshaft, true,"use crankshaft") DEFINE_string(hydrogen_filter,"","optimization filter") DEFINE_bool(use_range, true,"use hydrogen range analysis") DEFINE_bool(eliminate_dead_phis, true,"eliminate dead phis") DEFINE_bool(use_gvn, true,"use hydrogen global value numbering") DEFINE_bool(use_canonicalizing, true,"use hydrogen instruction canonicalizing") DEFINE_bool(use_inlining, true,"use function inlining") DEFINE_int(max_inlined_source_size, 600,"maximum source size in bytes considered for a single inlining") DEFINE_int(max_inlined_nodes, 196,"maximum number of AST nodes considered for a single inlining") DEFINE_int(max_inlined_nodes_cumulative, 196,"maximum cumulative number of AST nodes considered for inlining") DEFINE_bool(loop_invariant_code_motion, true,"loop invariant code motion") DEFINE_bool(collect_megamorphic_maps_from_stub_cache, true,"crankshaft harvests type feedback from stub cache") DEFINE_bool(hydrogen_stats, false,"print statistics for hydrogen") DEFINE_bool(trace_hydrogen, false,"trace generated hydrogen to file") DEFINE_string(trace_phase,"Z","trace generated IR for specified phases") DEFINE_bool(trace_inlining, false,"trace inlining decisions") DEFINE_bool(trace_alloc, false,"trace register allocator") DEFINE_bool(trace_all_uses, false,"trace all use positions") DEFINE_bool(trace_range, false,"trace range analysis") DEFINE_bool(trace_gvn, false,"trace global value numbering") DEFINE_bool(trace_representation, false,"trace representation types") DEFINE_bool(stress_pointer_maps, false,"pointer map for every instruction") DEFINE_bool(stress_environments, false,"environment for every instruction") DEFINE_int(deopt_every_n_times, 0,"deoptimize every n times a deopt point is passed") DEFINE_bool(trap_on_deopt, false,"put a break point before deoptimizing") DEFINE_bool(deoptimize_uncommon_cases, true,"deoptimize uncommon cases") DEFINE_bool(polymorphic_inlining, true,"polymorphic inlining") DEFINE_bool(use_osr, true,"use on-stack replacement") DEFINE_bool(array_bounds_checks_elimination, false,"perform array bounds checks elimination") DEFINE_bool(array_index_dehoisting, false,"perform array index dehoisting") DEFINE_bool(trace_osr, false,"trace on-stack replacement") DEFINE_int(stress_runs, 0,"number of stress runs") DEFINE_bool(optimize_closures, true,"optimize closures") DEFINE_bool(inline_construct, true,"inline constructor calls") DEFINE_bool(inline_arguments, true,"inline functions with arguments object") DEFINE_int(loop_weight, 1,"loop weight for representation inference") DEFINE_bool(optimize_for_in, true,"optimize functions containing for-in loops") DEFINE_bool(experimental_profiler, true,"enable all profiler experiments") DEFINE_bool(watch_ic_patching, false,"profiler considers IC stability") DEFINE_int(frame_count, 1,"number of stack frames inspected by the profiler") DEFINE_bool(self_optimization, false,"primitive functions trigger their own optimization") DEFINE_bool(direct_self_opt, false,"call recompile stub directly when self-optimizing") DEFINE_bool(retry_self_opt, false,"re-try self-optimization if it failed") DEFINE_bool(count_based_interrupts, false,"trigger profiler ticks based on counting instead of timing") DEFINE_bool(interrupt_at_exit, false,"insert an interrupt check at function exit") DEFINE_bool(weighted_back_edges, false,"weight back edges by jump distance for interrupt triggering") DEFINE_int(interrupt_budget, 5900,"execution budget before interrupt is triggered") DEFINE_int(type_info_threshold, 15,"percentage of ICs that must have type info to allow optimization") DEFINE_int(self_opt_count, 130,"call count before self-optimization") DEFINE_implication(experimental_profiler, watch_ic_patching) DEFINE_implication(experimental_profiler, self_optimization) DEFINE_implication(experimental_profiler, retry_self_opt) DEFINE_implication(experimental_profiler, count_based_interrupts) DEFINE_implication(experimental_profiler, interrupt_at_exit) DEFINE_implication(experimental_profiler, weighted_back_edges) DEFINE_bool(trace_opt_verbose, false,"extra verbose compilation tracing") DEFINE_implication(trace_opt_verbose, trace_opt) DEFINE_bool(debug_code, false,"generate extra code (assertions) for debugging") DEFINE_bool(code_comments, false,"emit comments in code disassembly") DEFINE_bool(enable_sse2, true,"enable use of SSE2 instructions if available") DEFINE_bool(enable_sse3, true,"enable use of SSE3 instructions if available") DEFINE_bool(enable_sse4_1, true,"enable use of SSE4.1 instructions if available") DEFINE_bool(enable_cmov, true,"enable use of CMOV instruction if available") DEFINE_bool(enable_rdtsc, true,"enable use of RDTSC instruction if available") DEFINE_bool(enable_sahf, true,"enable use of SAHF instruction if available (X64 only)") DEFINE_bool(enable_vfp3, true,"enable use of VFP3 instructions if available - this implies ""enabling ARMv7 instructions (ARM only)") DEFINE_bool(enable_armv7, true,"enable use of ARMv7 instructions if available (ARM only)") DEFINE_bool(enable_fpu, true,"enable use of MIPS FPU instructions if available (MIPS only)") DEFINE_string(expose_natives_as, NULL,"expose natives in global object") DEFINE_string(expose_debug_as, NULL,"expose debug in global object") DEFINE_bool(expose_gc, false,"expose gc extension") DEFINE_bool(expose_externalize_string, false,"expose externalize string extension") DEFINE_int(stack_trace_limit, 10,"number of stack frames to capture") DEFINE_bool(builtins_in_stack_traces, false,"show built-in functions in stack traces") DEFINE_bool(disable_native_files, false,"disable builtin natives files") DEFINE_bool(inline_new, true,"use fast inline allocation") DEFINE_bool(stack_trace_on_abort, true,"print a stack trace if an assertion failure occurs") DEFINE_bool(trace, false,"trace function calls") DEFINE_bool(mask_constants_with_cookie, true,"use random jit cookie to mask large constants") DEFINE_bool(lazy, true,"use lazy compilation") DEFINE_bool(trace_opt, false,"trace lazy optimization") DEFINE_bool(trace_opt_stats, false,"trace lazy optimization statistics") DEFINE_bool(opt, true,"use adaptive optimizations") DEFINE_bool(always_opt, false,"always try to optimize functions") DEFINE_bool(prepare_always_opt, false,"prepare for turning on always opt") DEFINE_bool(trace_deopt, false,"trace deoptimization") DEFINE_int(min_preparse_length, 1024,"minimum length for automatic enable preparsing") DEFINE_bool(always_full_compiler, false,"try to use the dedicated run-once backend for all code") DEFINE_bool(trace_bailout, false,"print reasons for falling back to using the classic V8 backend") DEFINE_bool(compilation_cache, true,"enable compilation cache") DEFINE_bool(cache_prototype_transitions, true,"cache prototype transitions") DEFINE_bool(trace_debug_json, false,"trace debugging JSON request/response") DEFINE_bool(debugger_auto_break, true,"automatically set the debug break flag when debugger commands are ""in the queue") DEFINE_bool(enable_liveedit, true,"enable liveedit experimental feature") DEFINE_bool(break_on_abort, true,"always cause a debug break before aborting") DEFINE_int(stack_size, kPointerSize *123,"default size of stack region v8 is allowed to use (in kBytes)") DEFINE_int(max_stack_trace_source_length, 300,"maximum length of function source code printed in a stack trace.") DEFINE_bool(always_inline_smi_code, false,"always inline smi code in non-opt code") DEFINE_int(max_new_space_size, 0,"max size of the new generation (in kBytes)") DEFINE_int(max_old_space_size, 0,"max size of the old generation (in Mbytes)") DEFINE_int(max_executable_size, 0,"max size of executable memory (in Mbytes)") DEFINE_bool(gc_global, false,"always perform global GCs") DEFINE_int(gc_interval,-1,"garbage collect after <n> allocations") DEFINE_bool(trace_gc, false,"print one trace line following each garbage collection") DEFINE_bool(trace_gc_nvp, false,"print one detailed trace line in name=value format ""after each garbage collection") DEFINE_bool(print_cumulative_gc_stat, false,"print cumulative GC statistics in name=value format on exit") DEFINE_bool(trace_gc_verbose, false,"print more details following each garbage collection") DEFINE_bool(trace_fragmentation, false,"report fragmentation for old pointer and data pages") DEFINE_bool(collect_maps, true,"garbage collect maps from which no objects can be reached") DEFINE_bool(flush_code, true,"flush code that we expect not to use again before full gc") DEFINE_bool(incremental_marking, true,"use incremental marking") DEFINE_bool(incremental_marking_steps, true,"do incremental marking steps") DEFINE_bool(trace_incremental_marking, false,"trace progress of the incremental marking") DEFINE_bool(use_idle_notification, true,"Use idle notification to reduce memory footprint.") DEFINE_bool(send_idle_notification, false,"Send idle notifcation between stress runs.") DEFINE_bool(use_ic, true,"use inline caching") DEFINE_bool(native_code_counters, false,"generate extra code for manipulating stats counters") DEFINE_bool(always_compact, false,"Perform compaction on every full GC") DEFINE_bool(lazy_sweeping, true,"Use lazy sweeping for old pointer and data spaces") DEFINE_bool(never_compact, false,"Never perform compaction on full GC - testing only") DEFINE_bool(compact_code_space, true,"Compact code space on full non-incremental collections") DEFINE_bool(cleanup_code_caches_at_gc, true,"Flush inline caches prior to mark compact collection and ""flush code caches in maps during mark compact cycle.") DEFINE_int(random_seed, 0,"Default seed for initializing random generator ""(0, the default, means to use system random).") DEFINE_bool(use_verbose_printer, true,"allows verbose printing") DEFINE_bool(allow_natives_syntax, false,"allow natives syntax") DEFINE_bool(trace_sim, false,"Trace simulator execution") DEFINE_bool(check_icache, false,"Check icache flushes in ARM and MIPS simulator") DEFINE_int(stop_sim_at, 0,"Simulator stop after x number of instructions") DEFINE_int(sim_stack_alignment, 8,"Stack alingment in bytes in simulator (4 or 8, 8 is default)") DEFINE_bool(trace_exception, false,"print stack trace when throwing exceptions") DEFINE_bool(preallocate_message_memory, false,"preallocate some memory to build stack traces.") DEFINE_bool(randomize_hashes, true,"randomize hashes to avoid predictable hash collisions ""(with snapshots this option cannot override the baked-in seed)") DEFINE_int(hash_seed, 0,"Fixed seed to use to hash property keys (0 means random)""(with snapshots this option cannot override the baked-in seed)") DEFINE_bool(preemption, false,"activate a 100ms timer that switches between V8 threads") DEFINE_bool(regexp_optimization, true,"generate optimized regexp code") DEFINE_bool(testing_bool_flag, true,"testing_bool_flag") DEFINE_int(testing_int_flag, 13,"testing_int_flag") DEFINE_float(testing_float_flag, 2.5,"float-flag") DEFINE_string(testing_string_flag,"Hello, world!","string-flag") DEFINE_int(testing_prng_seed, 42,"Seed used for threading test randomness") DEFINE_string(testing_serialization_file,"/tmp/serdes","file in which to serialize heap") DEFINE_bool(help, false,"Print usage message, including flags, on console") DEFINE_bool(dump_counters, false,"Dump counters on exit") DEFINE_string(map_counters,"","Map counters to a file") DEFINE_args(js_arguments, JSARGUMENTS_INIT,"Pass all remaining arguments to the script. Alias for \"--\".") DEFINE_bool(debug_compile_events, true,"Enable debugger compile events") DEFINE_bool(debug_script_collected_events, true,"Enable debugger script collected events") DEFINE_bool(gdbjit, false,"enable GDBJIT interface (disables compacting GC)") DEFINE_bool(gdbjit_full, false,"enable GDBJIT interface for all code objects") DEFINE_bool(gdbjit_dump, false,"dump elf objects with debug info to disk") DEFINE_string(gdbjit_dump_filter,"","dump only objects containing this substring") DEFINE_bool(force_marking_deque_overflows, false,"force overflows of marking deque by reducing it's size ""to 64 words") DEFINE_bool(stress_compaction, false,"stress the GC compactor to flush out bugs (implies ""--force_marking_deque_overflows)")#define FLAG DEFINE_bool(enable_slow_asserts, false,"enable asserts that are slow to execute") DEFINE_bool(trace_codegen, false,"print name of functions for which code is generated") DEFINE_bool(print_source, false,"pretty print source code") DEFINE_bool(print_builtin_source, false,"pretty print source code for builtins") DEFINE_bool(print_ast, false,"print source AST") DEFINE_bool(print_builtin_ast, false,"print source AST for builtins") DEFINE_string(stop_at,"","function name where to insert a breakpoint") DEFINE_bool(print_builtin_scopes, false,"print scopes for builtins") DEFINE_bool(print_scopes, false,"print scopes") DEFINE_bool(trace_contexts, false,"trace contexts operations") DEFINE_bool(gc_greedy, false,"perform GC prior to some allocations") DEFINE_bool(gc_verbose, false,"print stuff during garbage collection") DEFINE_bool(heap_stats, false,"report heap statistics before and after GC") DEFINE_bool(code_stats, false,"report code statistics after GC") DEFINE_bool(verify_heap, false,"verify heap pointers before and after GC") DEFINE_bool(print_handles, false,"report handles after GC") DEFINE_bool(print_global_handles, false,"report global handles after GC") DEFINE_bool(trace_ic, false,"trace inline cache state transitions") DEFINE_bool(print_interfaces, false,"print interfaces") DEFINE_bool(print_interface_details, false,"print interface inference details") DEFINE_int(print_interface_depth, 5,"depth for printing interfaces") DEFINE_bool(trace_normalization, false,"prints when objects are turned into dictionaries.") DEFINE_bool(trace_lazy, false,"trace lazy compilation") DEFINE_bool(collect_heap_spill_statistics, false,"report heap spill statistics along with heap_stats ""(requires heap_stats)") DEFINE_bool(trace_isolates, false,"trace isolate state changes") DEFINE_bool(log_state_changes, false,"Log state changes.") DEFINE_bool(regexp_possessive_quantifier, false,"enable possessive quantifier syntax for testing") DEFINE_bool(trace_regexp_bytecodes, false,"trace regexp bytecode execution") DEFINE_bool(trace_regexp_assembler, false,"trace regexp macro assembler calls.")#define FLAG DEFINE_bool(log, false,"Minimal logging (no API, code, GC, suspect, or handles samples).") DEFINE_bool(log_all, false,"Log all events to the log file.") DEFINE_bool(log_runtime, false,"Activate runtime system %Log call.") DEFINE_bool(log_api, false,"Log API events to the log file.") DEFINE_bool(log_code, false,"Log code events to the log file without profiling.") DEFINE_bool(log_gc, false,"Log heap samples on garbage collection for the hp2ps tool.") DEFINE_bool(log_handles, false,"Log global handle events.") DEFINE_bool(log_snapshot_positions, false,"log positions of (de)serialized objects in the snapshot.") DEFINE_bool(log_suspect, false,"Log suspect operations.") DEFINE_bool(prof, false,"Log statistical profiling information (implies --log-code).") DEFINE_bool(prof_auto, true,"Used with --prof, starts profiling automatically") DEFINE_bool(prof_lazy, false,"Used with --prof, only does sampling and logging"" when profiler is active (implies --noprof_auto).") DEFINE_bool(prof_browser_mode, true,"Used with --prof, turns on browser-compatible mode for profiling.") DEFINE_bool(log_regexp, false,"Log regular expression execution.") DEFINE_bool(sliding_state_window, false,"Update sliding state window counters.") DEFINE_string(logfile,"v8.log","Specify the name of the log file.") DEFINE_bool(ll_prof, false,"Enable low-level linux profiler.")#define FLAG DEFINE_bool(trace_elements_transitions, false,"trace elements transitions") DEFINE_bool(print_code_stubs, false,"print code stubs") DEFINE_bool(test_secondary_stub_cache, false,"test secondary stub cache by disabling the primary one") DEFINE_bool(test_primary_stub_cache, false,"test primary stub cache by disabling the secondary one") DEFINE_bool(print_code, false,"print generated code") DEFINE_bool(print_opt_code, false,"print optimized code") DEFINE_bool(print_unopt_code, false,"print unoptimized code before ""printing optimized code based on it") DEFINE_bool(print_code_verbose, false,"print more information for code") DEFINE_bool(print_builtin_code, false,"print generated code for builtins")#47"/Users/thlorenz/dev/dx/v8-perf/build/v8/src/flags.cc"2 namespace{struct Flag{enum FlagType{TYPE_BOOL, TYPE_INT, TYPE_FLOAT, TYPE_STRING, TYPE_ARGS} name
Definition: flags.cc:1349
LLoadGlobalGeneric(LOperand *global_object)
LCheckSmi(LOperand *value)
LLoadFunctionPrototype(LOperand *function)
LStringLength(LOperand *string)
LIsObjectAndBranch(LOperand *value, LOperand *temp)
Definition: lithium-mips.h:661
Handle< Object > name() const
LUnaryMathOperation(LOperand *value, LOperand *temp)
Definition: lithium-mips.h:605
LStoreNamedField(LOperand *obj, LOperand *val, LOperand *temp)
LLabel(HBasicBlock *block)
Definition: lithium-mips.h:399
LJSArrayLength(LOperand *value)
Definition: lithium-mips.h:959
LChunkBuilder(CompilationInfo *info, HGraph *graph, LAllocator *allocator)
int int32_t
Definition: unicode.cc:47
LOuterContext(LOperand *context)
static const int kNumAllocatableRegisters
Handle< Object > name() const
#define DECLARE_DO(type)
Handle< Map > transition() const
EqualityKind
Definition: v8.h:145
LEnvironment * environment() const
Definition: lithium-mips.h:238
LStoreContextSlot(LOperand *context, LOperand *value)
virtual HBasicBlock * SuccessorAt(int i)=0
LCheckNonSmi(LOperand *value)
#define ASSERT(condition)
Definition: checks.h:270
Token::Value op() const
Definition: lithium-mips.h:871
LBoundsCheck(LOperand *index, LOperand *length)
Definition: lithium-mips.h:837
LClampTToUint8(LOperand *value, LOperand *temp)
virtual const char * Mnemonic() const =0
LCheckPrototypeMaps(LOperand *temp1, LOperand *temp2)
LAllocateObject(LOperand *temp1, LOperand *temp2)
virtual void PrintDataTo(StringStream *stream)
Definition: lithium-arm.cc:111
#define DECLARE_PREDICATE(type)
Definition: lithium-mips.h:226
LInvokeFunction(LOperand *function)
LBranch(LOperand *value)
Definition: lithium-mips.h:924
LTransitionElementsKind(LOperand *object, LOperand *new_map_temp, LOperand *temp_reg)
LNumberUntagD(LOperand *value)
LForInPrepareMap(LOperand *object)
void set_hydrogen_value(HValue *value)
Definition: lithium-mips.h:245
LLoadNamedField(LOperand *object)
#define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V)
LPower(LOperand *left, LOperand *right)
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic)
Definition: lithium-mips.h:185
virtual bool HasResult() const =0
bool can_deopt() const
Definition: lithium-mips.h:873
Handle< JSObject > holder() const
DwVfpRegister DoubleRegister
Token::Value op() const
Definition: lithium-mips.h:856
virtual Opcode opcode() const =0
Handle< Object > name() const
Handle< Map > map() const
Definition: lithium-mips.h:947
#define MUST_USE_RESULT
Definition: globals.h:360
LGlobalObject(LOperand *context)
EmbeddedContainer< LOperand *, R > results_
Definition: lithium-arm.h:299
LLabel * replacement() const
Definition: lithium-mips.h:409
LDeleteProperty(LOperand *obj, LOperand *key)
virtual LOperand * TempAt(int i)=0
Handle< JSFunction > known_function()
LAddI(LOperand *left, LOperand *right)
bool is_loop_header() const
Definition: lithium-mips.h:407
NilValue
Definition: v8.h:141
LCmpObjectEqAndBranch(LOperand *left, LOperand *right)
Definition: lithium-mips.h:620
LOperand ** SpilledDoubleRegisterArray()
LOperand * key()
LNumberTagD(LOperand *value, LOperand *temp1, LOperand *temp2)
int spill_slot_count() const
LElementsKind(LOperand *value)
Definition: lithium-mips.h:982
virtual Opcode opcode() const
HBasicBlock * SuccessorAt(int i)
Definition: lithium-mips.h:448
LStoreKeyedFastElement(LOperand *obj, LOperand *key, LOperand *val)
LIsStringAndBranch(LOperand *value, LOperand *temp)
Definition: lithium-mips.h:675
DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement,"load-keyed-fast-double-element") LOperand *elements()
int block_id() const
Definition: lithium-arm.h:407
LStoreNamedGeneric(LOperand *obj, LOperand *val)
LLoadKeyedFastElement(LOperand *elements, LOperand *key)
bool HasEnvironment() const
Definition: lithium-mips.h:239
virtual bool HasResult() const
Definition: lithium-mips.h:287
LBitI(LOperand *left, LOperand *right)
Definition: lithium-mips.h:851
virtual int TempCount()=0
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition: globals.h:321
virtual bool IsControl() const
Definition: lithium-mips.h:445
virtual LOperand * result()=0
LDoubleToI(LOperand *value, LOperand *temp1, LOperand *temp2)
Zone * zone() const
LStoreGlobalGeneric(LOperand *global_object, LOperand *value)
virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment *env)
Definition: lithium-mips.h:826
virtual bool IsControl() const
Definition: lithium-arm.h:367
LStringCharFromCode(LOperand *char_code)
HBasicBlock * block() const
Definition: lithium-arm.h:325
LSubI(LOperand *left, LOperand *right)
Definition: lithium-mips.h:885
TranscendentalCache::Type transcendental_type()
Definition: lithium-arm.h:431
LMulI(LOperand *left, LOperand *right, LOperand *temp)
Definition: lithium-mips.h:573
virtual void PrintTo(StringStream *stream)
Definition: lithium-arm.cc:92
#define BASE_EMBEDDED
Definition: allocation.h:68
LDivI(LOperand *left, LOperand *right)
Definition: lithium-mips.h:561
virtual void PrintDataTo(StringStream *stream)
Definition: lithium-arm.cc:125
LStoreKeyedFastDoubleElement(LOperand *elements, LOperand *key, LOperand *val)
#define T(name, string, precedence)
Definition: token.cc:48
LToFastProperties(LOperand *value)
LInstanceOf(LOperand *left, LOperand *right)
Definition: lithium-mips.h:802
LStoreKeyedSpecializedArrayElement(LOperand *external_pointer, LOperand *key, LOperand *val)
LCmpMapAndBranch(LOperand *value, LOperand *temp)
Definition: lithium-mips.h:937
LRandom(LOperand *global_object)
virtual bool IsControl() const
Definition: lithium-mips.h:235
LPointerMap * pointer_map() const
Definition: lithium-mips.h:242
LShiftI(Token::Value op, LOperand *left, LOperand *right, bool can_deopt)
Definition: lithium-mips.h:865
Label * GetAssemblyLabel(int block_id) const
int first_instruction_index() const
Definition: hydrogen.h:86
EmbeddedContainer< LOperand *, I > inputs_
Definition: lithium-arm.h:300
LLabel * GetLabel(int block_id) const
virtual bool IsGap() const
Definition: lithium-mips.h:233
HGraph * graph() const
LCheckFunction(LOperand *value)
const ZoneList< Handle< JSFunction > > * inlined_closures() const
LAccessArgumentsAt(LOperand *arguments, LOperand *length, LOperand *index)
Definition: lithium-mips.h:496
LArithmeticT(Token::Value op, LOperand *left, LOperand *right)
virtual void PrintDataTo(StringStream *stream)
Definition: lithium-arm.cc:145
int block_id() const
Definition: lithium-arm.h:369
CompilationInfo * info() const
void set_gap_instructions_size(int gap_instructions_size)
Definition: lithium-arm.h:382
LLoadElements(LOperand *object)
virtual void CompileToNative(LCodeGen *generator)=0
#define DECLARE_HYDROGEN_ACCESSOR(type)
Definition: lithium-mips.h:195
virtual bool IsGap() const
Definition: lithium-mips.h:315
static const int kNumAllocatableRegisters
Definition: assembler-arm.h:74
LTypeof(LOperand *value)
LStringAdd(LOperand *left, LOperand *right)
LCheckMaps(LOperand *value)
Token::Value op() const
LModI(LOperand *left, LOperand *right, LOperand *temp1, LOperand *temp2, LOperand *temp3)
Definition: lithium-mips.h:542
bool IsLoopHeader() const
Definition: hydrogen.h:97
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 trace on stack replacement optimize closures functions with arguments object optimize functions containing for in loops profiler considers IC stability primitive functions trigger their own optimization re try self optimization if it failed insert an interrupt check at function exit execution budget before interrupt is triggered call count before self optimization self_optimization count_based_interrupts weighted_back_edges trace_opt 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 enable use of ARMv7 instructions if enable use of MIPS FPU instructions if NULL
Definition: flags.cc:274
LLoadKeyedFastDoubleElement(LOperand *elements, LOperand *key)
LArithmeticD(Token::Value op, LOperand *left, LOperand *right)
const ZoneList< LPointerMap * > * pointer_maps() const
virtual void PrintDataTo(StringStream *stream)
Definition: lithium-arm.cc:190
LEnvironment * GetDeferredLazyDeoptimizationEnvironment()
Definition: lithium-mips.h:823
void set_replacement(LLabel *label)
Definition: lithium-mips.h:410
LCmpIDAndBranch(LOperand *left, LOperand *right)
Definition: lithium-mips.h:586
LParallelMove * GetParallelMove(InnerPosition pos)
Definition: lithium-mips.h:342
virtual Opcode opcode() const
LInstanceOfKnownGlobal(LOperand *value, LOperand *temp)
Definition: lithium-mips.h:813
LCheckMapValue(LOperand *value, LOperand *map)
LIsSmiAndBranch(LOperand *value)
Definition: lithium-mips.h:689
int block_id() const
Definition: hydrogen.h:61
bool IsRedundant() const
Definition: lithium-arm.cc:134
DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement,"load-keyed-specialized-array-element") LOperand *external_pointer()
int LookupDestination(int block_id) const
LGoto(int block_id)
Definition: lithium-mips.h:362
LCallNew(LOperand *constructor)
LClampIToUint8(LOperand *value)
virtual int InputCount()=0
LIn(LOperand *key, LOperand *object)
static HValue * cast(HValue *value)
LLoadNamedGeneric(LOperand *object)
LTaggedToI(LOperand *value, LOperand *temp1, LOperand *temp2, LOperand *temp3)
DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,"instance-of-known-global") Handle< JSFunction > function() const
Definition: lithium-mips.h:818
HValue * hydrogen_value() const
Definition: lithium-mips.h:246
LPushArgument(LOperand *value)
LStringCompareAndBranch(LOperand *left, LOperand *right)
Definition: lithium-mips.h:717
bool HasReplacement() const
Definition: lithium-mips.h:411
LOperand * object()
LValueOf(LOperand *value, LOperand *temp)
Definition: lithium-mips.h:993
LBitNotI(LOperand *value)
LApplyArguments(LOperand *function, LOperand *receiver, LOperand *length, LOperand *elements)
Definition: lithium-mips.h:475
LModI(LOperand *left, LOperand *right)
Definition: lithium-mips.h:532
LCallFunction(LOperand *function)
LIsNilAndBranch(LOperand *value)
Definition: lithium-mips.h:645
LLoadKeyedGeneric(LOperand *obj, LOperand *key)
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement,"store-keyed-specialized-array-element") LOperand *external_pointer()
LStoreGlobalCell(LOperand *value, LOperand *temp)
LIsUndetectableAndBranch(LOperand *value, LOperand *temp)
Definition: lithium-mips.h:702
const ZoneList< LInstruction * > * instructions() const
LSmiUntag(LOperand *value, bool needs_check)
LLoadKeyedSpecializedArrayElement(LOperand *external_pointer, LOperand *key)
LGap(HBasicBlock *block)
Definition: lithium-mips.h:306
virtual void PrintDataTo(StringStream *stream)
Definition: lithium-arm.cc:348
void AddInlinedClosure(Handle< JSFunction > closure)