Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: src/arm/lithium-arm.h

Issue 7348008: Merge up to 8597 to experimental/gc from the bleeding edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 14 matching lines...) Expand all
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 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. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_ARM_LITHIUM_ARM_H_ 28 #ifndef V8_ARM_LITHIUM_ARM_H_
29 #define V8_ARM_LITHIUM_ARM_H_ 29 #define V8_ARM_LITHIUM_ARM_H_
30 30
31 #include "hydrogen.h" 31 #include "hydrogen.h"
32 #include "lithium-allocator.h" 32 #include "lithium-allocator.h"
33 #include "lithium.h" 33 #include "lithium.h"
34 #include "safepoint-table.h" 34 #include "safepoint-table.h"
35 #include "utils.h"
35 36
36 namespace v8 { 37 namespace v8 {
37 namespace internal { 38 namespace internal {
38 39
39 // Forward declarations. 40 // Forward declarations.
40 class LCodeGen; 41 class LCodeGen;
41 42
42 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \ 43 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \
43 V(ControlInstruction) \ 44 V(ControlInstruction) \
44 V(Call) \ 45 V(Call) \
(...skipping 24 matching lines...) Expand all
69 V(CallStub) \ 70 V(CallStub) \
70 V(CheckFunction) \ 71 V(CheckFunction) \
71 V(CheckInstanceType) \ 72 V(CheckInstanceType) \
72 V(CheckNonSmi) \ 73 V(CheckNonSmi) \
73 V(CheckMap) \ 74 V(CheckMap) \
74 V(CheckPrototypeMaps) \ 75 V(CheckPrototypeMaps) \
75 V(CheckSmi) \ 76 V(CheckSmi) \
76 V(ClampDToUint8) \ 77 V(ClampDToUint8) \
77 V(ClampIToUint8) \ 78 V(ClampIToUint8) \
78 V(ClampTToUint8) \ 79 V(ClampTToUint8) \
79 V(ClassOfTest) \
80 V(ClassOfTestAndBranch) \ 80 V(ClassOfTestAndBranch) \
81 V(CmpID) \ 81 V(CmpConstantEqAndBranch) \
82 V(CmpIDAndBranch) \ 82 V(CmpIDAndBranch) \
83 V(CmpJSObjectEq) \ 83 V(CmpObjectEqAndBranch) \
84 V(CmpJSObjectEqAndBranch) \
85 V(CmpMapAndBranch) \ 84 V(CmpMapAndBranch) \
86 V(CmpSymbolEq) \
87 V(CmpSymbolEqAndBranch) \
88 V(CmpT) \ 85 V(CmpT) \
89 V(CmpTAndBranch) \
90 V(ConstantD) \ 86 V(ConstantD) \
91 V(ConstantI) \ 87 V(ConstantI) \
92 V(ConstantT) \ 88 V(ConstantT) \
93 V(Context) \ 89 V(Context) \
94 V(DeleteProperty) \ 90 V(DeleteProperty) \
95 V(Deoptimize) \ 91 V(Deoptimize) \
96 V(DivI) \ 92 V(DivI) \
97 V(DoubleToI) \ 93 V(DoubleToI) \
94 V(ElementsKind) \
98 V(ExternalArrayLength) \ 95 V(ExternalArrayLength) \
99 V(FixedArrayLength) \ 96 V(FixedArrayLength) \
100 V(FunctionLiteral) \ 97 V(FunctionLiteral) \
101 V(GetCachedArrayIndex) \ 98 V(GetCachedArrayIndex) \
102 V(GlobalObject) \ 99 V(GlobalObject) \
103 V(GlobalReceiver) \ 100 V(GlobalReceiver) \
104 V(Goto) \ 101 V(Goto) \
105 V(HasCachedArrayIndex) \
106 V(HasCachedArrayIndexAndBranch) \ 102 V(HasCachedArrayIndexAndBranch) \
107 V(HasInstanceType) \
108 V(HasInstanceTypeAndBranch) \ 103 V(HasInstanceTypeAndBranch) \
109 V(In) \ 104 V(In) \
110 V(InstanceOf) \ 105 V(InstanceOf) \
111 V(InstanceOfAndBranch) \
112 V(InstanceOfKnownGlobal) \ 106 V(InstanceOfKnownGlobal) \
113 V(InstructionGap) \ 107 V(InstructionGap) \
114 V(Integer32ToDouble) \ 108 V(Integer32ToDouble) \
115 V(InvokeFunction) \ 109 V(InvokeFunction) \
116 V(IsConstructCall) \
117 V(IsConstructCallAndBranch) \ 110 V(IsConstructCallAndBranch) \
118 V(IsNull) \
119 V(IsNullAndBranch) \ 111 V(IsNullAndBranch) \
120 V(IsObject) \
121 V(IsObjectAndBranch) \ 112 V(IsObjectAndBranch) \
122 V(IsSmi) \
123 V(IsSmiAndBranch) \ 113 V(IsSmiAndBranch) \
124 V(IsUndetectable) \
125 V(IsUndetectableAndBranch) \ 114 V(IsUndetectableAndBranch) \
126 V(JSArrayLength) \ 115 V(JSArrayLength) \
127 V(Label) \ 116 V(Label) \
128 V(LazyBailout) \ 117 V(LazyBailout) \
129 V(LoadContextSlot) \ 118 V(LoadContextSlot) \
130 V(LoadElements) \ 119 V(LoadElements) \
131 V(LoadExternalArrayPointer) \ 120 V(LoadExternalArrayPointer) \
132 V(LoadFunctionPrototype) \ 121 V(LoadFunctionPrototype) \
133 V(LoadGlobalCell) \ 122 V(LoadGlobalCell) \
134 V(LoadGlobalGeneric) \ 123 V(LoadGlobalGeneric) \
(...skipping 27 matching lines...) Expand all
162 V(StoreKeyedGeneric) \ 151 V(StoreKeyedGeneric) \
163 V(StoreKeyedSpecializedArrayElement) \ 152 V(StoreKeyedSpecializedArrayElement) \
164 V(StoreNamedField) \ 153 V(StoreNamedField) \
165 V(StoreNamedGeneric) \ 154 V(StoreNamedGeneric) \
166 V(StringAdd) \ 155 V(StringAdd) \
167 V(StringCharCodeAt) \ 156 V(StringCharCodeAt) \
168 V(StringCharFromCode) \ 157 V(StringCharFromCode) \
169 V(StringLength) \ 158 V(StringLength) \
170 V(SubI) \ 159 V(SubI) \
171 V(TaggedToI) \ 160 V(TaggedToI) \
161 V(ThisFunction) \
172 V(Throw) \ 162 V(Throw) \
173 V(ToFastProperties) \ 163 V(ToFastProperties) \
174 V(Typeof) \ 164 V(Typeof) \
175 V(TypeofIs) \
176 V(TypeofIsAndBranch) \ 165 V(TypeofIsAndBranch) \
177 V(UnaryMathOperation) \ 166 V(UnaryMathOperation) \
178 V(UnknownOSRValue) \ 167 V(UnknownOSRValue) \
179 V(ValueOf) 168 V(ValueOf)
180 169
181 170
182 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 171 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
183 virtual Opcode opcode() const { return LInstruction::k##type; } \ 172 virtual Opcode opcode() const { return LInstruction::k##type; } \
184 virtual void CompileToNative(LCodeGen* generator); \ 173 virtual void CompileToNative(LCodeGen* generator); \
185 virtual const char* Mnemonic() const { return mnemonic; } \ 174 virtual const char* Mnemonic() const { return mnemonic; } \
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 #define DECLARE_PREDICATE(type) \ 213 #define DECLARE_PREDICATE(type) \
225 bool Is##type() const { return opcode() == k##type; } 214 bool Is##type() const { return opcode() == k##type; }
226 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE) 215 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE)
227 #undef DECLARE_PREDICATE 216 #undef DECLARE_PREDICATE
228 217
229 // Declare virtual predicates for instructions that don't have 218 // Declare virtual predicates for instructions that don't have
230 // an opcode. 219 // an opcode.
231 virtual bool IsGap() const { return false; } 220 virtual bool IsGap() const { return false; }
232 221
233 virtual bool IsControl() const { return false; } 222 virtual bool IsControl() const { return false; }
234 virtual void SetBranchTargets(int true_block_id, int false_block_id) { }
235 223
236 void set_environment(LEnvironment* env) { environment_ = env; } 224 void set_environment(LEnvironment* env) { environment_ = env; }
237 LEnvironment* environment() const { return environment_; } 225 LEnvironment* environment() const { return environment_; }
238 bool HasEnvironment() const { return environment_ != NULL; } 226 bool HasEnvironment() const { return environment_ != NULL; }
239 227
240 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } 228 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); }
241 LPointerMap* pointer_map() const { return pointer_map_.get(); } 229 LPointerMap* pointer_map() const { return pointer_map_.get(); }
242 bool HasPointerMap() const { return pointer_map_.is_set(); } 230 bool HasPointerMap() const { return pointer_map_.is_set(); }
243 231
244 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } 232 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 private: 267 private:
280 LEnvironment* environment_; 268 LEnvironment* environment_;
281 SetOncePointer<LPointerMap> pointer_map_; 269 SetOncePointer<LPointerMap> pointer_map_;
282 HValue* hydrogen_value_; 270 HValue* hydrogen_value_;
283 SetOncePointer<LEnvironment> deoptimization_environment_; 271 SetOncePointer<LEnvironment> deoptimization_environment_;
284 bool is_call_; 272 bool is_call_;
285 bool is_save_doubles_; 273 bool is_save_doubles_;
286 }; 274 };
287 275
288 276
289 template<typename ElementType, int NumElements>
290 class OperandContainer {
291 public:
292 OperandContainer() {
293 for (int i = 0; i < NumElements; i++) elems_[i] = NULL;
294 }
295 int length() { return NumElements; }
296 ElementType& operator[](int i) {
297 ASSERT(i < length());
298 return elems_[i];
299 }
300 void PrintOperandsTo(StringStream* stream);
301
302 private:
303 ElementType elems_[NumElements];
304 };
305
306
307 template<typename ElementType>
308 class OperandContainer<ElementType, 0> {
309 public:
310 int length() { return 0; }
311 void PrintOperandsTo(StringStream* stream) { }
312 ElementType& operator[](int i) {
313 UNREACHABLE();
314 static ElementType t = 0;
315 return t;
316 }
317 };
318
319
320 // R = number of result operands (0 or 1). 277 // R = number of result operands (0 or 1).
321 // I = number of input operands. 278 // I = number of input operands.
322 // T = number of temporary operands. 279 // T = number of temporary operands.
323 template<int R, int I, int T> 280 template<int R, int I, int T>
324 class LTemplateInstruction: public LInstruction { 281 class LTemplateInstruction: public LInstruction {
325 public: 282 public:
326 // Allow 0 or 1 output operands. 283 // Allow 0 or 1 output operands.
327 STATIC_ASSERT(R == 0 || R == 1); 284 STATIC_ASSERT(R == 0 || R == 1);
328 virtual bool HasResult() const { return R != 0; } 285 virtual bool HasResult() const { return R != 0; }
329 void set_result(LOperand* operand) { results_[0] = operand; } 286 void set_result(LOperand* operand) { results_[0] = operand; }
330 LOperand* result() { return results_[0]; } 287 LOperand* result() { return results_[0]; }
331 288
332 int InputCount() { return I; } 289 int InputCount() { return I; }
333 LOperand* InputAt(int i) { return inputs_[i]; } 290 LOperand* InputAt(int i) { return inputs_[i]; }
334 291
335 int TempCount() { return T; } 292 int TempCount() { return T; }
336 LOperand* TempAt(int i) { return temps_[i]; } 293 LOperand* TempAt(int i) { return temps_[i]; }
337 294
338 virtual void PrintDataTo(StringStream* stream); 295 virtual void PrintDataTo(StringStream* stream);
339 virtual void PrintOutputOperandTo(StringStream* stream); 296 virtual void PrintOutputOperandTo(StringStream* stream);
340 297
341 protected: 298 protected:
342 OperandContainer<LOperand*, R> results_; 299 EmbeddedContainer<LOperand*, R> results_;
343 OperandContainer<LOperand*, I> inputs_; 300 EmbeddedContainer<LOperand*, I> inputs_;
344 OperandContainer<LOperand*, T> temps_; 301 EmbeddedContainer<LOperand*, T> temps_;
345 }; 302 };
346 303
347 304
348 class LGap: public LTemplateInstruction<0, 0, 0> { 305 class LGap: public LTemplateInstruction<0, 0, 0> {
349 public: 306 public:
350 explicit LGap(HBasicBlock* block) 307 explicit LGap(HBasicBlock* block)
351 : block_(block) { 308 : block_(block) {
352 parallel_moves_[BEFORE] = NULL; 309 parallel_moves_[BEFORE] = NULL;
353 parallel_moves_[START] = NULL; 310 parallel_moves_[START] = NULL;
354 parallel_moves_[END] = NULL; 311 parallel_moves_[END] = NULL;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 class LInstructionGap: public LGap { 351 class LInstructionGap: public LGap {
395 public: 352 public:
396 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } 353 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
397 354
398 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") 355 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap")
399 }; 356 };
400 357
401 358
402 class LGoto: public LTemplateInstruction<0, 0, 0> { 359 class LGoto: public LTemplateInstruction<0, 0, 0> {
403 public: 360 public:
404 LGoto(int block_id, bool include_stack_check = false) 361 explicit LGoto(int block_id) : block_id_(block_id) { }
405 : block_id_(block_id), include_stack_check_(include_stack_check) { }
406 362
407 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") 363 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
408 virtual void PrintDataTo(StringStream* stream); 364 virtual void PrintDataTo(StringStream* stream);
409 virtual bool IsControl() const { return true; } 365 virtual bool IsControl() const { return true; }
410 366
411 int block_id() const { return block_id_; } 367 int block_id() const { return block_id_; }
412 bool include_stack_check() const { return include_stack_check_; }
413 368
414 private: 369 private:
415 int block_id_; 370 int block_id_;
416 bool include_stack_check_;
417 }; 371 };
418 372
419 373
420 class LLazyBailout: public LTemplateInstruction<0, 0, 0> { 374 class LLazyBailout: public LTemplateInstruction<0, 0, 0> {
421 public: 375 public:
422 LLazyBailout() : gap_instructions_size_(0) { } 376 LLazyBailout() : gap_instructions_size_(0) { }
423 377
424 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout") 378 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout")
425 379
426 void set_gap_instructions_size(int gap_instructions_size) { 380 void set_gap_instructions_size(int gap_instructions_size) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 public: 436 public:
483 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") 437 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
484 }; 438 };
485 439
486 440
487 template<int I, int T> 441 template<int I, int T>
488 class LControlInstruction: public LTemplateInstruction<0, I, T> { 442 class LControlInstruction: public LTemplateInstruction<0, I, T> {
489 public: 443 public:
490 virtual bool IsControl() const { return true; } 444 virtual bool IsControl() const { return true; }
491 445
492 int true_block_id() const { return true_block_id_; } 446 int SuccessorCount() { return hydrogen()->SuccessorCount(); }
493 int false_block_id() const { return false_block_id_; } 447 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
494 void SetBranchTargets(int true_block_id, int false_block_id) { 448 int true_block_id() { return hydrogen()->SuccessorAt(0)->block_id(); }
495 true_block_id_ = true_block_id; 449 int false_block_id() { return hydrogen()->SuccessorAt(1)->block_id(); }
496 false_block_id_ = false_block_id;
497 }
498 450
499 private: 451 private:
500 int true_block_id_; 452 HControlInstruction* hydrogen() {
501 int false_block_id_; 453 return HControlInstruction::cast(this->hydrogen_value());
454 }
502 }; 455 };
503 456
504 457
505 class LApplyArguments: public LTemplateInstruction<1, 4, 0> { 458 class LApplyArguments: public LTemplateInstruction<1, 4, 0> {
506 public: 459 public:
507 LApplyArguments(LOperand* function, 460 LApplyArguments(LOperand* function,
508 LOperand* receiver, 461 LOperand* receiver,
509 LOperand* length, 462 LOperand* length,
510 LOperand* elements) { 463 LOperand* elements) {
511 inputs_[0] = function; 464 inputs_[0] = function;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 inputs_[0] = left; 560 inputs_[0] = left;
608 inputs_[1] = right; 561 inputs_[1] = right;
609 temps_[0] = temp; 562 temps_[0] = temp;
610 } 563 }
611 564
612 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") 565 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i")
613 DECLARE_HYDROGEN_ACCESSOR(Mul) 566 DECLARE_HYDROGEN_ACCESSOR(Mul)
614 }; 567 };
615 568
616 569
617 class LCmpID: public LTemplateInstruction<1, 2, 0> {
618 public:
619 LCmpID(LOperand* left, LOperand* right) {
620 inputs_[0] = left;
621 inputs_[1] = right;
622 }
623
624 DECLARE_CONCRETE_INSTRUCTION(CmpID, "cmp-id")
625 DECLARE_HYDROGEN_ACCESSOR(Compare)
626
627 Token::Value op() const { return hydrogen()->token(); }
628 bool is_double() const {
629 return hydrogen()->GetInputRepresentation().IsDouble();
630 }
631 };
632
633
634 class LCmpIDAndBranch: public LControlInstruction<2, 0> { 570 class LCmpIDAndBranch: public LControlInstruction<2, 0> {
635 public: 571 public:
636 LCmpIDAndBranch(LOperand* left, LOperand* right) { 572 LCmpIDAndBranch(LOperand* left, LOperand* right) {
637 inputs_[0] = left; 573 inputs_[0] = left;
638 inputs_[1] = right; 574 inputs_[1] = right;
639 } 575 }
640 576
641 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch") 577 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch")
642 DECLARE_HYDROGEN_ACCESSOR(Compare) 578 DECLARE_HYDROGEN_ACCESSOR(CompareIDAndBranch)
643 579
644 Token::Value op() const { return hydrogen()->token(); } 580 Token::Value op() const { return hydrogen()->token(); }
645 bool is_double() const { 581 bool is_double() const {
646 return hydrogen()->GetInputRepresentation().IsDouble(); 582 return hydrogen()->GetInputRepresentation().IsDouble();
647 } 583 }
648 584
649 virtual void PrintDataTo(StringStream* stream); 585 virtual void PrintDataTo(StringStream* stream);
650 }; 586 };
651 587
652 588
653 class LUnaryMathOperation: public LTemplateInstruction<1, 1, 1> { 589 class LUnaryMathOperation: public LTemplateInstruction<1, 1, 1> {
654 public: 590 public:
655 LUnaryMathOperation(LOperand* value, LOperand* temp) { 591 LUnaryMathOperation(LOperand* value, LOperand* temp) {
656 inputs_[0] = value; 592 inputs_[0] = value;
657 temps_[0] = temp; 593 temps_[0] = temp;
658 } 594 }
659 595
660 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation") 596 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation")
661 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 597 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
662 598
663 virtual void PrintDataTo(StringStream* stream); 599 virtual void PrintDataTo(StringStream* stream);
664 BuiltinFunctionId op() const { return hydrogen()->op(); } 600 BuiltinFunctionId op() const { return hydrogen()->op(); }
665 }; 601 };
666 602
667 603
668 class LCmpJSObjectEq: public LTemplateInstruction<1, 2, 0> { 604 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> {
669 public: 605 public:
670 LCmpJSObjectEq(LOperand* left, LOperand* right) { 606 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) {
671 inputs_[0] = left; 607 inputs_[0] = left;
672 inputs_[1] = right; 608 inputs_[1] = right;
673 } 609 }
674 610
675 DECLARE_CONCRETE_INSTRUCTION(CmpJSObjectEq, "cmp-jsobject-eq") 611 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch,
612 "cmp-object-eq-and-branch")
613 DECLARE_HYDROGEN_ACCESSOR(CompareObjectEqAndBranch)
676 }; 614 };
677 615
678 616
679 class LCmpJSObjectEqAndBranch: public LControlInstruction<2, 0> { 617 class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> {
680 public: 618 public:
681 LCmpJSObjectEqAndBranch(LOperand* left, LOperand* right) { 619 explicit LCmpConstantEqAndBranch(LOperand* left) {
682 inputs_[0] = left; 620 inputs_[0] = left;
683 inputs_[1] = right;
684 } 621 }
685 622
686 DECLARE_CONCRETE_INSTRUCTION(CmpJSObjectEqAndBranch, 623 DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch,
687 "cmp-jsobject-eq-and-branch") 624 "cmp-constant-eq-and-branch")
625 DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch)
688 }; 626 };
689 627
690 628
691 class LCmpSymbolEq: public LTemplateInstruction<1, 2, 0> {
692 public:
693 LCmpSymbolEq(LOperand* left, LOperand* right) {
694 inputs_[0] = left;
695 inputs_[1] = right;
696 }
697
698 DECLARE_CONCRETE_INSTRUCTION(CmpSymbolEq, "cmp-symbol-eq")
699 };
700
701
702 class LCmpSymbolEqAndBranch: public LControlInstruction<2, 0> {
703 public:
704 LCmpSymbolEqAndBranch(LOperand* left, LOperand* right) {
705 inputs_[0] = left;
706 inputs_[1] = right;
707 }
708
709 DECLARE_CONCRETE_INSTRUCTION(CmpSymbolEqAndBranch, "cmp-symbol-eq-and-branch")
710 };
711
712
713 class LIsNull: public LTemplateInstruction<1, 1, 0> {
714 public:
715 explicit LIsNull(LOperand* value) {
716 inputs_[0] = value;
717 }
718
719 DECLARE_CONCRETE_INSTRUCTION(IsNull, "is-null")
720 DECLARE_HYDROGEN_ACCESSOR(IsNull)
721
722 bool is_strict() const { return hydrogen()->is_strict(); }
723 };
724
725 class LIsNullAndBranch: public LControlInstruction<1, 0> { 629 class LIsNullAndBranch: public LControlInstruction<1, 0> {
726 public: 630 public:
727 explicit LIsNullAndBranch(LOperand* value) { 631 explicit LIsNullAndBranch(LOperand* value) {
728 inputs_[0] = value; 632 inputs_[0] = value;
729 } 633 }
730 634
731 DECLARE_CONCRETE_INSTRUCTION(IsNullAndBranch, "is-null-and-branch") 635 DECLARE_CONCRETE_INSTRUCTION(IsNullAndBranch, "is-null-and-branch")
732 DECLARE_HYDROGEN_ACCESSOR(IsNull) 636 DECLARE_HYDROGEN_ACCESSOR(IsNullAndBranch)
733 637
734 bool is_strict() const { return hydrogen()->is_strict(); } 638 bool is_strict() const { return hydrogen()->is_strict(); }
735 639
736 virtual void PrintDataTo(StringStream* stream); 640 virtual void PrintDataTo(StringStream* stream);
737 }; 641 };
738 642
739 643
740 class LIsObject: public LTemplateInstruction<1, 1, 1> { 644 class LIsObjectAndBranch: public LControlInstruction<1, 1> {
741 public:
742 explicit LIsObject(LOperand* value) {
743 inputs_[0] = value;
744 }
745
746 DECLARE_CONCRETE_INSTRUCTION(IsObject, "is-object")
747 };
748
749
750 class LIsObjectAndBranch: public LControlInstruction<1, 2> {
751 public: 645 public:
752 LIsObjectAndBranch(LOperand* value, LOperand* temp) { 646 LIsObjectAndBranch(LOperand* value, LOperand* temp) {
753 inputs_[0] = value; 647 inputs_[0] = value;
754 temps_[0] = temp; 648 temps_[0] = temp;
755 } 649 }
756 650
757 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") 651 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
652 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
758 653
759 virtual void PrintDataTo(StringStream* stream); 654 virtual void PrintDataTo(StringStream* stream);
760 }; 655 };
761 656
762 657
763 class LIsSmi: public LTemplateInstruction<1, 1, 0> {
764 public:
765 explicit LIsSmi(LOperand* value) {
766 inputs_[0] = value;
767 }
768
769 DECLARE_CONCRETE_INSTRUCTION(IsSmi, "is-smi")
770 DECLARE_HYDROGEN_ACCESSOR(IsSmi)
771 };
772
773
774 class LIsSmiAndBranch: public LControlInstruction<1, 0> { 658 class LIsSmiAndBranch: public LControlInstruction<1, 0> {
775 public: 659 public:
776 explicit LIsSmiAndBranch(LOperand* value) { 660 explicit LIsSmiAndBranch(LOperand* value) {
777 inputs_[0] = value; 661 inputs_[0] = value;
778 } 662 }
779 663
780 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") 664 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
665 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
781 666
782 virtual void PrintDataTo(StringStream* stream); 667 virtual void PrintDataTo(StringStream* stream);
783 }; 668 };
784 669
785 670
786 class LIsUndetectable: public LTemplateInstruction<1, 1, 0> {
787 public:
788 explicit LIsUndetectable(LOperand* value) {
789 inputs_[0] = value;
790 }
791
792 DECLARE_CONCRETE_INSTRUCTION(IsUndetectable, "is-undetectable")
793 DECLARE_HYDROGEN_ACCESSOR(IsUndetectable)
794 };
795
796
797 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { 671 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> {
798 public: 672 public:
799 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { 673 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) {
800 inputs_[0] = value; 674 inputs_[0] = value;
801 temps_[0] = temp; 675 temps_[0] = temp;
802 } 676 }
803 677
804 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, 678 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch,
805 "is-undetectable-and-branch") 679 "is-undetectable-and-branch")
680 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
806 681
807 virtual void PrintDataTo(StringStream* stream); 682 virtual void PrintDataTo(StringStream* stream);
808 }; 683 };
809 684
810 685
811 class LHasInstanceType: public LTemplateInstruction<1, 1, 0> {
812 public:
813 explicit LHasInstanceType(LOperand* value) {
814 inputs_[0] = value;
815 }
816
817 DECLARE_CONCRETE_INSTRUCTION(HasInstanceType, "has-instance-type")
818 DECLARE_HYDROGEN_ACCESSOR(HasInstanceType)
819 };
820
821
822 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> { 686 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> {
823 public: 687 public:
824 explicit LHasInstanceTypeAndBranch(LOperand* value) { 688 explicit LHasInstanceTypeAndBranch(LOperand* value) {
825 inputs_[0] = value; 689 inputs_[0] = value;
826 } 690 }
827 691
828 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, 692 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch,
829 "has-instance-type-and-branch") 693 "has-instance-type-and-branch")
830 DECLARE_HYDROGEN_ACCESSOR(HasInstanceType) 694 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
831 695
832 virtual void PrintDataTo(StringStream* stream); 696 virtual void PrintDataTo(StringStream* stream);
833 }; 697 };
834 698
835 699
836 class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { 700 class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> {
837 public: 701 public:
838 explicit LGetCachedArrayIndex(LOperand* value) { 702 explicit LGetCachedArrayIndex(LOperand* value) {
839 inputs_[0] = value; 703 inputs_[0] = value;
840 } 704 }
841 705
842 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") 706 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index")
843 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) 707 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex)
844 }; 708 };
845 709
846 710
847 class LHasCachedArrayIndex: public LTemplateInstruction<1, 1, 0> {
848 public:
849 explicit LHasCachedArrayIndex(LOperand* value) {
850 inputs_[0] = value;
851 }
852
853 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndex, "has-cached-array-index")
854 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndex)
855 };
856
857
858 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { 711 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> {
859 public: 712 public:
860 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { 713 explicit LHasCachedArrayIndexAndBranch(LOperand* value) {
861 inputs_[0] = value; 714 inputs_[0] = value;
862 } 715 }
863 716
864 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, 717 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch,
865 "has-cached-array-index-and-branch") 718 "has-cached-array-index-and-branch")
866 virtual void PrintDataTo(StringStream* stream); 719 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
867 };
868
869
870 class LClassOfTest: public LTemplateInstruction<1, 1, 0> {
871 public:
872 explicit LClassOfTest(LOperand* value) {
873 inputs_[0] = value;
874 }
875
876 DECLARE_CONCRETE_INSTRUCTION(ClassOfTest, "class-of-test")
877 DECLARE_HYDROGEN_ACCESSOR(ClassOfTest)
878 720
879 virtual void PrintDataTo(StringStream* stream); 721 virtual void PrintDataTo(StringStream* stream);
880 }; 722 };
881 723
882 724
883 class LClassOfTestAndBranch: public LControlInstruction<1, 1> { 725 class LClassOfTestAndBranch: public LControlInstruction<1, 1> {
884 public: 726 public:
885 LClassOfTestAndBranch(LOperand* value, LOperand* temp) { 727 LClassOfTestAndBranch(LOperand* value, LOperand* temp) {
886 inputs_[0] = value; 728 inputs_[0] = value;
887 temps_[0] = temp; 729 temps_[0] = temp;
888 } 730 }
889 731
890 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, 732 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch,
891 "class-of-test-and-branch") 733 "class-of-test-and-branch")
892 DECLARE_HYDROGEN_ACCESSOR(ClassOfTest) 734 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
893 735
894 virtual void PrintDataTo(StringStream* stream); 736 virtual void PrintDataTo(StringStream* stream);
895 }; 737 };
896 738
897 739
898 class LCmpT: public LTemplateInstruction<1, 2, 0> { 740 class LCmpT: public LTemplateInstruction<1, 2, 0> {
899 public: 741 public:
900 LCmpT(LOperand* left, LOperand* right) { 742 LCmpT(LOperand* left, LOperand* right) {
901 inputs_[0] = left; 743 inputs_[0] = left;
902 inputs_[1] = right; 744 inputs_[1] = right;
903 } 745 }
904 746
905 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") 747 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t")
906 DECLARE_HYDROGEN_ACCESSOR(Compare) 748 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric)
907
908 Token::Value op() const { return hydrogen()->token(); }
909 };
910
911
912 class LCmpTAndBranch: public LControlInstruction<2, 0> {
913 public:
914 LCmpTAndBranch(LOperand* left, LOperand* right) {
915 inputs_[0] = left;
916 inputs_[1] = right;
917 }
918
919 DECLARE_CONCRETE_INSTRUCTION(CmpTAndBranch, "cmp-t-and-branch")
920 DECLARE_HYDROGEN_ACCESSOR(Compare)
921 749
922 Token::Value op() const { return hydrogen()->token(); } 750 Token::Value op() const { return hydrogen()->token(); }
923 }; 751 };
924 752
925 753
926 class LInstanceOf: public LTemplateInstruction<1, 2, 0> { 754 class LInstanceOf: public LTemplateInstruction<1, 2, 0> {
927 public: 755 public:
928 LInstanceOf(LOperand* left, LOperand* right) { 756 LInstanceOf(LOperand* left, LOperand* right) {
929 inputs_[0] = left; 757 inputs_[0] = left;
930 inputs_[1] = right; 758 inputs_[1] = right;
931 } 759 }
932 760
933 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") 761 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of")
934 }; 762 };
935 763
936 764
937 class LInstanceOfAndBranch: public LControlInstruction<2, 0> {
938 public:
939 LInstanceOfAndBranch(LOperand* left, LOperand* right) {
940 inputs_[0] = left;
941 inputs_[1] = right;
942 }
943
944 DECLARE_CONCRETE_INSTRUCTION(InstanceOfAndBranch, "instance-of-and-branch")
945 };
946
947
948 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { 765 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> {
949 public: 766 public:
950 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { 767 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) {
951 inputs_[0] = value; 768 inputs_[0] = value;
952 temps_[0] = temp; 769 temps_[0] = temp;
953 } 770 }
954 771
955 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, 772 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
956 "instance-of-known-global") 773 "instance-of-known-global")
957 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) 774 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 }; 867 };
1051 868
1052 869
1053 class LBranch: public LControlInstruction<1, 0> { 870 class LBranch: public LControlInstruction<1, 0> {
1054 public: 871 public:
1055 explicit LBranch(LOperand* value) { 872 explicit LBranch(LOperand* value) {
1056 inputs_[0] = value; 873 inputs_[0] = value;
1057 } 874 }
1058 875
1059 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") 876 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
1060 DECLARE_HYDROGEN_ACCESSOR(Value) 877 DECLARE_HYDROGEN_ACCESSOR(Branch)
1061 878
1062 virtual void PrintDataTo(StringStream* stream); 879 virtual void PrintDataTo(StringStream* stream);
1063 }; 880 };
1064 881
1065 882
1066 class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 1> { 883 class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 1> {
1067 public: 884 public:
1068 LCmpMapAndBranch(LOperand* value, LOperand* temp) { 885 LCmpMapAndBranch(LOperand* value, LOperand* temp) {
1069 inputs_[0] = value; 886 inputs_[0] = value;
1070 temps_[0] = temp; 887 temps_[0] = temp;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 public: 928 public:
1112 explicit LFixedArrayLength(LOperand* value) { 929 explicit LFixedArrayLength(LOperand* value) {
1113 inputs_[0] = value; 930 inputs_[0] = value;
1114 } 931 }
1115 932
1116 DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed-array-length") 933 DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed-array-length")
1117 DECLARE_HYDROGEN_ACCESSOR(FixedArrayLength) 934 DECLARE_HYDROGEN_ACCESSOR(FixedArrayLength)
1118 }; 935 };
1119 936
1120 937
938 class LElementsKind: public LTemplateInstruction<1, 1, 0> {
939 public:
940 explicit LElementsKind(LOperand* value) {
941 inputs_[0] = value;
942 }
943
944 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind")
945 DECLARE_HYDROGEN_ACCESSOR(ElementsKind)
946 };
947
948
1121 class LValueOf: public LTemplateInstruction<1, 1, 1> { 949 class LValueOf: public LTemplateInstruction<1, 1, 1> {
1122 public: 950 public:
1123 LValueOf(LOperand* value, LOperand* temp) { 951 LValueOf(LOperand* value, LOperand* temp) {
1124 inputs_[0] = value; 952 inputs_[0] = value;
1125 temps_[0] = temp; 953 temps_[0] = temp;
1126 } 954 }
1127 955
1128 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") 956 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of")
1129 DECLARE_HYDROGEN_ACCESSOR(ValueOf) 957 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
1130 }; 958 };
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 inputs_[0] = external_pointer; 1144 inputs_[0] = external_pointer;
1317 inputs_[1] = key; 1145 inputs_[1] = key;
1318 } 1146 }
1319 1147
1320 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement, 1148 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement,
1321 "load-keyed-specialized-array-element") 1149 "load-keyed-specialized-array-element")
1322 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement) 1150 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement)
1323 1151
1324 LOperand* external_pointer() { return inputs_[0]; } 1152 LOperand* external_pointer() { return inputs_[0]; }
1325 LOperand* key() { return inputs_[1]; } 1153 LOperand* key() { return inputs_[1]; }
1326 ExternalArrayType array_type() const { 1154 JSObject::ElementsKind elements_kind() const {
1327 return hydrogen()->array_type(); 1155 return hydrogen()->elements_kind();
1328 } 1156 }
1329 }; 1157 };
1330 1158
1331 1159
1332 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { 1160 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> {
1333 public: 1161 public:
1334 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { 1162 LLoadKeyedGeneric(LOperand* obj, LOperand* key) {
1335 inputs_[0] = obj; 1163 inputs_[0] = obj;
1336 inputs_[1] = key; 1164 inputs_[1] = key;
1337 } 1165 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 class LPushArgument: public LTemplateInstruction<0, 1, 0> { 1261 class LPushArgument: public LTemplateInstruction<0, 1, 0> {
1434 public: 1262 public:
1435 explicit LPushArgument(LOperand* value) { 1263 explicit LPushArgument(LOperand* value) {
1436 inputs_[0] = value; 1264 inputs_[0] = value;
1437 } 1265 }
1438 1266
1439 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") 1267 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument")
1440 }; 1268 };
1441 1269
1442 1270
1271 class LThisFunction: public LTemplateInstruction<1, 0, 0> {
1272 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
1273 };
1274
1275
1443 class LContext: public LTemplateInstruction<1, 0, 0> { 1276 class LContext: public LTemplateInstruction<1, 0, 0> {
1444 public: 1277 public:
1445 DECLARE_CONCRETE_INSTRUCTION(Context, "context") 1278 DECLARE_CONCRETE_INSTRUCTION(Context, "context")
1446 }; 1279 };
1447 1280
1448 1281
1449 class LOuterContext: public LTemplateInstruction<1, 1, 0> { 1282 class LOuterContext: public LTemplateInstruction<1, 1, 0> {
1450 public: 1283 public:
1451 explicit LOuterContext(LOperand* context) { 1284 explicit LOuterContext(LOperand* context) {
1452 inputs_[0] = context; 1285 inputs_[0] = context;
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 // Sometimes truncating conversion from a tagged value to an int32. 1465 // Sometimes truncating conversion from a tagged value to an int32.
1633 class LDoubleToI: public LTemplateInstruction<1, 1, 2> { 1466 class LDoubleToI: public LTemplateInstruction<1, 1, 2> {
1634 public: 1467 public:
1635 LDoubleToI(LOperand* value, LOperand* temp1, LOperand* temp2) { 1468 LDoubleToI(LOperand* value, LOperand* temp1, LOperand* temp2) {
1636 inputs_[0] = value; 1469 inputs_[0] = value;
1637 temps_[0] = temp1; 1470 temps_[0] = temp1;
1638 temps_[1] = temp2; 1471 temps_[1] = temp2;
1639 } 1472 }
1640 1473
1641 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i") 1474 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i")
1642 DECLARE_HYDROGEN_ACCESSOR(Change) 1475 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
1643 1476
1644 bool truncating() { return hydrogen()->CanTruncateToInt32(); } 1477 bool truncating() { return hydrogen()->CanTruncateToInt32(); }
1645 }; 1478 };
1646 1479
1647 1480
1648 // Truncating conversion from a tagged value to an int32. 1481 // Truncating conversion from a tagged value to an int32.
1649 class LTaggedToI: public LTemplateInstruction<1, 1, 3> { 1482 class LTaggedToI: public LTemplateInstruction<1, 1, 3> {
1650 public: 1483 public:
1651 LTaggedToI(LOperand* value, 1484 LTaggedToI(LOperand* value,
1652 LOperand* temp1, 1485 LOperand* temp1,
1653 LOperand* temp2, 1486 LOperand* temp2,
1654 LOperand* temp3) { 1487 LOperand* temp3) {
1655 inputs_[0] = value; 1488 inputs_[0] = value;
1656 temps_[0] = temp1; 1489 temps_[0] = temp1;
1657 temps_[1] = temp2; 1490 temps_[1] = temp2;
1658 temps_[2] = temp3; 1491 temps_[2] = temp3;
1659 } 1492 }
1660 1493
1661 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") 1494 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i")
1662 DECLARE_HYDROGEN_ACCESSOR(Change) 1495 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
1663 1496
1664 bool truncating() { return hydrogen()->CanTruncateToInt32(); } 1497 bool truncating() { return hydrogen()->CanTruncateToInt32(); }
1665 }; 1498 };
1666 1499
1667 1500
1668 class LSmiTag: public LTemplateInstruction<1, 1, 0> { 1501 class LSmiTag: public LTemplateInstruction<1, 1, 0> {
1669 public: 1502 public:
1670 explicit LSmiTag(LOperand* value) { 1503 explicit LSmiTag(LOperand* value) {
1671 inputs_[0] = value; 1504 inputs_[0] = value;
1672 } 1505 }
1673 1506
1674 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") 1507 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag")
1675 }; 1508 };
1676 1509
1677 1510
1678 class LNumberUntagD: public LTemplateInstruction<1, 1, 0> { 1511 class LNumberUntagD: public LTemplateInstruction<1, 1, 0> {
1679 public: 1512 public:
1680 explicit LNumberUntagD(LOperand* value) { 1513 explicit LNumberUntagD(LOperand* value) {
1681 inputs_[0] = value; 1514 inputs_[0] = value;
1682 } 1515 }
1683 1516
1684 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") 1517 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag")
1518 DECLARE_HYDROGEN_ACCESSOR(Change)
1685 }; 1519 };
1686 1520
1687 1521
1688 class LSmiUntag: public LTemplateInstruction<1, 1, 0> { 1522 class LSmiUntag: public LTemplateInstruction<1, 1, 0> {
1689 public: 1523 public:
1690 LSmiUntag(LOperand* value, bool needs_check) 1524 LSmiUntag(LOperand* value, bool needs_check)
1691 : needs_check_(needs_check) { 1525 : needs_check_(needs_check) {
1692 inputs_[0] = value; 1526 inputs_[0] = value;
1693 } 1527 }
1694 1528
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1792 inputs_[2] = val; 1626 inputs_[2] = val;
1793 } 1627 }
1794 1628
1795 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement, 1629 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement,
1796 "store-keyed-specialized-array-element") 1630 "store-keyed-specialized-array-element")
1797 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement) 1631 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement)
1798 1632
1799 LOperand* external_pointer() { return inputs_[0]; } 1633 LOperand* external_pointer() { return inputs_[0]; }
1800 LOperand* key() { return inputs_[1]; } 1634 LOperand* key() { return inputs_[1]; }
1801 LOperand* value() { return inputs_[2]; } 1635 LOperand* value() { return inputs_[2]; }
1802 ExternalArrayType array_type() const { 1636 JSObject::ElementsKind elements_kind() const {
1803 return hydrogen()->array_type(); 1637 return hydrogen()->elements_kind();
1804 } 1638 }
1805 }; 1639 };
1806 1640
1807 1641
1808 class LStringAdd: public LTemplateInstruction<1, 2, 0> { 1642 class LStringAdd: public LTemplateInstruction<1, 2, 0> {
1809 public: 1643 public:
1810 LStringAdd(LOperand* left, LOperand* right) { 1644 LStringAdd(LOperand* left, LOperand* right) {
1811 inputs_[0] = left; 1645 inputs_[0] = left;
1812 inputs_[1] = right; 1646 inputs_[1] = right;
1813 } 1647 }
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 class LTypeof: public LTemplateInstruction<1, 1, 0> { 1846 class LTypeof: public LTemplateInstruction<1, 1, 0> {
2013 public: 1847 public:
2014 explicit LTypeof(LOperand* value) { 1848 explicit LTypeof(LOperand* value) {
2015 inputs_[0] = value; 1849 inputs_[0] = value;
2016 } 1850 }
2017 1851
2018 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") 1852 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof")
2019 }; 1853 };
2020 1854
2021 1855
2022 class LTypeofIs: public LTemplateInstruction<1, 1, 0> {
2023 public:
2024 explicit LTypeofIs(LOperand* value) {
2025 inputs_[0] = value;
2026 }
2027
2028 DECLARE_CONCRETE_INSTRUCTION(TypeofIs, "typeof-is")
2029 DECLARE_HYDROGEN_ACCESSOR(TypeofIs)
2030
2031 Handle<String> type_literal() { return hydrogen()->type_literal(); }
2032
2033 virtual void PrintDataTo(StringStream* stream);
2034 };
2035
2036
2037 class LTypeofIsAndBranch: public LControlInstruction<1, 0> { 1856 class LTypeofIsAndBranch: public LControlInstruction<1, 0> {
2038 public: 1857 public:
2039 explicit LTypeofIsAndBranch(LOperand* value) { 1858 explicit LTypeofIsAndBranch(LOperand* value) {
2040 inputs_[0] = value; 1859 inputs_[0] = value;
2041 } 1860 }
2042 1861
2043 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") 1862 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch")
2044 DECLARE_HYDROGEN_ACCESSOR(TypeofIs) 1863 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch)
2045 1864
2046 Handle<String> type_literal() { return hydrogen()->type_literal(); } 1865 Handle<String> type_literal() { return hydrogen()->type_literal(); }
2047 1866
2048 virtual void PrintDataTo(StringStream* stream); 1867 virtual void PrintDataTo(StringStream* stream);
2049 }; 1868 };
2050 1869
2051 1870
2052 class LIsConstructCall: public LTemplateInstruction<1, 0, 0> {
2053 public:
2054 DECLARE_CONCRETE_INSTRUCTION(IsConstructCall, "is-construct-call")
2055 DECLARE_HYDROGEN_ACCESSOR(IsConstructCall)
2056 };
2057
2058
2059 class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { 1871 class LIsConstructCallAndBranch: public LControlInstruction<0, 1> {
2060 public: 1872 public:
2061 explicit LIsConstructCallAndBranch(LOperand* temp) { 1873 explicit LIsConstructCallAndBranch(LOperand* temp) {
2062 temps_[0] = temp; 1874 temps_[0] = temp;
2063 } 1875 }
2064 1876
2065 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, 1877 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch,
2066 "is-construct-call-and-branch") 1878 "is-construct-call-and-branch")
2067 }; 1879 };
2068 1880
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
2100 // NULL if the register has no assigned spill slot. Indexed by allocation 1912 // NULL if the register has no assigned spill slot. Indexed by allocation
2101 // index. 1913 // index.
2102 LOperand* register_spills_[Register::kNumAllocatableRegisters]; 1914 LOperand* register_spills_[Register::kNumAllocatableRegisters];
2103 LOperand* double_register_spills_[DoubleRegister::kNumAllocatableRegisters]; 1915 LOperand* double_register_spills_[DoubleRegister::kNumAllocatableRegisters];
2104 }; 1916 };
2105 1917
2106 1918
2107 class LStackCheck: public LTemplateInstruction<0, 0, 0> { 1919 class LStackCheck: public LTemplateInstruction<0, 0, 0> {
2108 public: 1920 public:
2109 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") 1921 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check")
1922 DECLARE_HYDROGEN_ACCESSOR(StackCheck)
1923
1924 Label* done_label() { return &done_label_; }
1925
1926 private:
1927 Label done_label_;
2110 }; 1928 };
2111 1929
2112 1930
2113 class LIn: public LTemplateInstruction<1, 2, 0> { 1931 class LIn: public LTemplateInstruction<1, 2, 0> {
2114 public: 1932 public:
2115 LIn(LOperand* key, LOperand* object) { 1933 LIn(LOperand* key, LOperand* object) {
2116 inputs_[0] = key; 1934 inputs_[0] = key;
2117 inputs_[1] = object; 1935 inputs_[1] = object;
2118 } 1936 }
2119 1937
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
2339 2157
2340 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2158 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2341 }; 2159 };
2342 2160
2343 #undef DECLARE_HYDROGEN_ACCESSOR 2161 #undef DECLARE_HYDROGEN_ACCESSOR
2344 #undef DECLARE_CONCRETE_INSTRUCTION 2162 #undef DECLARE_CONCRETE_INSTRUCTION
2345 2163
2346 } } // namespace v8::internal 2164 } } // namespace v8::internal
2347 2165
2348 #endif // V8_ARM_LITHIUM_ARM_H_ 2166 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698