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

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

Issue 148573005: A64: Synchronize with r16249. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/x64/lithium-gap-resolver-x64.h ('k') | src/x64/lithium-x64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 V(CheckMaps) \ 67 V(CheckMaps) \
68 V(CheckMapValue) \ 68 V(CheckMapValue) \
69 V(CheckNonSmi) \ 69 V(CheckNonSmi) \
70 V(CheckSmi) \ 70 V(CheckSmi) \
71 V(ClampDToUint8) \ 71 V(ClampDToUint8) \
72 V(ClampIToUint8) \ 72 V(ClampIToUint8) \
73 V(ClampTToUint8) \ 73 V(ClampTToUint8) \
74 V(ClassOfTestAndBranch) \ 74 V(ClassOfTestAndBranch) \
75 V(CompareNumericAndBranch) \ 75 V(CompareNumericAndBranch) \
76 V(CmpObjectEqAndBranch) \ 76 V(CmpObjectEqAndBranch) \
77 V(CmpHoleAndBranch) \
77 V(CmpMapAndBranch) \ 78 V(CmpMapAndBranch) \
78 V(CmpT) \ 79 V(CmpT) \
79 V(ConstantD) \ 80 V(ConstantD) \
80 V(ConstantE) \ 81 V(ConstantE) \
81 V(ConstantI) \ 82 V(ConstantI) \
82 V(ConstantS) \ 83 V(ConstantS) \
83 V(ConstantT) \ 84 V(ConstantT) \
84 V(Context) \ 85 V(Context) \
85 V(DateField) \ 86 V(DateField) \
86 V(DebugBreak) \ 87 V(DebugBreak) \
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 V(LazyBailout) \ 120 V(LazyBailout) \
120 V(LoadContextSlot) \ 121 V(LoadContextSlot) \
121 V(LoadExternalArrayPointer) \ 122 V(LoadExternalArrayPointer) \
122 V(LoadFieldByIndex) \ 123 V(LoadFieldByIndex) \
123 V(LoadFunctionPrototype) \ 124 V(LoadFunctionPrototype) \
124 V(LoadGlobalCell) \ 125 V(LoadGlobalCell) \
125 V(LoadGlobalGeneric) \ 126 V(LoadGlobalGeneric) \
126 V(LoadKeyed) \ 127 V(LoadKeyed) \
127 V(LoadKeyedGeneric) \ 128 V(LoadKeyedGeneric) \
128 V(LoadNamedField) \ 129 V(LoadNamedField) \
129 V(LoadNamedFieldPolymorphic) \
130 V(LoadNamedGeneric) \ 130 V(LoadNamedGeneric) \
131 V(MapEnumLength) \ 131 V(MapEnumLength) \
132 V(MathAbs) \ 132 V(MathAbs) \
133 V(MathCos) \ 133 V(MathCos) \
134 V(MathExp) \ 134 V(MathExp) \
135 V(MathFloor) \ 135 V(MathFloor) \
136 V(MathFloorOfDiv) \ 136 V(MathFloorOfDiv) \
137 V(MathLog) \ 137 V(MathLog) \
138 V(MathMinMax) \ 138 V(MathMinMax) \
139 V(MathPowHalf) \ 139 V(MathPowHalf) \
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 V(TransitionElementsKind) \ 179 V(TransitionElementsKind) \
180 V(TrapAllocationMemento) \ 180 V(TrapAllocationMemento) \
181 V(Typeof) \ 181 V(Typeof) \
182 V(TypeofIsAndBranch) \ 182 V(TypeofIsAndBranch) \
183 V(Uint32ToDouble) \ 183 V(Uint32ToDouble) \
184 V(UnknownOSRValue) \ 184 V(UnknownOSRValue) \
185 V(ValueOf) \ 185 V(ValueOf) \
186 V(WrapReceiver) 186 V(WrapReceiver)
187 187
188 188
189 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 189 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
190 virtual Opcode opcode() const { return LInstruction::k##type; } \ 190 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \
191 virtual void CompileToNative(LCodeGen* generator); \ 191 return LInstruction::k##type; \
192 virtual const char* Mnemonic() const { return mnemonic; } \ 192 } \
193 static L##type* cast(LInstruction* instr) { \ 193 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \
194 ASSERT(instr->Is##type()); \ 194 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \
195 return reinterpret_cast<L##type*>(instr); \ 195 return mnemonic; \
196 } \
197 static L##type* cast(LInstruction* instr) { \
198 ASSERT(instr->Is##type()); \
199 return reinterpret_cast<L##type*>(instr); \
196 } 200 }
197 201
198 202
199 #define DECLARE_HYDROGEN_ACCESSOR(type) \ 203 #define DECLARE_HYDROGEN_ACCESSOR(type) \
200 H##type* hydrogen() const { \ 204 H##type* hydrogen() const { \
201 return H##type::cast(hydrogen_value()); \ 205 return H##type::cast(hydrogen_value()); \
202 } 206 }
203 207
204 208
205 class LInstruction: public ZoneObject { 209 class LInstruction : public ZoneObject {
206 public: 210 public:
207 LInstruction() 211 LInstruction()
208 : environment_(NULL), 212 : environment_(NULL),
209 hydrogen_value_(NULL), 213 hydrogen_value_(NULL),
210 bit_field_(IsCallBits::encode(false)) { 214 bit_field_(IsCallBits::encode(false)) {
211 set_position(RelocInfo::kNoPosition); 215 set_position(RelocInfo::kNoPosition);
212 } 216 }
213 217
214 virtual ~LInstruction() { } 218 virtual ~LInstruction() {}
215 219
216 virtual void CompileToNative(LCodeGen* generator) = 0; 220 virtual void CompileToNative(LCodeGen* generator) = 0;
217 virtual const char* Mnemonic() const = 0; 221 virtual const char* Mnemonic() const = 0;
218 virtual void PrintTo(StringStream* stream); 222 virtual void PrintTo(StringStream* stream);
219 virtual void PrintDataTo(StringStream* stream); 223 virtual void PrintDataTo(StringStream* stream);
220 virtual void PrintOutputOperandTo(StringStream* stream); 224 virtual void PrintOutputOperandTo(StringStream* stream);
221 225
222 enum Opcode { 226 enum Opcode {
223 // Declare a unique enum value for each instruction. 227 // Declare a unique enum value for each instruction.
224 #define DECLARE_OPCODE(type) k##type, 228 #define DECLARE_OPCODE(type) k##type,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 SetOncePointer<LPointerMap> pointer_map_; 307 SetOncePointer<LPointerMap> pointer_map_;
304 HValue* hydrogen_value_; 308 HValue* hydrogen_value_;
305 int bit_field_; 309 int bit_field_;
306 }; 310 };
307 311
308 312
309 // R = number of result operands (0 or 1). 313 // R = number of result operands (0 or 1).
310 // I = number of input operands. 314 // I = number of input operands.
311 // T = number of temporary operands. 315 // T = number of temporary operands.
312 template<int R, int I, int T> 316 template<int R, int I, int T>
313 class LTemplateInstruction: public LInstruction { 317 class LTemplateInstruction : public LInstruction {
314 public: 318 public:
315 // Allow 0 or 1 output operands. 319 // Allow 0 or 1 output operands.
316 STATIC_ASSERT(R == 0 || R == 1); 320 STATIC_ASSERT(R == 0 || R == 1);
317 virtual bool HasResult() const { return R != 0 && result() != NULL; } 321 virtual bool HasResult() const V8_FINAL V8_OVERRIDE {
322 return R != 0 && result() != NULL;
323 }
318 void set_result(LOperand* operand) { results_[0] = operand; } 324 void set_result(LOperand* operand) { results_[0] = operand; }
319 LOperand* result() const { return results_[0]; } 325 LOperand* result() const { return results_[0]; }
320 326
321 protected: 327 protected:
322 EmbeddedContainer<LOperand*, R> results_; 328 EmbeddedContainer<LOperand*, R> results_;
323 EmbeddedContainer<LOperand*, I> inputs_; 329 EmbeddedContainer<LOperand*, I> inputs_;
324 EmbeddedContainer<LOperand*, T> temps_; 330 EmbeddedContainer<LOperand*, T> temps_;
325 331
326 private: 332 private:
327 // Iterator support. 333 // Iterator support.
328 virtual int InputCount() { return I; } 334 virtual int InputCount() V8_FINAL V8_OVERRIDE { return I; }
329 virtual LOperand* InputAt(int i) { return inputs_[i]; } 335 virtual LOperand* InputAt(int i) V8_FINAL V8_OVERRIDE { return inputs_[i]; }
330 336
331 virtual int TempCount() { return T; } 337 virtual int TempCount() V8_FINAL V8_OVERRIDE { return T; }
332 virtual LOperand* TempAt(int i) { return temps_[i]; } 338 virtual LOperand* TempAt(int i) V8_FINAL V8_OVERRIDE { return temps_[i]; }
333 }; 339 };
334 340
335 341
336 class LGap: public LTemplateInstruction<0, 0, 0> { 342 class LGap : public LTemplateInstruction<0, 0, 0> {
337 public: 343 public:
338 explicit LGap(HBasicBlock* block) 344 explicit LGap(HBasicBlock* block)
339 : block_(block) { 345 : block_(block) {
340 parallel_moves_[BEFORE] = NULL; 346 parallel_moves_[BEFORE] = NULL;
341 parallel_moves_[START] = NULL; 347 parallel_moves_[START] = NULL;
342 parallel_moves_[END] = NULL; 348 parallel_moves_[END] = NULL;
343 parallel_moves_[AFTER] = NULL; 349 parallel_moves_[AFTER] = NULL;
344 } 350 }
345 351
346 // Can't use the DECLARE-macro here because of sub-classes. 352 // Can't use the DECLARE-macro here because of sub-classes.
347 virtual bool IsGap() const { return true; } 353 virtual bool IsGap() const V8_FINAL V8_OVERRIDE { return true; }
348 virtual void PrintDataTo(StringStream* stream); 354 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
349 static LGap* cast(LInstruction* instr) { 355 static LGap* cast(LInstruction* instr) {
350 ASSERT(instr->IsGap()); 356 ASSERT(instr->IsGap());
351 return reinterpret_cast<LGap*>(instr); 357 return reinterpret_cast<LGap*>(instr);
352 } 358 }
353 359
354 bool IsRedundant() const; 360 bool IsRedundant() const;
355 361
356 HBasicBlock* block() const { return block_; } 362 HBasicBlock* block() const { return block_; }
357 363
358 enum InnerPosition { 364 enum InnerPosition {
(...skipping 16 matching lines...) Expand all
375 LParallelMove* GetParallelMove(InnerPosition pos) { 381 LParallelMove* GetParallelMove(InnerPosition pos) {
376 return parallel_moves_[pos]; 382 return parallel_moves_[pos];
377 } 383 }
378 384
379 private: 385 private:
380 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; 386 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1];
381 HBasicBlock* block_; 387 HBasicBlock* block_;
382 }; 388 };
383 389
384 390
385 class LInstructionGap: public LGap { 391 class LInstructionGap V8_FINAL : public LGap {
386 public: 392 public:
387 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } 393 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
388 394
389 virtual bool HasInterestingComment(LCodeGen* gen) const { 395 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
390 return !IsRedundant(); 396 return !IsRedundant();
391 } 397 }
392 398
393 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") 399 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap")
394 }; 400 };
395 401
396 402
397 class LGoto: public LTemplateInstruction<0, 0, 0> { 403 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> {
398 public: 404 public:
399 explicit LGoto(int block_id) : block_id_(block_id) { } 405 explicit LGoto(int block_id) : block_id_(block_id) { }
400 406
401 virtual bool HasInterestingComment(LCodeGen* gen) const; 407 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE;
402 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") 408 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
403 virtual void PrintDataTo(StringStream* stream); 409 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
404 virtual bool IsControl() const { return true; } 410 virtual bool IsControl() const V8_OVERRIDE { return true; }
405 411
406 int block_id() const { return block_id_; } 412 int block_id() const { return block_id_; }
407 413
408 private: 414 private:
409 int block_id_; 415 int block_id_;
410 }; 416 };
411 417
412 418
413 class LLazyBailout: public LTemplateInstruction<0, 0, 0> { 419 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
414 public: 420 public:
415 LLazyBailout() : gap_instructions_size_(0) { } 421 LLazyBailout() : gap_instructions_size_(0) { }
416 422
417 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout") 423 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout")
418 424
419 void set_gap_instructions_size(int gap_instructions_size) { 425 void set_gap_instructions_size(int gap_instructions_size) {
420 gap_instructions_size_ = gap_instructions_size; 426 gap_instructions_size_ = gap_instructions_size;
421 } 427 }
422 int gap_instructions_size() { return gap_instructions_size_; } 428 int gap_instructions_size() { return gap_instructions_size_; }
423 429
424 private: 430 private:
425 int gap_instructions_size_; 431 int gap_instructions_size_;
426 }; 432 };
427 433
428 434
429 class LDummyUse: public LTemplateInstruction<1, 1, 0> { 435 class LDummyUse V8_FINAL : public LTemplateInstruction<1, 1, 0> {
430 public: 436 public:
431 explicit LDummyUse(LOperand* value) { 437 explicit LDummyUse(LOperand* value) {
432 inputs_[0] = value; 438 inputs_[0] = value;
433 } 439 }
434 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") 440 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use")
435 }; 441 };
436 442
437 443
438 class LDeoptimize: public LTemplateInstruction<0, 0, 0> { 444 class LDeoptimize V8_FINAL : public LTemplateInstruction<0, 0, 0> {
439 public: 445 public:
440 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") 446 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
441 DECLARE_HYDROGEN_ACCESSOR(Deoptimize) 447 DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
442 }; 448 };
443 449
444 450
445 class LLabel: public LGap { 451 class LLabel V8_FINAL : public LGap {
446 public: 452 public:
447 explicit LLabel(HBasicBlock* block) 453 explicit LLabel(HBasicBlock* block)
448 : LGap(block), replacement_(NULL) { } 454 : LGap(block), replacement_(NULL) { }
449 455
450 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } 456 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
457 return false;
458 }
451 DECLARE_CONCRETE_INSTRUCTION(Label, "label") 459 DECLARE_CONCRETE_INSTRUCTION(Label, "label")
452 460
453 virtual void PrintDataTo(StringStream* stream); 461 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
454 462
455 int block_id() const { return block()->block_id(); } 463 int block_id() const { return block()->block_id(); }
456 bool is_loop_header() const { return block()->IsLoopHeader(); } 464 bool is_loop_header() const { return block()->IsLoopHeader(); }
457 bool is_osr_entry() const { return block()->is_osr_entry(); } 465 bool is_osr_entry() const { return block()->is_osr_entry(); }
458 Label* label() { return &label_; } 466 Label* label() { return &label_; }
459 LLabel* replacement() const { return replacement_; } 467 LLabel* replacement() const { return replacement_; }
460 void set_replacement(LLabel* label) { replacement_ = label; } 468 void set_replacement(LLabel* label) { replacement_ = label; }
461 bool HasReplacement() const { return replacement_ != NULL; } 469 bool HasReplacement() const { return replacement_ != NULL; }
462 470
463 private: 471 private:
464 Label label_; 472 Label label_;
465 LLabel* replacement_; 473 LLabel* replacement_;
466 }; 474 };
467 475
468 476
469 class LParameter: public LTemplateInstruction<1, 0, 0> { 477 class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> {
470 public: 478 public:
471 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } 479 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
480 return false;
481 }
472 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") 482 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
473 }; 483 };
474 484
475 485
476 class LCallStub: public LTemplateInstruction<1, 0, 0> { 486 class LCallStub V8_FINAL : public LTemplateInstruction<1, 0, 0> {
477 public: 487 public:
478 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") 488 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub")
479 DECLARE_HYDROGEN_ACCESSOR(CallStub) 489 DECLARE_HYDROGEN_ACCESSOR(CallStub)
480 490
481 TranscendentalCache::Type transcendental_type() { 491 TranscendentalCache::Type transcendental_type() {
482 return hydrogen()->transcendental_type(); 492 return hydrogen()->transcendental_type();
483 } 493 }
484 }; 494 };
485 495
486 496
487 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { 497 class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> {
488 public: 498 public:
489 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } 499 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
500 return false;
501 }
490 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") 502 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
491 }; 503 };
492 504
493 505
494 template<int I, int T> 506 template<int I, int T>
495 class LControlInstruction: public LTemplateInstruction<0, I, T> { 507 class LControlInstruction : public LTemplateInstruction<0, I, T> {
496 public: 508 public:
497 LControlInstruction() : false_label_(NULL), true_label_(NULL) { } 509 LControlInstruction() : false_label_(NULL), true_label_(NULL) { }
498 510
499 virtual bool IsControl() const { return true; } 511 virtual bool IsControl() const V8_FINAL V8_OVERRIDE { return true; }
500 512
501 int SuccessorCount() { return hydrogen()->SuccessorCount(); } 513 int SuccessorCount() { return hydrogen()->SuccessorCount(); }
502 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } 514 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
503 515
504 int TrueDestination(LChunk* chunk) { 516 int TrueDestination(LChunk* chunk) {
505 return chunk->LookupDestination(true_block_id()); 517 return chunk->LookupDestination(true_block_id());
506 } 518 }
507 int FalseDestination(LChunk* chunk) { 519 int FalseDestination(LChunk* chunk) {
508 return chunk->LookupDestination(false_block_id()); 520 return chunk->LookupDestination(false_block_id());
509 } 521 }
(...skipping 18 matching lines...) Expand all
528 private: 540 private:
529 HControlInstruction* hydrogen() { 541 HControlInstruction* hydrogen() {
530 return HControlInstruction::cast(this->hydrogen_value()); 542 return HControlInstruction::cast(this->hydrogen_value());
531 } 543 }
532 544
533 Label* false_label_; 545 Label* false_label_;
534 Label* true_label_; 546 Label* true_label_;
535 }; 547 };
536 548
537 549
538 class LWrapReceiver: public LTemplateInstruction<1, 2, 0> { 550 class LWrapReceiver V8_FINAL : public LTemplateInstruction<1, 2, 0> {
539 public: 551 public:
540 LWrapReceiver(LOperand* receiver, LOperand* function) { 552 LWrapReceiver(LOperand* receiver, LOperand* function) {
541 inputs_[0] = receiver; 553 inputs_[0] = receiver;
542 inputs_[1] = function; 554 inputs_[1] = function;
543 } 555 }
544 556
545 LOperand* receiver() { return inputs_[0]; } 557 LOperand* receiver() { return inputs_[0]; }
546 LOperand* function() { return inputs_[1]; } 558 LOperand* function() { return inputs_[1]; }
547 559
548 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") 560 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver")
549 }; 561 };
550 562
551 563
552 class LApplyArguments: public LTemplateInstruction<1, 4, 0> { 564 class LApplyArguments V8_FINAL : public LTemplateInstruction<1, 4, 0> {
553 public: 565 public:
554 LApplyArguments(LOperand* function, 566 LApplyArguments(LOperand* function,
555 LOperand* receiver, 567 LOperand* receiver,
556 LOperand* length, 568 LOperand* length,
557 LOperand* elements) { 569 LOperand* elements) {
558 inputs_[0] = function; 570 inputs_[0] = function;
559 inputs_[1] = receiver; 571 inputs_[1] = receiver;
560 inputs_[2] = length; 572 inputs_[2] = length;
561 inputs_[3] = elements; 573 inputs_[3] = elements;
562 } 574 }
563 575
564 LOperand* function() { return inputs_[0]; } 576 LOperand* function() { return inputs_[0]; }
565 LOperand* receiver() { return inputs_[1]; } 577 LOperand* receiver() { return inputs_[1]; }
566 LOperand* length() { return inputs_[2]; } 578 LOperand* length() { return inputs_[2]; }
567 LOperand* elements() { return inputs_[3]; } 579 LOperand* elements() { return inputs_[3]; }
568 580
569 DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply-arguments") 581 DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply-arguments")
570 }; 582 };
571 583
572 584
573 class LAccessArgumentsAt: public LTemplateInstruction<1, 3, 0> { 585 class LAccessArgumentsAt V8_FINAL : public LTemplateInstruction<1, 3, 0> {
574 public: 586 public:
575 LAccessArgumentsAt(LOperand* arguments, LOperand* length, LOperand* index) { 587 LAccessArgumentsAt(LOperand* arguments, LOperand* length, LOperand* index) {
576 inputs_[0] = arguments; 588 inputs_[0] = arguments;
577 inputs_[1] = length; 589 inputs_[1] = length;
578 inputs_[2] = index; 590 inputs_[2] = index;
579 } 591 }
580 592
581 LOperand* arguments() { return inputs_[0]; } 593 LOperand* arguments() { return inputs_[0]; }
582 LOperand* length() { return inputs_[1]; } 594 LOperand* length() { return inputs_[1]; }
583 LOperand* index() { return inputs_[2]; } 595 LOperand* index() { return inputs_[2]; }
584 596
585 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") 597 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at")
586 598
587 virtual void PrintDataTo(StringStream* stream); 599 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
588 }; 600 };
589 601
590 602
591 class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { 603 class LArgumentsLength V8_FINAL : public LTemplateInstruction<1, 1, 0> {
592 public: 604 public:
593 explicit LArgumentsLength(LOperand* elements) { 605 explicit LArgumentsLength(LOperand* elements) {
594 inputs_[0] = elements; 606 inputs_[0] = elements;
595 } 607 }
596 608
597 LOperand* elements() { return inputs_[0]; } 609 LOperand* elements() { return inputs_[0]; }
598 610
599 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") 611 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length")
600 }; 612 };
601 613
602 614
603 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { 615 class LArgumentsElements V8_FINAL : public LTemplateInstruction<1, 0, 0> {
604 public: 616 public:
605 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") 617 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements")
606 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) 618 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements)
607 }; 619 };
608 620
609 621
610 class LModI: public LTemplateInstruction<1, 2, 1> { 622 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 1> {
611 public: 623 public:
612 LModI(LOperand* left, LOperand* right, LOperand* temp) { 624 LModI(LOperand* left, LOperand* right, LOperand* temp) {
613 inputs_[0] = left; 625 inputs_[0] = left;
614 inputs_[1] = right; 626 inputs_[1] = right;
615 temps_[0] = temp; 627 temps_[0] = temp;
616 } 628 }
617 629
618 LOperand* left() { return inputs_[0]; } 630 LOperand* left() { return inputs_[0]; }
619 LOperand* right() { return inputs_[1]; } 631 LOperand* right() { return inputs_[1]; }
620 LOperand* temp() { return temps_[0]; } 632 LOperand* temp() { return temps_[0]; }
621 633
622 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") 634 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i")
623 DECLARE_HYDROGEN_ACCESSOR(Mod) 635 DECLARE_HYDROGEN_ACCESSOR(Mod)
624 }; 636 };
625 637
626 638
627 class LDivI: public LTemplateInstruction<1, 2, 1> { 639 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> {
628 public: 640 public:
629 LDivI(LOperand* left, LOperand* right, LOperand* temp) { 641 LDivI(LOperand* left, LOperand* right, LOperand* temp) {
630 inputs_[0] = left; 642 inputs_[0] = left;
631 inputs_[1] = right; 643 inputs_[1] = right;
632 temps_[0] = temp; 644 temps_[0] = temp;
633 } 645 }
634 646
635 LOperand* left() { return inputs_[0]; } 647 LOperand* left() { return inputs_[0]; }
636 LOperand* right() { return inputs_[1]; } 648 LOperand* right() { return inputs_[1]; }
637 LOperand* temp() { return temps_[0]; } 649 LOperand* temp() { return temps_[0]; }
638 650
639 bool is_flooring() { return hydrogen_value()->IsMathFloorOfDiv(); } 651 bool is_flooring() { return hydrogen_value()->IsMathFloorOfDiv(); }
640 652
641 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") 653 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i")
642 DECLARE_HYDROGEN_ACCESSOR(Div) 654 DECLARE_HYDROGEN_ACCESSOR(Div)
643 }; 655 };
644 656
645 657
646 class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { 658 class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> {
647 public: 659 public:
648 LMathFloorOfDiv(LOperand* left, 660 LMathFloorOfDiv(LOperand* left,
649 LOperand* right, 661 LOperand* right,
650 LOperand* temp = NULL) { 662 LOperand* temp = NULL) {
651 inputs_[0] = left; 663 inputs_[0] = left;
652 inputs_[1] = right; 664 inputs_[1] = right;
653 temps_[0] = temp; 665 temps_[0] = temp;
654 } 666 }
655 667
656 LOperand* left() { return inputs_[0]; } 668 LOperand* left() { return inputs_[0]; }
657 LOperand* right() { return inputs_[1]; } 669 LOperand* right() { return inputs_[1]; }
658 LOperand* temp() { return temps_[0]; } 670 LOperand* temp() { return temps_[0]; }
659 671
660 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") 672 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div")
661 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) 673 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
662 }; 674 };
663 675
664 676
665 class LMulI: public LTemplateInstruction<1, 2, 0> { 677 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
666 public: 678 public:
667 LMulI(LOperand* left, LOperand* right) { 679 LMulI(LOperand* left, LOperand* right) {
668 inputs_[0] = left; 680 inputs_[0] = left;
669 inputs_[1] = right; 681 inputs_[1] = right;
670 } 682 }
671 683
672 LOperand* left() { return inputs_[0]; } 684 LOperand* left() { return inputs_[0]; }
673 LOperand* right() { return inputs_[1]; } 685 LOperand* right() { return inputs_[1]; }
674 686
675 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") 687 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i")
676 DECLARE_HYDROGEN_ACCESSOR(Mul) 688 DECLARE_HYDROGEN_ACCESSOR(Mul)
677 }; 689 };
678 690
679 691
680 class LCompareNumericAndBranch: public LControlInstruction<2, 0> { 692 class LCompareNumericAndBranch V8_FINAL : public LControlInstruction<2, 0> {
681 public: 693 public:
682 LCompareNumericAndBranch(LOperand* left, LOperand* right) { 694 LCompareNumericAndBranch(LOperand* left, LOperand* right) {
683 inputs_[0] = left; 695 inputs_[0] = left;
684 inputs_[1] = right; 696 inputs_[1] = right;
685 } 697 }
686 698
687 LOperand* left() { return inputs_[0]; } 699 LOperand* left() { return inputs_[0]; }
688 LOperand* right() { return inputs_[1]; } 700 LOperand* right() { return inputs_[1]; }
689 701
690 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch, 702 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch,
691 "compare-numeric-and-branch") 703 "compare-numeric-and-branch")
692 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch) 704 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch)
693 705
694 Token::Value op() const { return hydrogen()->token(); } 706 Token::Value op() const { return hydrogen()->token(); }
695 bool is_double() const { 707 bool is_double() const {
696 return hydrogen()->representation().IsDouble(); 708 return hydrogen()->representation().IsDouble();
697 } 709 }
698 710
699 virtual void PrintDataTo(StringStream* stream); 711 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
700 }; 712 };
701 713
702 714
703 class LMathFloor: public LTemplateInstruction<1, 1, 0> { 715 class LMathFloor V8_FINAL : public LTemplateInstruction<1, 1, 0> {
704 public: 716 public:
705 explicit LMathFloor(LOperand* value) { 717 explicit LMathFloor(LOperand* value) {
706 inputs_[0] = value; 718 inputs_[0] = value;
707 } 719 }
708 720
709 LOperand* value() { return inputs_[0]; } 721 LOperand* value() { return inputs_[0]; }
710 722
711 DECLARE_CONCRETE_INSTRUCTION(MathFloor, "math-floor") 723 DECLARE_CONCRETE_INSTRUCTION(MathFloor, "math-floor")
712 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 724 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
713 }; 725 };
714 726
715 727
716 class LMathRound: public LTemplateInstruction<1, 1, 0> { 728 class LMathRound V8_FINAL : public LTemplateInstruction<1, 1, 0> {
717 public: 729 public:
718 explicit LMathRound(LOperand* value) { 730 explicit LMathRound(LOperand* value) {
719 inputs_[0] = value; 731 inputs_[0] = value;
720 } 732 }
721 733
722 LOperand* value() { return inputs_[0]; } 734 LOperand* value() { return inputs_[0]; }
723 735
724 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round") 736 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round")
725 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 737 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
726 }; 738 };
727 739
728 740
729 class LMathAbs: public LTemplateInstruction<1, 1, 0> { 741 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 1, 0> {
730 public: 742 public:
731 explicit LMathAbs(LOperand* value) { 743 explicit LMathAbs(LOperand* value) {
732 inputs_[0] = value; 744 inputs_[0] = value;
733 } 745 }
734 746
735 LOperand* value() { return inputs_[0]; } 747 LOperand* value() { return inputs_[0]; }
736 748
737 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs") 749 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs")
738 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 750 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
739 }; 751 };
740 752
741 753
742 class LMathLog: public LTemplateInstruction<1, 1, 0> { 754 class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> {
743 public: 755 public:
744 explicit LMathLog(LOperand* value) { 756 explicit LMathLog(LOperand* value) {
745 inputs_[0] = value; 757 inputs_[0] = value;
746 } 758 }
747 759
748 LOperand* value() { return inputs_[0]; } 760 LOperand* value() { return inputs_[0]; }
749 761
750 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log") 762 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log")
751 }; 763 };
752 764
753 765
754 class LMathSin: public LTemplateInstruction<1, 1, 0> { 766 class LMathSin V8_FINAL : public LTemplateInstruction<1, 1, 0> {
755 public: 767 public:
756 explicit LMathSin(LOperand* value) { 768 explicit LMathSin(LOperand* value) {
757 inputs_[0] = value; 769 inputs_[0] = value;
758 } 770 }
759 771
760 LOperand* value() { return inputs_[0]; } 772 LOperand* value() { return inputs_[0]; }
761 773
762 DECLARE_CONCRETE_INSTRUCTION(MathSin, "math-sin") 774 DECLARE_CONCRETE_INSTRUCTION(MathSin, "math-sin")
763 }; 775 };
764 776
765 777
766 class LMathCos: public LTemplateInstruction<1, 1, 0> { 778 class LMathCos V8_FINAL : public LTemplateInstruction<1, 1, 0> {
767 public: 779 public:
768 explicit LMathCos(LOperand* value) { 780 explicit LMathCos(LOperand* value) {
769 inputs_[0] = value; 781 inputs_[0] = value;
770 } 782 }
771 783
772 LOperand* value() { return inputs_[0]; } 784 LOperand* value() { return inputs_[0]; }
773 785
774 DECLARE_CONCRETE_INSTRUCTION(MathCos, "math-cos") 786 DECLARE_CONCRETE_INSTRUCTION(MathCos, "math-cos")
775 }; 787 };
776 788
777 789
778 class LMathTan: public LTemplateInstruction<1, 1, 0> { 790 class LMathTan V8_FINAL : public LTemplateInstruction<1, 1, 0> {
779 public: 791 public:
780 explicit LMathTan(LOperand* value) { 792 explicit LMathTan(LOperand* value) {
781 inputs_[0] = value; 793 inputs_[0] = value;
782 } 794 }
783 795
784 LOperand* value() { return inputs_[0]; } 796 LOperand* value() { return inputs_[0]; }
785 797
786 DECLARE_CONCRETE_INSTRUCTION(MathTan, "math-tan") 798 DECLARE_CONCRETE_INSTRUCTION(MathTan, "math-tan")
787 }; 799 };
788 800
789 801
790 class LMathExp: public LTemplateInstruction<1, 1, 2> { 802 class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 2> {
791 public: 803 public:
792 LMathExp(LOperand* value, LOperand* temp1, LOperand* temp2) { 804 LMathExp(LOperand* value, LOperand* temp1, LOperand* temp2) {
793 inputs_[0] = value; 805 inputs_[0] = value;
794 temps_[0] = temp1; 806 temps_[0] = temp1;
795 temps_[1] = temp2; 807 temps_[1] = temp2;
796 ExternalReference::InitializeMathExpData(); 808 ExternalReference::InitializeMathExpData();
797 } 809 }
798 810
799 LOperand* value() { return inputs_[0]; } 811 LOperand* value() { return inputs_[0]; }
800 LOperand* temp1() { return temps_[0]; } 812 LOperand* temp1() { return temps_[0]; }
801 LOperand* temp2() { return temps_[1]; } 813 LOperand* temp2() { return temps_[1]; }
802 814
803 DECLARE_CONCRETE_INSTRUCTION(MathExp, "math-exp") 815 DECLARE_CONCRETE_INSTRUCTION(MathExp, "math-exp")
804 }; 816 };
805 817
806 818
807 class LMathSqrt: public LTemplateInstruction<1, 1, 0> { 819 class LMathSqrt V8_FINAL : public LTemplateInstruction<1, 1, 0> {
808 public: 820 public:
809 explicit LMathSqrt(LOperand* value) { 821 explicit LMathSqrt(LOperand* value) {
810 inputs_[0] = value; 822 inputs_[0] = value;
811 } 823 }
812 824
813 LOperand* value() { return inputs_[0]; } 825 LOperand* value() { return inputs_[0]; }
814 826
815 DECLARE_CONCRETE_INSTRUCTION(MathSqrt, "math-sqrt") 827 DECLARE_CONCRETE_INSTRUCTION(MathSqrt, "math-sqrt")
816 }; 828 };
817 829
818 830
819 class LMathPowHalf: public LTemplateInstruction<1, 1, 0> { 831 class LMathPowHalf V8_FINAL : public LTemplateInstruction<1, 1, 0> {
820 public: 832 public:
821 explicit LMathPowHalf(LOperand* value) { 833 explicit LMathPowHalf(LOperand* value) {
822 inputs_[0] = value; 834 inputs_[0] = value;
823 } 835 }
824 836
825 LOperand* value() { return inputs_[0]; } 837 LOperand* value() { return inputs_[0]; }
826 838
827 DECLARE_CONCRETE_INSTRUCTION(MathPowHalf, "math-pow-half") 839 DECLARE_CONCRETE_INSTRUCTION(MathPowHalf, "math-pow-half")
828 }; 840 };
829 841
830 842
831 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { 843 class LCmpObjectEqAndBranch V8_FINAL : public LControlInstruction<2, 0> {
832 public: 844 public:
833 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { 845 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) {
834 inputs_[0] = left; 846 inputs_[0] = left;
835 inputs_[1] = right; 847 inputs_[1] = right;
836 } 848 }
837 849
838 LOperand* left() { return inputs_[0]; } 850 LOperand* left() { return inputs_[0]; }
839 LOperand* right() { return inputs_[1]; } 851 LOperand* right() { return inputs_[1]; }
840 852
841 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, 853 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, "cmp-object-eq-and-branch")
842 "cmp-object-eq-and-branch")
843 }; 854 };
844 855
845 856
846 class LIsObjectAndBranch: public LControlInstruction<1, 0> { 857 class LCmpHoleAndBranch V8_FINAL : public LControlInstruction<1, 0> {
858 public:
859 explicit LCmpHoleAndBranch(LOperand* object) {
860 inputs_[0] = object;
861 }
862
863 LOperand* object() { return inputs_[0]; }
864
865 DECLARE_CONCRETE_INSTRUCTION(CmpHoleAndBranch, "cmp-hole-and-branch")
866 DECLARE_HYDROGEN_ACCESSOR(CompareHoleAndBranch)
867 };
868
869
870 class LIsObjectAndBranch V8_FINAL : public LControlInstruction<1, 0> {
847 public: 871 public:
848 explicit LIsObjectAndBranch(LOperand* value) { 872 explicit LIsObjectAndBranch(LOperand* value) {
849 inputs_[0] = value; 873 inputs_[0] = value;
850 } 874 }
851 875
852 LOperand* value() { return inputs_[0]; } 876 LOperand* value() { return inputs_[0]; }
853 877
854 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") 878 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
855 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) 879 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
856 880
857 virtual void PrintDataTo(StringStream* stream); 881 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
858 }; 882 };
859 883
860 884
861 class LIsNumberAndBranch: public LControlInstruction<1, 0> { 885 class LIsNumberAndBranch V8_FINAL : public LControlInstruction<1, 0> {
862 public: 886 public:
863 explicit LIsNumberAndBranch(LOperand* value) { 887 explicit LIsNumberAndBranch(LOperand* value) {
864 inputs_[0] = value; 888 inputs_[0] = value;
865 } 889 }
866 890
867 LOperand* value() { return inputs_[0]; } 891 LOperand* value() { return inputs_[0]; }
868 892
869 DECLARE_CONCRETE_INSTRUCTION(IsNumberAndBranch, "is-number-and-branch") 893 DECLARE_CONCRETE_INSTRUCTION(IsNumberAndBranch, "is-number-and-branch")
870 DECLARE_HYDROGEN_ACCESSOR(IsNumberAndBranch) 894 DECLARE_HYDROGEN_ACCESSOR(IsNumberAndBranch)
871 }; 895 };
872 896
873 897
874 class LIsStringAndBranch: public LControlInstruction<1, 1> { 898 class LIsStringAndBranch V8_FINAL : public LControlInstruction<1, 1> {
875 public: 899 public:
876 explicit LIsStringAndBranch(LOperand* value, LOperand* temp) { 900 explicit LIsStringAndBranch(LOperand* value, LOperand* temp) {
877 inputs_[0] = value; 901 inputs_[0] = value;
878 temps_[0] = temp; 902 temps_[0] = temp;
879 } 903 }
880 904
881 LOperand* value() { return inputs_[0]; } 905 LOperand* value() { return inputs_[0]; }
882 LOperand* temp() { return temps_[0]; } 906 LOperand* temp() { return temps_[0]; }
883 907
884 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") 908 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
885 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) 909 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
886 910
887 virtual void PrintDataTo(StringStream* stream); 911 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
888 }; 912 };
889 913
890 914
891 class LIsSmiAndBranch: public LControlInstruction<1, 0> { 915 class LIsSmiAndBranch V8_FINAL : public LControlInstruction<1, 0> {
892 public: 916 public:
893 explicit LIsSmiAndBranch(LOperand* value) { 917 explicit LIsSmiAndBranch(LOperand* value) {
894 inputs_[0] = value; 918 inputs_[0] = value;
895 } 919 }
896 920
897 LOperand* value() { return inputs_[0]; } 921 LOperand* value() { return inputs_[0]; }
898 922
899 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") 923 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
900 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) 924 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
901 925
902 virtual void PrintDataTo(StringStream* stream); 926 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
903 }; 927 };
904 928
905 929
906 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { 930 class LIsUndetectableAndBranch V8_FINAL : public LControlInstruction<1, 1> {
907 public: 931 public:
908 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { 932 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) {
909 inputs_[0] = value; 933 inputs_[0] = value;
910 temps_[0] = temp; 934 temps_[0] = temp;
911 } 935 }
912 936
913 LOperand* value() { return inputs_[0]; } 937 LOperand* value() { return inputs_[0]; }
914 LOperand* temp() { return temps_[0]; } 938 LOperand* temp() { return temps_[0]; }
915 939
916 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, 940 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch,
917 "is-undetectable-and-branch") 941 "is-undetectable-and-branch")
918 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) 942 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
919 943
920 virtual void PrintDataTo(StringStream* stream); 944 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
921 }; 945 };
922 946
923 947
924 class LStringCompareAndBranch: public LControlInstruction<2, 0> { 948 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<2, 0> {
925 public: 949 public:
926 explicit LStringCompareAndBranch(LOperand* left, LOperand* right) { 950 explicit LStringCompareAndBranch(LOperand* left, LOperand* right) {
927 inputs_[0] = left; 951 inputs_[0] = left;
928 inputs_[1] = right; 952 inputs_[1] = right;
929 } 953 }
930 954
931 LOperand* left() { return inputs_[0]; } 955 LOperand* left() { return inputs_[0]; }
932 LOperand* right() { return inputs_[1]; } 956 LOperand* right() { return inputs_[1]; }
933 957
934 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, 958 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch,
935 "string-compare-and-branch") 959 "string-compare-and-branch")
936 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) 960 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch)
937 961
938 virtual void PrintDataTo(StringStream* stream); 962 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
939 963
940 Token::Value op() const { return hydrogen()->token(); } 964 Token::Value op() const { return hydrogen()->token(); }
941 }; 965 };
942 966
943 967
944 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> { 968 class LHasInstanceTypeAndBranch V8_FINAL : public LControlInstruction<1, 0> {
945 public: 969 public:
946 explicit LHasInstanceTypeAndBranch(LOperand* value) { 970 explicit LHasInstanceTypeAndBranch(LOperand* value) {
947 inputs_[0] = value; 971 inputs_[0] = value;
948 } 972 }
949 973
950 LOperand* value() { return inputs_[0]; } 974 LOperand* value() { return inputs_[0]; }
951 975
952 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, 976 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch,
953 "has-instance-type-and-branch") 977 "has-instance-type-and-branch")
954 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) 978 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
955 979
956 virtual void PrintDataTo(StringStream* stream); 980 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
957 }; 981 };
958 982
959 983
960 class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { 984 class LGetCachedArrayIndex V8_FINAL : public LTemplateInstruction<1, 1, 0> {
961 public: 985 public:
962 explicit LGetCachedArrayIndex(LOperand* value) { 986 explicit LGetCachedArrayIndex(LOperand* value) {
963 inputs_[0] = value; 987 inputs_[0] = value;
964 } 988 }
965 989
966 LOperand* value() { return inputs_[0]; } 990 LOperand* value() { return inputs_[0]; }
967 991
968 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") 992 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index")
969 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) 993 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex)
970 }; 994 };
971 995
972 996
973 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { 997 class LHasCachedArrayIndexAndBranch V8_FINAL
998 : public LControlInstruction<1, 0> {
974 public: 999 public:
975 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { 1000 explicit LHasCachedArrayIndexAndBranch(LOperand* value) {
976 inputs_[0] = value; 1001 inputs_[0] = value;
977 } 1002 }
978 1003
979 LOperand* value() { return inputs_[0]; } 1004 LOperand* value() { return inputs_[0]; }
980 1005
981 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, 1006 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch,
982 "has-cached-array-index-and-branch") 1007 "has-cached-array-index-and-branch")
983 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch) 1008 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
984 1009
985 virtual void PrintDataTo(StringStream* stream); 1010 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
986 }; 1011 };
987 1012
988 1013
989 class LClassOfTestAndBranch: public LControlInstruction<1, 2> { 1014 class LClassOfTestAndBranch V8_FINAL : public LControlInstruction<1, 2> {
990 public: 1015 public:
991 LClassOfTestAndBranch(LOperand* value, LOperand* temp, LOperand* temp2) { 1016 LClassOfTestAndBranch(LOperand* value, LOperand* temp, LOperand* temp2) {
992 inputs_[0] = value; 1017 inputs_[0] = value;
993 temps_[0] = temp; 1018 temps_[0] = temp;
994 temps_[1] = temp2; 1019 temps_[1] = temp2;
995 } 1020 }
996 1021
997 LOperand* value() { return inputs_[0]; } 1022 LOperand* value() { return inputs_[0]; }
998 LOperand* temp() { return temps_[0]; } 1023 LOperand* temp() { return temps_[0]; }
999 LOperand* temp2() { return temps_[1]; } 1024 LOperand* temp2() { return temps_[1]; }
1000 1025
1001 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, 1026 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch,
1002 "class-of-test-and-branch") 1027 "class-of-test-and-branch")
1003 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) 1028 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
1004 1029
1005 virtual void PrintDataTo(StringStream* stream); 1030 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1006 }; 1031 };
1007 1032
1008 1033
1009 class LCmpT: public LTemplateInstruction<1, 2, 0> { 1034 class LCmpT V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1010 public: 1035 public:
1011 LCmpT(LOperand* left, LOperand* right) { 1036 LCmpT(LOperand* left, LOperand* right) {
1012 inputs_[0] = left; 1037 inputs_[0] = left;
1013 inputs_[1] = right; 1038 inputs_[1] = right;
1014 } 1039 }
1015 1040
1016 LOperand* left() { return inputs_[0]; } 1041 LOperand* left() { return inputs_[0]; }
1017 LOperand* right() { return inputs_[1]; } 1042 LOperand* right() { return inputs_[1]; }
1018 1043
1019 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") 1044 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t")
1020 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) 1045 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric)
1021 1046
1022 Token::Value op() const { return hydrogen()->token(); } 1047 Token::Value op() const { return hydrogen()->token(); }
1023 }; 1048 };
1024 1049
1025 1050
1026 class LInstanceOf: public LTemplateInstruction<1, 2, 0> { 1051 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1027 public: 1052 public:
1028 LInstanceOf(LOperand* left, LOperand* right) { 1053 LInstanceOf(LOperand* left, LOperand* right) {
1029 inputs_[0] = left; 1054 inputs_[0] = left;
1030 inputs_[1] = right; 1055 inputs_[1] = right;
1031 } 1056 }
1032 1057
1033 LOperand* left() { return inputs_[0]; } 1058 LOperand* left() { return inputs_[0]; }
1034 LOperand* right() { return inputs_[1]; } 1059 LOperand* right() { return inputs_[1]; }
1035 1060
1036 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") 1061 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of")
1037 }; 1062 };
1038 1063
1039 1064
1040 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { 1065 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 1, 1> {
1041 public: 1066 public:
1042 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { 1067 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) {
1043 inputs_[0] = value; 1068 inputs_[0] = value;
1044 temps_[0] = temp; 1069 temps_[0] = temp;
1045 } 1070 }
1046 1071
1047 LOperand* value() { return inputs_[0]; } 1072 LOperand* value() { return inputs_[0]; }
1048 LOperand* temp() { return temps_[0]; } 1073 LOperand* temp() { return temps_[0]; }
1049 1074
1050 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, 1075 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
1051 "instance-of-known-global") 1076 "instance-of-known-global")
1052 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) 1077 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
1053 1078
1054 Handle<JSFunction> function() const { return hydrogen()->function(); } 1079 Handle<JSFunction> function() const { return hydrogen()->function(); }
1055 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { 1080 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() {
1056 return lazy_deopt_env_; 1081 return lazy_deopt_env_;
1057 } 1082 }
1058 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { 1083 virtual void SetDeferredLazyDeoptimizationEnvironment(
1084 LEnvironment* env) V8_OVERRIDE {
1059 lazy_deopt_env_ = env; 1085 lazy_deopt_env_ = env;
1060 } 1086 }
1061 1087
1062 private: 1088 private:
1063 LEnvironment* lazy_deopt_env_; 1089 LEnvironment* lazy_deopt_env_;
1064 }; 1090 };
1065 1091
1066 1092
1067 class LInstanceSize: public LTemplateInstruction<1, 1, 0> { 1093 class LInstanceSize V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1068 public: 1094 public:
1069 explicit LInstanceSize(LOperand* object) { 1095 explicit LInstanceSize(LOperand* object) {
1070 inputs_[0] = object; 1096 inputs_[0] = object;
1071 } 1097 }
1072 1098
1073 LOperand* object() { return inputs_[0]; } 1099 LOperand* object() { return inputs_[0]; }
1074 1100
1075 DECLARE_CONCRETE_INSTRUCTION(InstanceSize, "instance-size") 1101 DECLARE_CONCRETE_INSTRUCTION(InstanceSize, "instance-size")
1076 DECLARE_HYDROGEN_ACCESSOR(InstanceSize) 1102 DECLARE_HYDROGEN_ACCESSOR(InstanceSize)
1077 }; 1103 };
1078 1104
1079 1105
1080 class LBoundsCheck: public LTemplateInstruction<0, 2, 0> { 1106 class LBoundsCheck V8_FINAL : public LTemplateInstruction<0, 2, 0> {
1081 public: 1107 public:
1082 LBoundsCheck(LOperand* index, LOperand* length) { 1108 LBoundsCheck(LOperand* index, LOperand* length) {
1083 inputs_[0] = index; 1109 inputs_[0] = index;
1084 inputs_[1] = length; 1110 inputs_[1] = length;
1085 } 1111 }
1086 1112
1087 LOperand* index() { return inputs_[0]; } 1113 LOperand* index() { return inputs_[0]; }
1088 LOperand* length() { return inputs_[1]; } 1114 LOperand* length() { return inputs_[1]; }
1089 1115
1090 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check") 1116 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check")
1091 DECLARE_HYDROGEN_ACCESSOR(BoundsCheck) 1117 DECLARE_HYDROGEN_ACCESSOR(BoundsCheck)
1092 }; 1118 };
1093 1119
1094 1120
1095 class LBitI: public LTemplateInstruction<1, 2, 0> { 1121 class LBitI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1096 public: 1122 public:
1097 LBitI(LOperand* left, LOperand* right) { 1123 LBitI(LOperand* left, LOperand* right) {
1098 inputs_[0] = left; 1124 inputs_[0] = left;
1099 inputs_[1] = right; 1125 inputs_[1] = right;
1100 } 1126 }
1101 1127
1102 LOperand* left() { return inputs_[0]; } 1128 LOperand* left() { return inputs_[0]; }
1103 LOperand* right() { return inputs_[1]; } 1129 LOperand* right() { return inputs_[1]; }
1104 1130
1105 Token::Value op() const { return hydrogen()->op(); } 1131 Token::Value op() const { return hydrogen()->op(); }
1106 1132
1107 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i") 1133 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i")
1108 DECLARE_HYDROGEN_ACCESSOR(Bitwise) 1134 DECLARE_HYDROGEN_ACCESSOR(Bitwise)
1109 }; 1135 };
1110 1136
1111 1137
1112 class LShiftI: public LTemplateInstruction<1, 2, 0> { 1138 class LShiftI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1113 public: 1139 public:
1114 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) 1140 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt)
1115 : op_(op), can_deopt_(can_deopt) { 1141 : op_(op), can_deopt_(can_deopt) {
1116 inputs_[0] = left; 1142 inputs_[0] = left;
1117 inputs_[1] = right; 1143 inputs_[1] = right;
1118 } 1144 }
1119 1145
1120 Token::Value op() const { return op_; } 1146 Token::Value op() const { return op_; }
1121 LOperand* left() { return inputs_[0]; } 1147 LOperand* left() { return inputs_[0]; }
1122 LOperand* right() { return inputs_[1]; } 1148 LOperand* right() { return inputs_[1]; }
1123 bool can_deopt() const { return can_deopt_; } 1149 bool can_deopt() const { return can_deopt_; }
1124 1150
1125 DECLARE_CONCRETE_INSTRUCTION(ShiftI, "shift-i") 1151 DECLARE_CONCRETE_INSTRUCTION(ShiftI, "shift-i")
1126 1152
1127 private: 1153 private:
1128 Token::Value op_; 1154 Token::Value op_;
1129 bool can_deopt_; 1155 bool can_deopt_;
1130 }; 1156 };
1131 1157
1132 1158
1133 class LSubI: public LTemplateInstruction<1, 2, 0> { 1159 class LSubI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1134 public: 1160 public:
1135 LSubI(LOperand* left, LOperand* right) { 1161 LSubI(LOperand* left, LOperand* right) {
1136 inputs_[0] = left; 1162 inputs_[0] = left;
1137 inputs_[1] = right; 1163 inputs_[1] = right;
1138 } 1164 }
1139 1165
1140 LOperand* left() { return inputs_[0]; } 1166 LOperand* left() { return inputs_[0]; }
1141 LOperand* right() { return inputs_[1]; } 1167 LOperand* right() { return inputs_[1]; }
1142 1168
1143 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i") 1169 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i")
1144 DECLARE_HYDROGEN_ACCESSOR(Sub) 1170 DECLARE_HYDROGEN_ACCESSOR(Sub)
1145 }; 1171 };
1146 1172
1147 1173
1148 class LConstantI: public LTemplateInstruction<1, 0, 0> { 1174 class LConstantI V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1149 public: 1175 public:
1150 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") 1176 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i")
1151 DECLARE_HYDROGEN_ACCESSOR(Constant) 1177 DECLARE_HYDROGEN_ACCESSOR(Constant)
1152 1178
1153 int32_t value() const { return hydrogen()->Integer32Value(); } 1179 int32_t value() const { return hydrogen()->Integer32Value(); }
1154 }; 1180 };
1155 1181
1156 1182
1157 class LConstantS: public LTemplateInstruction<1, 0, 0> { 1183 class LConstantS V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1158 public: 1184 public:
1159 DECLARE_CONCRETE_INSTRUCTION(ConstantS, "constant-s") 1185 DECLARE_CONCRETE_INSTRUCTION(ConstantS, "constant-s")
1160 DECLARE_HYDROGEN_ACCESSOR(Constant) 1186 DECLARE_HYDROGEN_ACCESSOR(Constant)
1161 1187
1162 Smi* value() const { return Smi::FromInt(hydrogen()->Integer32Value()); } 1188 Smi* value() const { return Smi::FromInt(hydrogen()->Integer32Value()); }
1163 }; 1189 };
1164 1190
1165 1191
1166 class LConstantD: public LTemplateInstruction<1, 0, 1> { 1192 class LConstantD V8_FINAL : public LTemplateInstruction<1, 0, 1> {
1167 public: 1193 public:
1168 explicit LConstantD(LOperand* temp) { 1194 explicit LConstantD(LOperand* temp) {
1169 temps_[0] = temp; 1195 temps_[0] = temp;
1170 } 1196 }
1171 1197
1172 LOperand* temp() { return temps_[0]; } 1198 LOperand* temp() { return temps_[0]; }
1173 1199
1174 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") 1200 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d")
1175 DECLARE_HYDROGEN_ACCESSOR(Constant) 1201 DECLARE_HYDROGEN_ACCESSOR(Constant)
1176 1202
1177 double value() const { return hydrogen()->DoubleValue(); } 1203 double value() const { return hydrogen()->DoubleValue(); }
1178 }; 1204 };
1179 1205
1180 1206
1181 class LConstantE: public LTemplateInstruction<1, 0, 0> { 1207 class LConstantE V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1182 public: 1208 public:
1183 DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e") 1209 DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e")
1184 DECLARE_HYDROGEN_ACCESSOR(Constant) 1210 DECLARE_HYDROGEN_ACCESSOR(Constant)
1185 1211
1186 ExternalReference value() const { 1212 ExternalReference value() const {
1187 return hydrogen()->ExternalReferenceValue(); 1213 return hydrogen()->ExternalReferenceValue();
1188 } 1214 }
1189 }; 1215 };
1190 1216
1191 1217
1192 class LConstantT: public LTemplateInstruction<1, 0, 0> { 1218 class LConstantT V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1193 public: 1219 public:
1194 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") 1220 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t")
1195 DECLARE_HYDROGEN_ACCESSOR(Constant) 1221 DECLARE_HYDROGEN_ACCESSOR(Constant)
1196 1222
1197 Handle<Object> value() const { return hydrogen()->handle(); } 1223 Handle<Object> value() const { return hydrogen()->handle(); }
1198 }; 1224 };
1199 1225
1200 1226
1201 class LBranch: public LControlInstruction<1, 0> { 1227 class LBranch V8_FINAL : public LControlInstruction<1, 0> {
1202 public: 1228 public:
1203 explicit LBranch(LOperand* value) { 1229 explicit LBranch(LOperand* value) {
1204 inputs_[0] = value; 1230 inputs_[0] = value;
1205 } 1231 }
1206 1232
1207 LOperand* value() { return inputs_[0]; } 1233 LOperand* value() { return inputs_[0]; }
1208 1234
1209 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") 1235 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
1210 DECLARE_HYDROGEN_ACCESSOR(Branch) 1236 DECLARE_HYDROGEN_ACCESSOR(Branch)
1211 1237
1212 virtual void PrintDataTo(StringStream* stream); 1238 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1213 }; 1239 };
1214 1240
1215 1241
1216 class LDebugBreak: public LTemplateInstruction<0, 0, 0> { 1242 class LDebugBreak V8_FINAL : public LTemplateInstruction<0, 0, 0> {
1217 public: 1243 public:
1218 DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break") 1244 DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break")
1219 }; 1245 };
1220 1246
1221 1247
1222 class LCmpMapAndBranch: public LControlInstruction<1, 0> { 1248 class LCmpMapAndBranch V8_FINAL : public LControlInstruction<1, 0> {
1223 public: 1249 public:
1224 explicit LCmpMapAndBranch(LOperand* value) { 1250 explicit LCmpMapAndBranch(LOperand* value) {
1225 inputs_[0] = value; 1251 inputs_[0] = value;
1226 } 1252 }
1227 1253
1228 LOperand* value() { return inputs_[0]; } 1254 LOperand* value() { return inputs_[0]; }
1229 1255
1230 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch") 1256 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch")
1231 DECLARE_HYDROGEN_ACCESSOR(CompareMap) 1257 DECLARE_HYDROGEN_ACCESSOR(CompareMap)
1232 1258
1233 Handle<Map> map() const { return hydrogen()->map(); } 1259 Handle<Map> map() const { return hydrogen()->map(); }
1234 }; 1260 };
1235 1261
1236 1262
1237 class LMapEnumLength: public LTemplateInstruction<1, 1, 0> { 1263 class LMapEnumLength V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1238 public: 1264 public:
1239 explicit LMapEnumLength(LOperand* value) { 1265 explicit LMapEnumLength(LOperand* value) {
1240 inputs_[0] = value; 1266 inputs_[0] = value;
1241 } 1267 }
1242 1268
1243 LOperand* value() { return inputs_[0]; } 1269 LOperand* value() { return inputs_[0]; }
1244 1270
1245 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") 1271 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length")
1246 }; 1272 };
1247 1273
1248 1274
1249 class LElementsKind: public LTemplateInstruction<1, 1, 0> { 1275 class LElementsKind V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1250 public: 1276 public:
1251 explicit LElementsKind(LOperand* value) { 1277 explicit LElementsKind(LOperand* value) {
1252 inputs_[0] = value; 1278 inputs_[0] = value;
1253 } 1279 }
1254 1280
1255 LOperand* value() { return inputs_[0]; } 1281 LOperand* value() { return inputs_[0]; }
1256 1282
1257 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind") 1283 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind")
1258 DECLARE_HYDROGEN_ACCESSOR(ElementsKind) 1284 DECLARE_HYDROGEN_ACCESSOR(ElementsKind)
1259 }; 1285 };
1260 1286
1261 1287
1262 class LValueOf: public LTemplateInstruction<1, 1, 0> { 1288 class LValueOf V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1263 public: 1289 public:
1264 explicit LValueOf(LOperand* value) { 1290 explicit LValueOf(LOperand* value) {
1265 inputs_[0] = value; 1291 inputs_[0] = value;
1266 } 1292 }
1267 1293
1268 LOperand* value() { return inputs_[0]; } 1294 LOperand* value() { return inputs_[0]; }
1269 1295
1270 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") 1296 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of")
1271 DECLARE_HYDROGEN_ACCESSOR(ValueOf) 1297 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
1272 }; 1298 };
1273 1299
1274 1300
1275 class LDateField: public LTemplateInstruction<1, 1, 0> { 1301 class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1276 public: 1302 public:
1277 LDateField(LOperand* date, Smi* index) : index_(index) { 1303 LDateField(LOperand* date, Smi* index) : index_(index) {
1278 inputs_[0] = date; 1304 inputs_[0] = date;
1279 } 1305 }
1280 1306
1281 LOperand* date() { return inputs_[0]; } 1307 LOperand* date() { return inputs_[0]; }
1282 Smi* index() const { return index_; } 1308 Smi* index() const { return index_; }
1283 1309
1284 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field") 1310 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field")
1285 DECLARE_HYDROGEN_ACCESSOR(ValueOf) 1311 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
1286 1312
1287 private: 1313 private:
1288 Smi* index_; 1314 Smi* index_;
1289 }; 1315 };
1290 1316
1291 1317
1292 class LSeqStringSetChar: public LTemplateInstruction<1, 3, 0> { 1318 class LSeqStringSetChar V8_FINAL : public LTemplateInstruction<1, 3, 0> {
1293 public: 1319 public:
1294 LSeqStringSetChar(String::Encoding encoding, 1320 LSeqStringSetChar(String::Encoding encoding,
1295 LOperand* string, 1321 LOperand* string,
1296 LOperand* index, 1322 LOperand* index,
1297 LOperand* value) : encoding_(encoding) { 1323 LOperand* value) : encoding_(encoding) {
1298 inputs_[0] = string; 1324 inputs_[0] = string;
1299 inputs_[1] = index; 1325 inputs_[1] = index;
1300 inputs_[2] = value; 1326 inputs_[2] = value;
1301 } 1327 }
1302 1328
1303 String::Encoding encoding() { return encoding_; } 1329 String::Encoding encoding() { return encoding_; }
1304 LOperand* string() { return inputs_[0]; } 1330 LOperand* string() { return inputs_[0]; }
1305 LOperand* index() { return inputs_[1]; } 1331 LOperand* index() { return inputs_[1]; }
1306 LOperand* value() { return inputs_[2]; } 1332 LOperand* value() { return inputs_[2]; }
1307 1333
1308 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") 1334 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char")
1309 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) 1335 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar)
1310 1336
1311 private: 1337 private:
1312 String::Encoding encoding_; 1338 String::Encoding encoding_;
1313 }; 1339 };
1314 1340
1315 1341
1316 class LThrow: public LTemplateInstruction<0, 1, 0> { 1342 class LThrow V8_FINAL : public LTemplateInstruction<0, 1, 0> {
1317 public: 1343 public:
1318 explicit LThrow(LOperand* value) { 1344 explicit LThrow(LOperand* value) {
1319 inputs_[0] = value; 1345 inputs_[0] = value;
1320 } 1346 }
1321 1347
1322 LOperand* value() { return inputs_[0]; } 1348 LOperand* value() { return inputs_[0]; }
1323 1349
1324 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") 1350 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw")
1325 }; 1351 };
1326 1352
1327 1353
1328 class LAddI: public LTemplateInstruction<1, 2, 0> { 1354 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1329 public: 1355 public:
1330 LAddI(LOperand* left, LOperand* right) { 1356 LAddI(LOperand* left, LOperand* right) {
1331 inputs_[0] = left; 1357 inputs_[0] = left;
1332 inputs_[1] = right; 1358 inputs_[1] = right;
1333 } 1359 }
1334 1360
1335 LOperand* left() { return inputs_[0]; } 1361 LOperand* left() { return inputs_[0]; }
1336 LOperand* right() { return inputs_[1]; } 1362 LOperand* right() { return inputs_[1]; }
1337 1363
1338 static bool UseLea(HAdd* add) { 1364 static bool UseLea(HAdd* add) {
1339 return !add->CheckFlag(HValue::kCanOverflow) && 1365 return !add->CheckFlag(HValue::kCanOverflow) &&
1340 add->BetterLeftOperand()->UseCount() > 1; 1366 add->BetterLeftOperand()->UseCount() > 1;
1341 } 1367 }
1342 1368
1343 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") 1369 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i")
1344 DECLARE_HYDROGEN_ACCESSOR(Add) 1370 DECLARE_HYDROGEN_ACCESSOR(Add)
1345 }; 1371 };
1346 1372
1347 1373
1348 class LMathMinMax: public LTemplateInstruction<1, 2, 0> { 1374 class LMathMinMax V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1349 public: 1375 public:
1350 LMathMinMax(LOperand* left, LOperand* right) { 1376 LMathMinMax(LOperand* left, LOperand* right) {
1351 inputs_[0] = left; 1377 inputs_[0] = left;
1352 inputs_[1] = right; 1378 inputs_[1] = right;
1353 } 1379 }
1354 1380
1355 LOperand* left() { return inputs_[0]; } 1381 LOperand* left() { return inputs_[0]; }
1356 LOperand* right() { return inputs_[1]; } 1382 LOperand* right() { return inputs_[1]; }
1357 1383
1358 DECLARE_CONCRETE_INSTRUCTION(MathMinMax, "math-min-max") 1384 DECLARE_CONCRETE_INSTRUCTION(MathMinMax, "math-min-max")
1359 DECLARE_HYDROGEN_ACCESSOR(MathMinMax) 1385 DECLARE_HYDROGEN_ACCESSOR(MathMinMax)
1360 }; 1386 };
1361 1387
1362 1388
1363 class LPower: public LTemplateInstruction<1, 2, 0> { 1389 class LPower V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1364 public: 1390 public:
1365 LPower(LOperand* left, LOperand* right) { 1391 LPower(LOperand* left, LOperand* right) {
1366 inputs_[0] = left; 1392 inputs_[0] = left;
1367 inputs_[1] = right; 1393 inputs_[1] = right;
1368 } 1394 }
1369 1395
1370 LOperand* left() { return inputs_[0]; } 1396 LOperand* left() { return inputs_[0]; }
1371 LOperand* right() { return inputs_[1]; } 1397 LOperand* right() { return inputs_[1]; }
1372 1398
1373 DECLARE_CONCRETE_INSTRUCTION(Power, "power") 1399 DECLARE_CONCRETE_INSTRUCTION(Power, "power")
1374 DECLARE_HYDROGEN_ACCESSOR(Power) 1400 DECLARE_HYDROGEN_ACCESSOR(Power)
1375 }; 1401 };
1376 1402
1377 1403
1378 class LRandom: public LTemplateInstruction<1, 1, 0> { 1404 class LRandom V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1379 public: 1405 public:
1380 explicit LRandom(LOperand* global_object) { 1406 explicit LRandom(LOperand* global_object) {
1381 inputs_[0] = global_object; 1407 inputs_[0] = global_object;
1382 } 1408 }
1383 1409
1384 LOperand* global_object() { return inputs_[0]; } 1410 LOperand* global_object() { return inputs_[0]; }
1385 1411
1386 DECLARE_CONCRETE_INSTRUCTION(Random, "random") 1412 DECLARE_CONCRETE_INSTRUCTION(Random, "random")
1387 DECLARE_HYDROGEN_ACCESSOR(Random) 1413 DECLARE_HYDROGEN_ACCESSOR(Random)
1388 }; 1414 };
1389 1415
1390 1416
1391 class LArithmeticD: public LTemplateInstruction<1, 2, 0> { 1417 class LArithmeticD V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1392 public: 1418 public:
1393 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) 1419 LArithmeticD(Token::Value op, LOperand* left, LOperand* right)
1394 : op_(op) { 1420 : op_(op) {
1395 inputs_[0] = left; 1421 inputs_[0] = left;
1396 inputs_[1] = right; 1422 inputs_[1] = right;
1397 } 1423 }
1398 1424
1399 Token::Value op() const { return op_; } 1425 Token::Value op() const { return op_; }
1400 LOperand* left() { return inputs_[0]; } 1426 LOperand* left() { return inputs_[0]; }
1401 LOperand* right() { return inputs_[1]; } 1427 LOperand* right() { return inputs_[1]; }
1402 1428
1403 virtual Opcode opcode() const { return LInstruction::kArithmeticD; } 1429 virtual Opcode opcode() const V8_OVERRIDE {
1404 virtual void CompileToNative(LCodeGen* generator); 1430 return LInstruction::kArithmeticD;
1405 virtual const char* Mnemonic() const; 1431 }
1432 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE;
1433 virtual const char* Mnemonic() const V8_OVERRIDE;
1406 1434
1407 private: 1435 private:
1408 Token::Value op_; 1436 Token::Value op_;
1409 }; 1437 };
1410 1438
1411 1439
1412 class LArithmeticT: public LTemplateInstruction<1, 2, 0> { 1440 class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1413 public: 1441 public:
1414 LArithmeticT(Token::Value op, LOperand* left, LOperand* right) 1442 LArithmeticT(Token::Value op, LOperand* left, LOperand* right)
1415 : op_(op) { 1443 : op_(op) {
1416 inputs_[0] = left; 1444 inputs_[0] = left;
1417 inputs_[1] = right; 1445 inputs_[1] = right;
1418 } 1446 }
1419 1447
1420 Token::Value op() const { return op_; } 1448 Token::Value op() const { return op_; }
1421 LOperand* left() { return inputs_[0]; } 1449 LOperand* left() { return inputs_[0]; }
1422 LOperand* right() { return inputs_[1]; } 1450 LOperand* right() { return inputs_[1]; }
1423 1451
1424 virtual Opcode opcode() const { return LInstruction::kArithmeticT; } 1452 virtual Opcode opcode() const V8_OVERRIDE {
1425 virtual void CompileToNative(LCodeGen* generator); 1453 return LInstruction::kArithmeticT;
1426 virtual const char* Mnemonic() const; 1454 }
1455 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE;
1456 virtual const char* Mnemonic() const V8_OVERRIDE;
1427 1457
1428 private: 1458 private:
1429 Token::Value op_; 1459 Token::Value op_;
1430 }; 1460 };
1431 1461
1432 1462
1433 class LReturn: public LTemplateInstruction<0, 2, 0> { 1463 class LReturn V8_FINAL : public LTemplateInstruction<0, 2, 0> {
1434 public: 1464 public:
1435 explicit LReturn(LOperand* value, LOperand* parameter_count) { 1465 explicit LReturn(LOperand* value, LOperand* parameter_count) {
1436 inputs_[0] = value; 1466 inputs_[0] = value;
1437 inputs_[1] = parameter_count; 1467 inputs_[1] = parameter_count;
1438 } 1468 }
1439 1469
1440 LOperand* value() { return inputs_[0]; } 1470 LOperand* value() { return inputs_[0]; }
1441 1471
1442 bool has_constant_parameter_count() { 1472 bool has_constant_parameter_count() {
1443 return parameter_count()->IsConstantOperand(); 1473 return parameter_count()->IsConstantOperand();
1444 } 1474 }
1445 LConstantOperand* constant_parameter_count() { 1475 LConstantOperand* constant_parameter_count() {
1446 ASSERT(has_constant_parameter_count()); 1476 ASSERT(has_constant_parameter_count());
1447 return LConstantOperand::cast(parameter_count()); 1477 return LConstantOperand::cast(parameter_count());
1448 } 1478 }
1449 LOperand* parameter_count() { return inputs_[1]; } 1479 LOperand* parameter_count() { return inputs_[1]; }
1450 1480
1451 DECLARE_CONCRETE_INSTRUCTION(Return, "return") 1481 DECLARE_CONCRETE_INSTRUCTION(Return, "return")
1452 DECLARE_HYDROGEN_ACCESSOR(Return) 1482 DECLARE_HYDROGEN_ACCESSOR(Return)
1453 }; 1483 };
1454 1484
1455 1485
1456 class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { 1486 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1457 public: 1487 public:
1458 explicit LLoadNamedField(LOperand* object) { 1488 explicit LLoadNamedField(LOperand* object) {
1459 inputs_[0] = object; 1489 inputs_[0] = object;
1460 } 1490 }
1461 1491
1462 LOperand* object() { return inputs_[0]; } 1492 LOperand* object() { return inputs_[0]; }
1463 1493
1464 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") 1494 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field")
1465 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) 1495 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField)
1466 }; 1496 };
1467 1497
1468 1498
1469 class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 1, 0> { 1499 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1470 public:
1471 explicit LLoadNamedFieldPolymorphic(LOperand* object) {
1472 inputs_[0] = object;
1473 }
1474
1475 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field-polymorphic")
1476 DECLARE_HYDROGEN_ACCESSOR(LoadNamedFieldPolymorphic)
1477
1478 LOperand* object() { return inputs_[0]; }
1479 };
1480
1481
1482 class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> {
1483 public: 1500 public:
1484 explicit LLoadNamedGeneric(LOperand* object) { 1501 explicit LLoadNamedGeneric(LOperand* object) {
1485 inputs_[0] = object; 1502 inputs_[0] = object;
1486 } 1503 }
1487 1504
1488 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") 1505 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic")
1489 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) 1506 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric)
1490 1507
1491 LOperand* object() { return inputs_[0]; } 1508 LOperand* object() { return inputs_[0]; }
1492 Handle<Object> name() const { return hydrogen()->name(); } 1509 Handle<Object> name() const { return hydrogen()->name(); }
1493 }; 1510 };
1494 1511
1495 1512
1496 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 0> { 1513 class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1497 public: 1514 public:
1498 explicit LLoadFunctionPrototype(LOperand* function) { 1515 explicit LLoadFunctionPrototype(LOperand* function) {
1499 inputs_[0] = function; 1516 inputs_[0] = function;
1500 } 1517 }
1501 1518
1502 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype") 1519 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype")
1503 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype) 1520 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype)
1504 1521
1505 LOperand* function() { return inputs_[0]; } 1522 LOperand* function() { return inputs_[0]; }
1506 }; 1523 };
1507 1524
1508 1525
1509 class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> { 1526 class LLoadExternalArrayPointer V8_FINAL
1527 : public LTemplateInstruction<1, 1, 0> {
1510 public: 1528 public:
1511 explicit LLoadExternalArrayPointer(LOperand* object) { 1529 explicit LLoadExternalArrayPointer(LOperand* object) {
1512 inputs_[0] = object; 1530 inputs_[0] = object;
1513 } 1531 }
1514 1532
1515 LOperand* object() { return inputs_[0]; } 1533 LOperand* object() { return inputs_[0]; }
1516 1534
1517 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer, 1535 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer,
1518 "load-external-array-pointer") 1536 "load-external-array-pointer")
1519 }; 1537 };
1520 1538
1521 1539
1522 class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { 1540 class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1523 public: 1541 public:
1524 LLoadKeyed(LOperand* elements, LOperand* key) { 1542 LLoadKeyed(LOperand* elements, LOperand* key) {
1525 inputs_[0] = elements; 1543 inputs_[0] = elements;
1526 inputs_[1] = key; 1544 inputs_[1] = key;
1527 } 1545 }
1528 1546
1529 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") 1547 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
1530 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) 1548 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
1531 1549
1532 bool is_external() const { 1550 bool is_external() const {
1533 return hydrogen()->is_external(); 1551 return hydrogen()->is_external();
1534 } 1552 }
1535 LOperand* elements() { return inputs_[0]; } 1553 LOperand* elements() { return inputs_[0]; }
1536 LOperand* key() { return inputs_[1]; } 1554 LOperand* key() { return inputs_[1]; }
1537 virtual void PrintDataTo(StringStream* stream); 1555 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1538 uint32_t additional_index() const { return hydrogen()->index_offset(); } 1556 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1539 ElementsKind elements_kind() const { 1557 ElementsKind elements_kind() const {
1540 return hydrogen()->elements_kind(); 1558 return hydrogen()->elements_kind();
1541 } 1559 }
1542 }; 1560 };
1543 1561
1544 1562
1545 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { 1563 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1546 public: 1564 public:
1547 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { 1565 LLoadKeyedGeneric(LOperand* obj, LOperand* key) {
1548 inputs_[0] = obj; 1566 inputs_[0] = obj;
1549 inputs_[1] = key; 1567 inputs_[1] = key;
1550 } 1568 }
1551 1569
1552 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") 1570 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic")
1553 1571
1554 LOperand* object() { return inputs_[0]; } 1572 LOperand* object() { return inputs_[0]; }
1555 LOperand* key() { return inputs_[1]; } 1573 LOperand* key() { return inputs_[1]; }
1556 }; 1574 };
1557 1575
1558 1576
1559 class LLoadGlobalCell: public LTemplateInstruction<1, 0, 0> { 1577 class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1560 public: 1578 public:
1561 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") 1579 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell")
1562 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) 1580 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell)
1563 }; 1581 };
1564 1582
1565 1583
1566 class LLoadGlobalGeneric: public LTemplateInstruction<1, 1, 0> { 1584 class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1567 public: 1585 public:
1568 explicit LLoadGlobalGeneric(LOperand* global_object) { 1586 explicit LLoadGlobalGeneric(LOperand* global_object) {
1569 inputs_[0] = global_object; 1587 inputs_[0] = global_object;
1570 } 1588 }
1571 1589
1572 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") 1590 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic")
1573 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) 1591 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric)
1574 1592
1575 LOperand* global_object() { return inputs_[0]; } 1593 LOperand* global_object() { return inputs_[0]; }
1576 Handle<Object> name() const { return hydrogen()->name(); } 1594 Handle<Object> name() const { return hydrogen()->name(); }
1577 bool for_typeof() const { return hydrogen()->for_typeof(); } 1595 bool for_typeof() const { return hydrogen()->for_typeof(); }
1578 }; 1596 };
1579 1597
1580 1598
1581 class LStoreGlobalCell: public LTemplateInstruction<0, 1, 1> { 1599 class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> {
1582 public: 1600 public:
1583 explicit LStoreGlobalCell(LOperand* value, LOperand* temp) { 1601 explicit LStoreGlobalCell(LOperand* value, LOperand* temp) {
1584 inputs_[0] = value; 1602 inputs_[0] = value;
1585 temps_[0] = temp; 1603 temps_[0] = temp;
1586 } 1604 }
1587 1605
1588 LOperand* value() { return inputs_[0]; } 1606 LOperand* value() { return inputs_[0]; }
1589 LOperand* temp() { return temps_[0]; } 1607 LOperand* temp() { return temps_[0]; }
1590 1608
1591 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") 1609 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell")
1592 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) 1610 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell)
1593 }; 1611 };
1594 1612
1595 1613
1596 class LStoreGlobalGeneric: public LTemplateInstruction<0, 2, 0> { 1614 class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> {
1597 public: 1615 public:
1598 explicit LStoreGlobalGeneric(LOperand* global_object, 1616 explicit LStoreGlobalGeneric(LOperand* global_object,
1599 LOperand* value) { 1617 LOperand* value) {
1600 inputs_[0] = global_object; 1618 inputs_[0] = global_object;
1601 inputs_[1] = value; 1619 inputs_[1] = value;
1602 } 1620 }
1603 1621
1604 LOperand* global_object() { return inputs_[0]; } 1622 LOperand* global_object() { return inputs_[0]; }
1605 LOperand* value() { return inputs_[1]; } 1623 LOperand* value() { return inputs_[1]; }
1606 1624
1607 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") 1625 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic")
1608 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) 1626 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric)
1609 1627
1610 Handle<Object> name() const { return hydrogen()->name(); } 1628 Handle<Object> name() const { return hydrogen()->name(); }
1611 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 1629 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1612 }; 1630 };
1613 1631
1614 1632
1615 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { 1633 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1616 public: 1634 public:
1617 explicit LLoadContextSlot(LOperand* context) { 1635 explicit LLoadContextSlot(LOperand* context) {
1618 inputs_[0] = context; 1636 inputs_[0] = context;
1619 } 1637 }
1620 1638
1621 LOperand* context() { return inputs_[0]; } 1639 LOperand* context() { return inputs_[0]; }
1622 1640
1623 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") 1641 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot")
1624 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) 1642 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot)
1625 1643
1626 int slot_index() { return hydrogen()->slot_index(); } 1644 int slot_index() { return hydrogen()->slot_index(); }
1627 1645
1628 virtual void PrintDataTo(StringStream* stream); 1646 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1629 }; 1647 };
1630 1648
1631 1649
1632 class LStoreContextSlot: public LTemplateInstruction<0, 2, 1> { 1650 class LStoreContextSlot V8_FINAL : public LTemplateInstruction<0, 2, 1> {
1633 public: 1651 public:
1634 LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) { 1652 LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) {
1635 inputs_[0] = context; 1653 inputs_[0] = context;
1636 inputs_[1] = value; 1654 inputs_[1] = value;
1637 temps_[0] = temp; 1655 temps_[0] = temp;
1638 } 1656 }
1639 1657
1640 LOperand* context() { return inputs_[0]; } 1658 LOperand* context() { return inputs_[0]; }
1641 LOperand* value() { return inputs_[1]; } 1659 LOperand* value() { return inputs_[1]; }
1642 LOperand* temp() { return temps_[0]; } 1660 LOperand* temp() { return temps_[0]; }
1643 1661
1644 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") 1662 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot")
1645 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) 1663 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot)
1646 1664
1647 int slot_index() { return hydrogen()->slot_index(); } 1665 int slot_index() { return hydrogen()->slot_index(); }
1648 1666
1649 virtual void PrintDataTo(StringStream* stream); 1667 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1650 }; 1668 };
1651 1669
1652 1670
1653 class LPushArgument: public LTemplateInstruction<0, 1, 0> { 1671 class LPushArgument V8_FINAL : public LTemplateInstruction<0, 1, 0> {
1654 public: 1672 public:
1655 explicit LPushArgument(LOperand* value) { 1673 explicit LPushArgument(LOperand* value) {
1656 inputs_[0] = value; 1674 inputs_[0] = value;
1657 } 1675 }
1658 1676
1659 LOperand* value() { return inputs_[0]; } 1677 LOperand* value() { return inputs_[0]; }
1660 1678
1661 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") 1679 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument")
1662 }; 1680 };
1663 1681
1664 1682
1665 class LDrop: public LTemplateInstruction<0, 0, 0> { 1683 class LDrop V8_FINAL : public LTemplateInstruction<0, 0, 0> {
1666 public: 1684 public:
1667 explicit LDrop(int count) : count_(count) { } 1685 explicit LDrop(int count) : count_(count) { }
1668 1686
1669 int count() const { return count_; } 1687 int count() const { return count_; }
1670 1688
1671 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop") 1689 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop")
1672 1690
1673 private: 1691 private:
1674 int count_; 1692 int count_;
1675 }; 1693 };
1676 1694
1677 1695
1678 class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> { 1696 class LInnerAllocatedObject V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1679 public: 1697 public:
1680 explicit LInnerAllocatedObject(LOperand* base_object) { 1698 explicit LInnerAllocatedObject(LOperand* base_object) {
1681 inputs_[0] = base_object; 1699 inputs_[0] = base_object;
1682 } 1700 }
1683 1701
1684 LOperand* base_object() { return inputs_[0]; } 1702 LOperand* base_object() { return inputs_[0]; }
1685 int offset() { return hydrogen()->offset(); } 1703 int offset() { return hydrogen()->offset(); }
1686 1704
1687 virtual void PrintDataTo(StringStream* stream); 1705 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1688 1706
1689 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "sub-allocated-object") 1707 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "sub-allocated-object")
1690 DECLARE_HYDROGEN_ACCESSOR(InnerAllocatedObject) 1708 DECLARE_HYDROGEN_ACCESSOR(InnerAllocatedObject)
1691 }; 1709 };
1692 1710
1693 1711
1694 class LThisFunction: public LTemplateInstruction<1, 0, 0> { 1712 class LThisFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1695 public: 1713 public:
1696 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") 1714 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
1697 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) 1715 DECLARE_HYDROGEN_ACCESSOR(ThisFunction)
1698 }; 1716 };
1699 1717
1700 1718
1701 class LContext: public LTemplateInstruction<1, 0, 0> { 1719 class LContext V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1702 public: 1720 public:
1703 DECLARE_CONCRETE_INSTRUCTION(Context, "context") 1721 DECLARE_CONCRETE_INSTRUCTION(Context, "context")
1704 DECLARE_HYDROGEN_ACCESSOR(Context) 1722 DECLARE_HYDROGEN_ACCESSOR(Context)
1705 }; 1723 };
1706 1724
1707 1725
1708 class LOuterContext: public LTemplateInstruction<1, 1, 0> { 1726 class LOuterContext V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1709 public: 1727 public:
1710 explicit LOuterContext(LOperand* context) { 1728 explicit LOuterContext(LOperand* context) {
1711 inputs_[0] = context; 1729 inputs_[0] = context;
1712 } 1730 }
1713 1731
1714 LOperand* context() { return inputs_[0]; } 1732 LOperand* context() { return inputs_[0]; }
1715 1733
1716 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") 1734 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
1717 }; 1735 };
1718 1736
1719 1737
1720 class LDeclareGlobals: public LTemplateInstruction<0, 0, 0> { 1738 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 0, 0> {
1721 public: 1739 public:
1722 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") 1740 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals")
1723 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) 1741 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals)
1724 }; 1742 };
1725 1743
1726 1744
1727 class LGlobalObject: public LTemplateInstruction<1, 0, 0> { 1745 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1728 public: 1746 public:
1729 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") 1747 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object")
1730 }; 1748 };
1731 1749
1732 1750
1733 class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { 1751 class LGlobalReceiver V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1734 public: 1752 public:
1735 explicit LGlobalReceiver(LOperand* global_object) { 1753 explicit LGlobalReceiver(LOperand* global_object) {
1736 inputs_[0] = global_object; 1754 inputs_[0] = global_object;
1737 } 1755 }
1738 1756
1739 LOperand* global() { return inputs_[0]; } 1757 LOperand* global() { return inputs_[0]; }
1740 1758
1741 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") 1759 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver")
1742 }; 1760 };
1743 1761
1744 1762
1745 class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> { 1763 class LCallConstantFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1746 public: 1764 public:
1747 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") 1765 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function")
1748 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) 1766 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction)
1749 1767
1750 virtual void PrintDataTo(StringStream* stream); 1768 virtual void PrintDataTo(StringStream* stream);
1751 1769
1752 Handle<JSFunction> function() { return hydrogen()->function(); } 1770 Handle<JSFunction> function() { return hydrogen()->function(); }
1753 int arity() const { return hydrogen()->argument_count() - 1; } 1771 int arity() const { return hydrogen()->argument_count() - 1; }
1754 }; 1772 };
1755 1773
1756 1774
1757 class LInvokeFunction: public LTemplateInstruction<1, 1, 0> { 1775 class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1758 public: 1776 public:
1759 explicit LInvokeFunction(LOperand* function) { 1777 explicit LInvokeFunction(LOperand* function) {
1760 inputs_[0] = function; 1778 inputs_[0] = function;
1761 } 1779 }
1762 1780
1763 LOperand* function() { return inputs_[0]; } 1781 LOperand* function() { return inputs_[0]; }
1764 1782
1765 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") 1783 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
1766 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) 1784 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
1767 1785
1768 virtual void PrintDataTo(StringStream* stream); 1786 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1769 1787
1770 int arity() const { return hydrogen()->argument_count() - 1; } 1788 int arity() const { return hydrogen()->argument_count() - 1; }
1771 }; 1789 };
1772 1790
1773 1791
1774 class LCallKeyed: public LTemplateInstruction<1, 1, 0> { 1792 class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1775 public: 1793 public:
1776 explicit LCallKeyed(LOperand* key) { 1794 explicit LCallKeyed(LOperand* key) {
1777 inputs_[0] = key; 1795 inputs_[0] = key;
1778 } 1796 }
1779 1797
1780 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") 1798 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")
1781 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) 1799 DECLARE_HYDROGEN_ACCESSOR(CallKeyed)
1782 1800
1783 LOperand* key() { return inputs_[0]; } 1801 LOperand* key() { return inputs_[0]; }
1784 1802
1785 virtual void PrintDataTo(StringStream* stream); 1803 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1786 1804
1787 int arity() const { return hydrogen()->argument_count() - 1; } 1805 int arity() const { return hydrogen()->argument_count() - 1; }
1788 }; 1806 };
1789 1807
1790 1808
1791 class LCallNamed: public LTemplateInstruction<1, 0, 0> { 1809 class LCallNamed V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1792 public: 1810 public:
1793 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") 1811 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named")
1794 DECLARE_HYDROGEN_ACCESSOR(CallNamed) 1812 DECLARE_HYDROGEN_ACCESSOR(CallNamed)
1795 1813
1796 virtual void PrintDataTo(StringStream* stream); 1814 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1797 1815
1798 Handle<String> name() const { return hydrogen()->name(); } 1816 Handle<String> name() const { return hydrogen()->name(); }
1799 int arity() const { return hydrogen()->argument_count() - 1; } 1817 int arity() const { return hydrogen()->argument_count() - 1; }
1800 }; 1818 };
1801 1819
1802 1820
1803 class LCallFunction: public LTemplateInstruction<1, 1, 0> { 1821 class LCallFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1804 public: 1822 public:
1805 explicit LCallFunction(LOperand* function) { 1823 explicit LCallFunction(LOperand* function) {
1806 inputs_[0] = function; 1824 inputs_[0] = function;
1807 } 1825 }
1808 1826
1809 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") 1827 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
1810 DECLARE_HYDROGEN_ACCESSOR(CallFunction) 1828 DECLARE_HYDROGEN_ACCESSOR(CallFunction)
1811 1829
1812 LOperand* function() { return inputs_[0]; } 1830 LOperand* function() { return inputs_[0]; }
1813 int arity() const { return hydrogen()->argument_count() - 1; } 1831 int arity() const { return hydrogen()->argument_count() - 1; }
1814 }; 1832 };
1815 1833
1816 1834
1817 class LCallGlobal: public LTemplateInstruction<1, 0, 0> { 1835 class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1818 public: 1836 public:
1819 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") 1837 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
1820 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) 1838 DECLARE_HYDROGEN_ACCESSOR(CallGlobal)
1821 1839
1822 virtual void PrintDataTo(StringStream* stream); 1840 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1823 1841
1824 Handle<String> name() const {return hydrogen()->name(); } 1842 Handle<String> name() const {return hydrogen()->name(); }
1825 int arity() const { return hydrogen()->argument_count() - 1; } 1843 int arity() const { return hydrogen()->argument_count() - 1; }
1826 }; 1844 };
1827 1845
1828 1846
1829 class LCallKnownGlobal: public LTemplateInstruction<1, 0, 0> { 1847 class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1830 public: 1848 public:
1831 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") 1849 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global")
1832 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) 1850 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal)
1833 1851
1834 virtual void PrintDataTo(StringStream* stream); 1852 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1835 1853
1836 int arity() const { return hydrogen()->argument_count() - 1; } 1854 int arity() const { return hydrogen()->argument_count() - 1; }
1837 }; 1855 };
1838 1856
1839 1857
1840 class LCallNew: public LTemplateInstruction<1, 1, 0> { 1858 class LCallNew V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1841 public: 1859 public:
1842 explicit LCallNew(LOperand* constructor) { 1860 explicit LCallNew(LOperand* constructor) {
1843 inputs_[0] = constructor; 1861 inputs_[0] = constructor;
1844 } 1862 }
1845 1863
1846 LOperand* constructor() { return inputs_[0]; } 1864 LOperand* constructor() { return inputs_[0]; }
1847 1865
1848 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") 1866 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
1849 DECLARE_HYDROGEN_ACCESSOR(CallNew) 1867 DECLARE_HYDROGEN_ACCESSOR(CallNew)
1850 1868
1851 virtual void PrintDataTo(StringStream* stream); 1869 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1852 1870
1853 int arity() const { return hydrogen()->argument_count() - 1; } 1871 int arity() const { return hydrogen()->argument_count() - 1; }
1854 }; 1872 };
1855 1873
1856 1874
1857 class LCallNewArray: public LTemplateInstruction<1, 1, 0> { 1875 class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1858 public: 1876 public:
1859 explicit LCallNewArray(LOperand* constructor) { 1877 explicit LCallNewArray(LOperand* constructor) {
1860 inputs_[0] = constructor; 1878 inputs_[0] = constructor;
1861 } 1879 }
1862 1880
1863 LOperand* constructor() { return inputs_[0]; } 1881 LOperand* constructor() { return inputs_[0]; }
1864 1882
1865 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") 1883 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
1866 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) 1884 DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
1867 1885
1868 virtual void PrintDataTo(StringStream* stream); 1886 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1869 1887
1870 int arity() const { return hydrogen()->argument_count() - 1; } 1888 int arity() const { return hydrogen()->argument_count() - 1; }
1871 }; 1889 };
1872 1890
1873 1891
1874 class LCallRuntime: public LTemplateInstruction<1, 0, 0> { 1892 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1875 public: 1893 public:
1876 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 1894 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
1877 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 1895 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
1878 1896
1879 const Runtime::Function* function() const { return hydrogen()->function(); } 1897 const Runtime::Function* function() const { return hydrogen()->function(); }
1880 int arity() const { return hydrogen()->argument_count(); } 1898 int arity() const { return hydrogen()->argument_count(); }
1881 }; 1899 };
1882 1900
1883 1901
1884 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { 1902 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1885 public: 1903 public:
1886 explicit LInteger32ToDouble(LOperand* value) { 1904 explicit LInteger32ToDouble(LOperand* value) {
1887 inputs_[0] = value; 1905 inputs_[0] = value;
1888 } 1906 }
1889 1907
1890 LOperand* value() { return inputs_[0]; } 1908 LOperand* value() { return inputs_[0]; }
1891 1909
1892 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") 1910 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double")
1893 }; 1911 };
1894 1912
1895 1913
1896 class LInteger32ToSmi: public LTemplateInstruction<1, 1, 0> { 1914 class LInteger32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1897 public: 1915 public:
1898 explicit LInteger32ToSmi(LOperand* value) { 1916 explicit LInteger32ToSmi(LOperand* value) {
1899 inputs_[0] = value; 1917 inputs_[0] = value;
1900 } 1918 }
1901 1919
1902 LOperand* value() { return inputs_[0]; } 1920 LOperand* value() { return inputs_[0]; }
1903 1921
1904 DECLARE_CONCRETE_INSTRUCTION(Integer32ToSmi, "int32-to-smi") 1922 DECLARE_CONCRETE_INSTRUCTION(Integer32ToSmi, "int32-to-smi")
1905 DECLARE_HYDROGEN_ACCESSOR(Change) 1923 DECLARE_HYDROGEN_ACCESSOR(Change)
1906 }; 1924 };
1907 1925
1908 1926
1909 class LUint32ToDouble: public LTemplateInstruction<1, 1, 1> { 1927 class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 1> {
1910 public: 1928 public:
1911 explicit LUint32ToDouble(LOperand* value, LOperand* temp) { 1929 explicit LUint32ToDouble(LOperand* value, LOperand* temp) {
1912 inputs_[0] = value; 1930 inputs_[0] = value;
1913 temps_[0] = temp; 1931 temps_[0] = temp;
1914 } 1932 }
1915 1933
1916 LOperand* value() { return inputs_[0]; } 1934 LOperand* value() { return inputs_[0]; }
1917 LOperand* temp() { return temps_[0]; } 1935 LOperand* temp() { return temps_[0]; }
1918 1936
1919 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") 1937 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double")
1920 }; 1938 };
1921 1939
1922 1940
1923 class LNumberTagI: public LTemplateInstruction<1, 1, 0> { 1941 class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1924 public: 1942 public:
1925 explicit LNumberTagI(LOperand* value) { 1943 explicit LNumberTagI(LOperand* value) {
1926 inputs_[0] = value; 1944 inputs_[0] = value;
1927 } 1945 }
1928 1946
1929 LOperand* value() { return inputs_[0]; } 1947 LOperand* value() { return inputs_[0]; }
1930 1948
1931 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") 1949 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i")
1932 }; 1950 };
1933 1951
1934 1952
1935 class LNumberTagU: public LTemplateInstruction<1, 1, 1> { 1953 class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 1> {
1936 public: 1954 public:
1937 explicit LNumberTagU(LOperand* value, LOperand* temp) { 1955 explicit LNumberTagU(LOperand* value, LOperand* temp) {
1938 inputs_[0] = value; 1956 inputs_[0] = value;
1939 temps_[0] = temp; 1957 temps_[0] = temp;
1940 } 1958 }
1941 1959
1942 LOperand* value() { return inputs_[0]; } 1960 LOperand* value() { return inputs_[0]; }
1943 LOperand* temp() { return temps_[0]; } 1961 LOperand* temp() { return temps_[0]; }
1944 1962
1945 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u") 1963 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u")
1946 }; 1964 };
1947 1965
1948 1966
1949 class LNumberTagD: public LTemplateInstruction<1, 1, 1> { 1967 class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 1> {
1950 public: 1968 public:
1951 explicit LNumberTagD(LOperand* value, LOperand* temp) { 1969 explicit LNumberTagD(LOperand* value, LOperand* temp) {
1952 inputs_[0] = value; 1970 inputs_[0] = value;
1953 temps_[0] = temp; 1971 temps_[0] = temp;
1954 } 1972 }
1955 1973
1956 LOperand* value() { return inputs_[0]; } 1974 LOperand* value() { return inputs_[0]; }
1957 LOperand* temp() { return temps_[0]; } 1975 LOperand* temp() { return temps_[0]; }
1958 1976
1959 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") 1977 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d")
1960 DECLARE_HYDROGEN_ACCESSOR(Change) 1978 DECLARE_HYDROGEN_ACCESSOR(Change)
1961 }; 1979 };
1962 1980
1963 1981
1964 // Sometimes truncating conversion from a tagged value to an int32. 1982 // Sometimes truncating conversion from a tagged value to an int32.
1965 class LDoubleToI: public LTemplateInstruction<1, 1, 0> { 1983 class LDoubleToI V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1966 public: 1984 public:
1967 explicit LDoubleToI(LOperand* value) { 1985 explicit LDoubleToI(LOperand* value) {
1968 inputs_[0] = value; 1986 inputs_[0] = value;
1969 } 1987 }
1970 1988
1971 LOperand* value() { return inputs_[0]; } 1989 LOperand* value() { return inputs_[0]; }
1972 1990
1973 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i") 1991 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i")
1974 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) 1992 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
1975 1993
1976 bool truncating() { return hydrogen()->CanTruncateToInt32(); } 1994 bool truncating() { return hydrogen()->CanTruncateToInt32(); }
1977 }; 1995 };
1978 1996
1979 1997
1980 class LDoubleToSmi: public LTemplateInstruction<1, 1, 0> { 1998 class LDoubleToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1981 public: 1999 public:
1982 explicit LDoubleToSmi(LOperand* value) { 2000 explicit LDoubleToSmi(LOperand* value) {
1983 inputs_[0] = value; 2001 inputs_[0] = value;
1984 } 2002 }
1985 2003
1986 LOperand* value() { return inputs_[0]; } 2004 LOperand* value() { return inputs_[0]; }
1987 2005
1988 DECLARE_CONCRETE_INSTRUCTION(DoubleToSmi, "double-to-smi") 2006 DECLARE_CONCRETE_INSTRUCTION(DoubleToSmi, "double-to-smi")
1989 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) 2007 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
1990 }; 2008 };
1991 2009
1992 2010
1993 // Truncating conversion from a tagged value to an int32. 2011 // Truncating conversion from a tagged value to an int32.
1994 class LTaggedToI: public LTemplateInstruction<1, 1, 1> { 2012 class LTaggedToI V8_FINAL : public LTemplateInstruction<1, 1, 1> {
1995 public: 2013 public:
1996 LTaggedToI(LOperand* value, LOperand* temp) { 2014 LTaggedToI(LOperand* value, LOperand* temp) {
1997 inputs_[0] = value; 2015 inputs_[0] = value;
1998 temps_[0] = temp; 2016 temps_[0] = temp;
1999 } 2017 }
2000 2018
2001 LOperand* value() { return inputs_[0]; } 2019 LOperand* value() { return inputs_[0]; }
2002 LOperand* temp() { return temps_[0]; } 2020 LOperand* temp() { return temps_[0]; }
2003 2021
2004 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") 2022 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i")
2005 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) 2023 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
2006 2024
2007 bool truncating() { return hydrogen()->CanTruncateToInt32(); } 2025 bool truncating() { return hydrogen()->CanTruncateToInt32(); }
2008 }; 2026 };
2009 2027
2010 2028
2011 class LSmiTag: public LTemplateInstruction<1, 1, 0> { 2029 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2012 public: 2030 public:
2013 explicit LSmiTag(LOperand* value) { 2031 explicit LSmiTag(LOperand* value) {
2014 inputs_[0] = value; 2032 inputs_[0] = value;
2015 } 2033 }
2016 2034
2017 LOperand* value() { return inputs_[0]; } 2035 LOperand* value() { return inputs_[0]; }
2018 2036
2019 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") 2037 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag")
2020 }; 2038 };
2021 2039
2022 2040
2023 class LNumberUntagD: public LTemplateInstruction<1, 1, 0> { 2041 class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2024 public: 2042 public:
2025 explicit LNumberUntagD(LOperand* value) { 2043 explicit LNumberUntagD(LOperand* value) {
2026 inputs_[0] = value; 2044 inputs_[0] = value;
2027 } 2045 }
2028 2046
2029 LOperand* value() { return inputs_[0]; } 2047 LOperand* value() { return inputs_[0]; }
2030 2048
2031 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") 2049 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag")
2032 DECLARE_HYDROGEN_ACCESSOR(Change); 2050 DECLARE_HYDROGEN_ACCESSOR(Change);
2033 }; 2051 };
2034 2052
2035 2053
2036 class LSmiUntag: public LTemplateInstruction<1, 1, 0> { 2054 class LSmiUntag V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2037 public: 2055 public:
2038 LSmiUntag(LOperand* value, bool needs_check) 2056 LSmiUntag(LOperand* value, bool needs_check)
2039 : needs_check_(needs_check) { 2057 : needs_check_(needs_check) {
2040 inputs_[0] = value; 2058 inputs_[0] = value;
2041 } 2059 }
2042 2060
2043 LOperand* value() { return inputs_[0]; } 2061 LOperand* value() { return inputs_[0]; }
2044 bool needs_check() const { return needs_check_; } 2062 bool needs_check() const { return needs_check_; }
2045 2063
2046 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") 2064 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag")
2047 2065
2048 private: 2066 private:
2049 bool needs_check_; 2067 bool needs_check_;
2050 }; 2068 };
2051 2069
2052 2070
2053 class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { 2071 class LStoreNamedField V8_FINAL : public LTemplateInstruction<0, 2, 1> {
2054 public: 2072 public:
2055 LStoreNamedField(LOperand* object, LOperand* value, LOperand* temp) { 2073 LStoreNamedField(LOperand* object, LOperand* value, LOperand* temp) {
2056 inputs_[0] = object; 2074 inputs_[0] = object;
2057 inputs_[1] = value; 2075 inputs_[1] = value;
2058 temps_[0] = temp; 2076 temps_[0] = temp;
2059 } 2077 }
2060 2078
2061 LOperand* object() { return inputs_[0]; } 2079 LOperand* object() { return inputs_[0]; }
2062 LOperand* value() { return inputs_[1]; } 2080 LOperand* value() { return inputs_[1]; }
2063 LOperand* temp() { return temps_[0]; } 2081 LOperand* temp() { return temps_[0]; }
2064 2082
2065 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") 2083 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
2066 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) 2084 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
2067 2085
2068 virtual void PrintDataTo(StringStream* stream); 2086 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2069 2087
2070 Handle<Map> transition() const { return hydrogen()->transition_map(); } 2088 Handle<Map> transition() const { return hydrogen()->transition_map(); }
2071 Representation representation() const { 2089 Representation representation() const {
2072 return hydrogen()->field_representation(); 2090 return hydrogen()->field_representation();
2073 } 2091 }
2074 }; 2092 };
2075 2093
2076 2094
2077 class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { 2095 class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> {
2078 public: 2096 public:
2079 LStoreNamedGeneric(LOperand* object, LOperand* value) { 2097 LStoreNamedGeneric(LOperand* object, LOperand* value) {
2080 inputs_[0] = object; 2098 inputs_[0] = object;
2081 inputs_[1] = value; 2099 inputs_[1] = value;
2082 } 2100 }
2083 2101
2084 LOperand* object() { return inputs_[0]; } 2102 LOperand* object() { return inputs_[0]; }
2085 LOperand* value() { return inputs_[1]; } 2103 LOperand* value() { return inputs_[1]; }
2086 2104
2087 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 2105 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
2088 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 2106 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
2089 2107
2090 virtual void PrintDataTo(StringStream* stream); 2108 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2091 2109
2092 Handle<Object> name() const { return hydrogen()->name(); } 2110 Handle<Object> name() const { return hydrogen()->name(); }
2093 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2111 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
2094 }; 2112 };
2095 2113
2096 2114
2097 class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { 2115 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> {
2098 public: 2116 public:
2099 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { 2117 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) {
2100 inputs_[0] = object; 2118 inputs_[0] = object;
2101 inputs_[1] = key; 2119 inputs_[1] = key;
2102 inputs_[2] = value; 2120 inputs_[2] = value;
2103 } 2121 }
2104 2122
2105 bool is_external() const { return hydrogen()->is_external(); } 2123 bool is_external() const { return hydrogen()->is_external(); }
2106 LOperand* elements() { return inputs_[0]; } 2124 LOperand* elements() { return inputs_[0]; }
2107 LOperand* key() { return inputs_[1]; } 2125 LOperand* key() { return inputs_[1]; }
2108 LOperand* value() { return inputs_[2]; } 2126 LOperand* value() { return inputs_[2]; }
2109 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } 2127 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); }
2110 2128
2111 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") 2129 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
2112 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) 2130 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
2113 2131
2114 virtual void PrintDataTo(StringStream* stream); 2132 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2115 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } 2133 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
2116 uint32_t additional_index() const { return hydrogen()->index_offset(); } 2134 uint32_t additional_index() const { return hydrogen()->index_offset(); }
2117 }; 2135 };
2118 2136
2119 2137
2120 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { 2138 class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> {
2121 public: 2139 public:
2122 LStoreKeyedGeneric(LOperand* object, LOperand* key, LOperand* value) { 2140 LStoreKeyedGeneric(LOperand* object, LOperand* key, LOperand* value) {
2123 inputs_[0] = object; 2141 inputs_[0] = object;
2124 inputs_[1] = key; 2142 inputs_[1] = key;
2125 inputs_[2] = value; 2143 inputs_[2] = value;
2126 } 2144 }
2127 2145
2128 LOperand* object() { return inputs_[0]; } 2146 LOperand* object() { return inputs_[0]; }
2129 LOperand* key() { return inputs_[1]; } 2147 LOperand* key() { return inputs_[1]; }
2130 LOperand* value() { return inputs_[2]; } 2148 LOperand* value() { return inputs_[2]; }
2131 2149
2132 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 2150 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
2133 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) 2151 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
2134 2152
2135 virtual void PrintDataTo(StringStream* stream); 2153 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2136 2154
2137 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2155 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
2138 }; 2156 };
2139 2157
2140 2158
2141 class LTransitionElementsKind: public LTemplateInstruction<0, 1, 2> { 2159 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 1, 2> {
2142 public: 2160 public:
2143 LTransitionElementsKind(LOperand* object, 2161 LTransitionElementsKind(LOperand* object,
2144 LOperand* new_map_temp, 2162 LOperand* new_map_temp,
2145 LOperand* temp) { 2163 LOperand* temp) {
2146 inputs_[0] = object; 2164 inputs_[0] = object;
2147 temps_[0] = new_map_temp; 2165 temps_[0] = new_map_temp;
2148 temps_[1] = temp; 2166 temps_[1] = temp;
2149 } 2167 }
2150 2168
2151 LOperand* object() { return inputs_[0]; } 2169 LOperand* object() { return inputs_[0]; }
2152 LOperand* new_map_temp() { return temps_[0]; } 2170 LOperand* new_map_temp() { return temps_[0]; }
2153 LOperand* temp() { return temps_[1]; } 2171 LOperand* temp() { return temps_[1]; }
2154 2172
2155 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, 2173 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind,
2156 "transition-elements-kind") 2174 "transition-elements-kind")
2157 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) 2175 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
2158 2176
2159 virtual void PrintDataTo(StringStream* stream); 2177 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2160 2178
2161 Handle<Map> original_map() { return hydrogen()->original_map(); } 2179 Handle<Map> original_map() { return hydrogen()->original_map(); }
2162 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); } 2180 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); }
2163 ElementsKind from_kind() { return hydrogen()->from_kind(); } 2181 ElementsKind from_kind() { return hydrogen()->from_kind(); }
2164 ElementsKind to_kind() { return hydrogen()->to_kind(); } 2182 ElementsKind to_kind() { return hydrogen()->to_kind(); }
2165 }; 2183 };
2166 2184
2167 2185
2168 class LTrapAllocationMemento : public LTemplateInstruction<0, 1, 1> { 2186 class LTrapAllocationMemento V8_FINAL : public LTemplateInstruction<0, 1, 1> {
2169 public: 2187 public:
2170 LTrapAllocationMemento(LOperand* object, 2188 LTrapAllocationMemento(LOperand* object,
2171 LOperand* temp) { 2189 LOperand* temp) {
2172 inputs_[0] = object; 2190 inputs_[0] = object;
2173 temps_[0] = temp; 2191 temps_[0] = temp;
2174 } 2192 }
2175 2193
2176 LOperand* object() { return inputs_[0]; } 2194 LOperand* object() { return inputs_[0]; }
2177 LOperand* temp() { return temps_[0]; } 2195 LOperand* temp() { return temps_[0]; }
2178 2196
2179 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, 2197 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento,
2180 "trap-allocation-memento") 2198 "trap-allocation-memento")
2181 }; 2199 };
2182 2200
2183 2201
2184 class LStringAdd: public LTemplateInstruction<1, 2, 0> { 2202 class LStringAdd V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2185 public: 2203 public:
2186 LStringAdd(LOperand* left, LOperand* right) { 2204 LStringAdd(LOperand* left, LOperand* right) {
2187 inputs_[0] = left; 2205 inputs_[0] = left;
2188 inputs_[1] = right; 2206 inputs_[1] = right;
2189 } 2207 }
2190 2208
2191 LOperand* left() { return inputs_[0]; } 2209 LOperand* left() { return inputs_[0]; }
2192 LOperand* right() { return inputs_[1]; } 2210 LOperand* right() { return inputs_[1]; }
2193 2211
2194 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") 2212 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add")
2195 DECLARE_HYDROGEN_ACCESSOR(StringAdd) 2213 DECLARE_HYDROGEN_ACCESSOR(StringAdd)
2196 }; 2214 };
2197 2215
2198 2216
2199 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { 2217 class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2200 public: 2218 public:
2201 LStringCharCodeAt(LOperand* string, LOperand* index) { 2219 LStringCharCodeAt(LOperand* string, LOperand* index) {
2202 inputs_[0] = string; 2220 inputs_[0] = string;
2203 inputs_[1] = index; 2221 inputs_[1] = index;
2204 } 2222 }
2205 2223
2206 LOperand* string() { return inputs_[0]; } 2224 LOperand* string() { return inputs_[0]; }
2207 LOperand* index() { return inputs_[1]; } 2225 LOperand* index() { return inputs_[1]; }
2208 2226
2209 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") 2227 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at")
2210 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) 2228 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt)
2211 }; 2229 };
2212 2230
2213 2231
2214 class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> { 2232 class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2215 public: 2233 public:
2216 explicit LStringCharFromCode(LOperand* char_code) { 2234 explicit LStringCharFromCode(LOperand* char_code) {
2217 inputs_[0] = char_code; 2235 inputs_[0] = char_code;
2218 } 2236 }
2219 2237
2220 LOperand* char_code() { return inputs_[0]; } 2238 LOperand* char_code() { return inputs_[0]; }
2221 2239
2222 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") 2240 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code")
2223 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) 2241 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode)
2224 }; 2242 };
2225 2243
2226 2244
2227 class LCheckFunction: public LTemplateInstruction<0, 1, 0> { 2245 class LCheckFunction V8_FINAL : public LTemplateInstruction<0, 1, 0> {
2228 public: 2246 public:
2229 explicit LCheckFunction(LOperand* value) { 2247 explicit LCheckFunction(LOperand* value) {
2230 inputs_[0] = value; 2248 inputs_[0] = value;
2231 } 2249 }
2232 2250
2233 LOperand* value() { return inputs_[0]; } 2251 LOperand* value() { return inputs_[0]; }
2234 2252
2235 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function") 2253 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function")
2236 DECLARE_HYDROGEN_ACCESSOR(CheckFunction) 2254 DECLARE_HYDROGEN_ACCESSOR(CheckFunction)
2237 }; 2255 };
2238 2256
2239 2257
2240 class LCheckInstanceType: public LTemplateInstruction<0, 1, 0> { 2258 class LCheckInstanceType V8_FINAL : public LTemplateInstruction<0, 1, 0> {
2241 public: 2259 public:
2242 explicit LCheckInstanceType(LOperand* value) { 2260 explicit LCheckInstanceType(LOperand* value) {
2243 inputs_[0] = value; 2261 inputs_[0] = value;
2244 } 2262 }
2245 2263
2246 LOperand* value() { return inputs_[0]; } 2264 LOperand* value() { return inputs_[0]; }
2247 2265
2248 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type") 2266 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type")
2249 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType) 2267 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType)
2250 }; 2268 };
2251 2269
2252 2270
2253 class LCheckMaps: public LTemplateInstruction<0, 1, 0> { 2271 class LCheckMaps V8_FINAL : public LTemplateInstruction<0, 1, 0> {
2254 public: 2272 public:
2255 explicit LCheckMaps(LOperand* value) { 2273 explicit LCheckMaps(LOperand* value) {
2256 inputs_[0] = value; 2274 inputs_[0] = value;
2257 } 2275 }
2258 2276
2259 LOperand* value() { return inputs_[0]; } 2277 LOperand* value() { return inputs_[0]; }
2260 2278
2261 DECLARE_CONCRETE_INSTRUCTION(CheckMaps, "check-maps") 2279 DECLARE_CONCRETE_INSTRUCTION(CheckMaps, "check-maps")
2262 DECLARE_HYDROGEN_ACCESSOR(CheckMaps) 2280 DECLARE_HYDROGEN_ACCESSOR(CheckMaps)
2263 }; 2281 };
2264 2282
2265 2283
2266 class LCheckSmi: public LTemplateInstruction<1, 1, 0> { 2284 class LCheckSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2267 public: 2285 public:
2268 explicit LCheckSmi(LOperand* value) { 2286 explicit LCheckSmi(LOperand* value) {
2269 inputs_[0] = value; 2287 inputs_[0] = value;
2270 } 2288 }
2271 2289
2272 LOperand* value() { return inputs_[0]; } 2290 LOperand* value() { return inputs_[0]; }
2273 2291
2274 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi") 2292 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi")
2275 }; 2293 };
2276 2294
2277 2295
2278 class LClampDToUint8: public LTemplateInstruction<1, 1, 0> { 2296 class LClampDToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2279 public: 2297 public:
2280 explicit LClampDToUint8(LOperand* unclamped) { 2298 explicit LClampDToUint8(LOperand* unclamped) {
2281 inputs_[0] = unclamped; 2299 inputs_[0] = unclamped;
2282 } 2300 }
2283 2301
2284 LOperand* unclamped() { return inputs_[0]; } 2302 LOperand* unclamped() { return inputs_[0]; }
2285 2303
2286 DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8") 2304 DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8")
2287 }; 2305 };
2288 2306
2289 2307
2290 class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { 2308 class LClampIToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2291 public: 2309 public:
2292 explicit LClampIToUint8(LOperand* unclamped) { 2310 explicit LClampIToUint8(LOperand* unclamped) {
2293 inputs_[0] = unclamped; 2311 inputs_[0] = unclamped;
2294 } 2312 }
2295 2313
2296 LOperand* unclamped() { return inputs_[0]; } 2314 LOperand* unclamped() { return inputs_[0]; }
2297 2315
2298 DECLARE_CONCRETE_INSTRUCTION(ClampIToUint8, "clamp-i-to-uint8") 2316 DECLARE_CONCRETE_INSTRUCTION(ClampIToUint8, "clamp-i-to-uint8")
2299 }; 2317 };
2300 2318
2301 2319
2302 class LClampTToUint8: public LTemplateInstruction<1, 1, 1> { 2320 class LClampTToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 1> {
2303 public: 2321 public:
2304 LClampTToUint8(LOperand* unclamped, 2322 LClampTToUint8(LOperand* unclamped,
2305 LOperand* temp_xmm) { 2323 LOperand* temp_xmm) {
2306 inputs_[0] = unclamped; 2324 inputs_[0] = unclamped;
2307 temps_[0] = temp_xmm; 2325 temps_[0] = temp_xmm;
2308 } 2326 }
2309 2327
2310 LOperand* unclamped() { return inputs_[0]; } 2328 LOperand* unclamped() { return inputs_[0]; }
2311 LOperand* temp_xmm() { return temps_[0]; } 2329 LOperand* temp_xmm() { return temps_[0]; }
2312 2330
2313 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") 2331 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
2314 }; 2332 };
2315 2333
2316 2334
2317 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { 2335 class LCheckNonSmi V8_FINAL : public LTemplateInstruction<0, 1, 0> {
2318 public: 2336 public:
2319 explicit LCheckNonSmi(LOperand* value) { 2337 explicit LCheckNonSmi(LOperand* value) {
2320 inputs_[0] = value; 2338 inputs_[0] = value;
2321 } 2339 }
2322 2340
2323 LOperand* value() { return inputs_[0]; } 2341 LOperand* value() { return inputs_[0]; }
2324 2342
2325 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") 2343 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi")
2326 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject) 2344 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject)
2327 }; 2345 };
2328 2346
2329 2347
2330 class LAllocate: public LTemplateInstruction<1, 1, 1> { 2348 class LAllocate V8_FINAL : public LTemplateInstruction<1, 1, 1> {
2331 public: 2349 public:
2332 LAllocate(LOperand* size, LOperand* temp) { 2350 LAllocate(LOperand* size, LOperand* temp) {
2333 inputs_[0] = size; 2351 inputs_[0] = size;
2334 temps_[0] = temp; 2352 temps_[0] = temp;
2335 } 2353 }
2336 2354
2337 LOperand* size() { return inputs_[0]; } 2355 LOperand* size() { return inputs_[0]; }
2338 LOperand* temp() { return temps_[0]; } 2356 LOperand* temp() { return temps_[0]; }
2339 2357
2340 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") 2358 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate")
2341 DECLARE_HYDROGEN_ACCESSOR(Allocate) 2359 DECLARE_HYDROGEN_ACCESSOR(Allocate)
2342 }; 2360 };
2343 2361
2344 2362
2345 class LRegExpLiteral: public LTemplateInstruction<1, 0, 0> { 2363 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> {
2346 public: 2364 public:
2347 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") 2365 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal")
2348 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) 2366 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral)
2349 }; 2367 };
2350 2368
2351 2369
2352 class LFunctionLiteral: public LTemplateInstruction<1, 0, 0> { 2370 class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> {
2353 public: 2371 public:
2354 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") 2372 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal")
2355 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) 2373 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral)
2356 }; 2374 };
2357 2375
2358 2376
2359 class LToFastProperties: public LTemplateInstruction<1, 1, 0> { 2377 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2360 public: 2378 public:
2361 explicit LToFastProperties(LOperand* value) { 2379 explicit LToFastProperties(LOperand* value) {
2362 inputs_[0] = value; 2380 inputs_[0] = value;
2363 } 2381 }
2364 2382
2365 LOperand* value() { return inputs_[0]; } 2383 LOperand* value() { return inputs_[0]; }
2366 2384
2367 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") 2385 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties")
2368 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) 2386 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties)
2369 }; 2387 };
2370 2388
2371 2389
2372 class LTypeof: public LTemplateInstruction<1, 1, 0> { 2390 class LTypeof V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2373 public: 2391 public:
2374 explicit LTypeof(LOperand* value) { 2392 explicit LTypeof(LOperand* value) {
2375 inputs_[0] = value; 2393 inputs_[0] = value;
2376 } 2394 }
2377 2395
2378 LOperand* value() { return inputs_[0]; } 2396 LOperand* value() { return inputs_[0]; }
2379 2397
2380 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") 2398 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof")
2381 }; 2399 };
2382 2400
2383 2401
2384 class LTypeofIsAndBranch: public LControlInstruction<1, 0> { 2402 class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> {
2385 public: 2403 public:
2386 explicit LTypeofIsAndBranch(LOperand* value) { 2404 explicit LTypeofIsAndBranch(LOperand* value) {
2387 inputs_[0] = value; 2405 inputs_[0] = value;
2388 } 2406 }
2389 2407
2390 LOperand* value() { return inputs_[0]; } 2408 LOperand* value() { return inputs_[0]; }
2391 2409
2392 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") 2410 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch")
2393 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch) 2411 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch)
2394 2412
2395 Handle<String> type_literal() { return hydrogen()->type_literal(); } 2413 Handle<String> type_literal() { return hydrogen()->type_literal(); }
2396 2414
2397 virtual void PrintDataTo(StringStream* stream); 2415 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2398 }; 2416 };
2399 2417
2400 2418
2401 class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { 2419 class LIsConstructCallAndBranch V8_FINAL : public LControlInstruction<0, 1> {
2402 public: 2420 public:
2403 explicit LIsConstructCallAndBranch(LOperand* temp) { 2421 explicit LIsConstructCallAndBranch(LOperand* temp) {
2404 temps_[0] = temp; 2422 temps_[0] = temp;
2405 } 2423 }
2406 2424
2407 LOperand* temp() { return temps_[0]; } 2425 LOperand* temp() { return temps_[0]; }
2408 2426
2409 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, 2427 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch,
2410 "is-construct-call-and-branch") 2428 "is-construct-call-and-branch")
2411 DECLARE_HYDROGEN_ACCESSOR(IsConstructCallAndBranch) 2429 DECLARE_HYDROGEN_ACCESSOR(IsConstructCallAndBranch)
2412 }; 2430 };
2413 2431
2414 2432
2415 class LOsrEntry: public LTemplateInstruction<0, 0, 0> { 2433 class LOsrEntry V8_FINAL : public LTemplateInstruction<0, 0, 0> {
2416 public: 2434 public:
2417 LOsrEntry() {} 2435 LOsrEntry() {}
2418 2436
2419 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } 2437 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
2438 return false;
2439 }
2420 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") 2440 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
2421 }; 2441 };
2422 2442
2423 2443
2424 class LStackCheck: public LTemplateInstruction<0, 0, 0> { 2444 class LStackCheck V8_FINAL : public LTemplateInstruction<0, 0, 0> {
2425 public: 2445 public:
2426 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") 2446 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check")
2427 DECLARE_HYDROGEN_ACCESSOR(StackCheck) 2447 DECLARE_HYDROGEN_ACCESSOR(StackCheck)
2428 2448
2429 Label* done_label() { return &done_label_; } 2449 Label* done_label() { return &done_label_; }
2430 2450
2431 private: 2451 private:
2432 Label done_label_; 2452 Label done_label_;
2433 }; 2453 };
2434 2454
2435 2455
2436 class LForInPrepareMap: public LTemplateInstruction<1, 1, 0> { 2456 class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2437 public: 2457 public:
2438 explicit LForInPrepareMap(LOperand* object) { 2458 explicit LForInPrepareMap(LOperand* object) {
2439 inputs_[0] = object; 2459 inputs_[0] = object;
2440 } 2460 }
2441 2461
2442 LOperand* object() { return inputs_[0]; } 2462 LOperand* object() { return inputs_[0]; }
2443 2463
2444 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map") 2464 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map")
2445 }; 2465 };
2446 2466
2447 2467
2448 class LForInCacheArray: public LTemplateInstruction<1, 1, 0> { 2468 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2449 public: 2469 public:
2450 explicit LForInCacheArray(LOperand* map) { 2470 explicit LForInCacheArray(LOperand* map) {
2451 inputs_[0] = map; 2471 inputs_[0] = map;
2452 } 2472 }
2453 2473
2454 LOperand* map() { return inputs_[0]; } 2474 LOperand* map() { return inputs_[0]; }
2455 2475
2456 DECLARE_CONCRETE_INSTRUCTION(ForInCacheArray, "for-in-cache-array") 2476 DECLARE_CONCRETE_INSTRUCTION(ForInCacheArray, "for-in-cache-array")
2457 2477
2458 int idx() { 2478 int idx() {
2459 return HForInCacheArray::cast(this->hydrogen_value())->idx(); 2479 return HForInCacheArray::cast(this->hydrogen_value())->idx();
2460 } 2480 }
2461 }; 2481 };
2462 2482
2463 2483
2464 class LCheckMapValue: public LTemplateInstruction<0, 2, 0> { 2484 class LCheckMapValue V8_FINAL : public LTemplateInstruction<0, 2, 0> {
2465 public: 2485 public:
2466 LCheckMapValue(LOperand* value, LOperand* map) { 2486 LCheckMapValue(LOperand* value, LOperand* map) {
2467 inputs_[0] = value; 2487 inputs_[0] = value;
2468 inputs_[1] = map; 2488 inputs_[1] = map;
2469 } 2489 }
2470 2490
2471 LOperand* value() { return inputs_[0]; } 2491 LOperand* value() { return inputs_[0]; }
2472 LOperand* map() { return inputs_[1]; } 2492 LOperand* map() { return inputs_[1]; }
2473 2493
2474 DECLARE_CONCRETE_INSTRUCTION(CheckMapValue, "check-map-value") 2494 DECLARE_CONCRETE_INSTRUCTION(CheckMapValue, "check-map-value")
2475 }; 2495 };
2476 2496
2477 2497
2478 class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> { 2498 class LLoadFieldByIndex V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2479 public: 2499 public:
2480 LLoadFieldByIndex(LOperand* object, LOperand* index) { 2500 LLoadFieldByIndex(LOperand* object, LOperand* index) {
2481 inputs_[0] = object; 2501 inputs_[0] = object;
2482 inputs_[1] = index; 2502 inputs_[1] = index;
2483 } 2503 }
2484 2504
2485 LOperand* object() { return inputs_[0]; } 2505 LOperand* object() { return inputs_[0]; }
2486 LOperand* index() { return inputs_[1]; } 2506 LOperand* index() { return inputs_[1]; }
2487 2507
2488 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") 2508 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index")
2489 }; 2509 };
2490 2510
2491 2511
2492 class LChunkBuilder; 2512 class LChunkBuilder;
2493 class LPlatformChunk: public LChunk { 2513 class LPlatformChunk V8_FINAL : public LChunk {
2494 public: 2514 public:
2495 LPlatformChunk(CompilationInfo* info, HGraph* graph) 2515 LPlatformChunk(CompilationInfo* info, HGraph* graph)
2496 : LChunk(info, graph) { } 2516 : LChunk(info, graph) { }
2497 2517
2498 int GetNextSpillIndex(bool is_double); 2518 int GetNextSpillIndex(bool is_double);
2499 LOperand* GetNextSpillSlot(bool is_double); 2519 LOperand* GetNextSpillSlot(bool is_double);
2500 }; 2520 };
2501 2521
2502 2522
2503 class LChunkBuilder BASE_EMBEDDED { 2523 class LChunkBuilder V8_FINAL BASE_EMBEDDED {
2504 public: 2524 public:
2505 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) 2525 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
2506 : chunk_(NULL), 2526 : chunk_(NULL),
2507 info_(info), 2527 info_(info),
2508 graph_(graph), 2528 graph_(graph),
2509 zone_(graph->zone()), 2529 zone_(graph->zone()),
2510 status_(UNUSED), 2530 status_(UNUSED),
2511 current_instruction_(NULL), 2531 current_instruction_(NULL),
2512 current_block_(NULL), 2532 current_block_(NULL),
2513 next_block_(NULL), 2533 next_block_(NULL),
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
2670 2690
2671 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2691 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2672 }; 2692 };
2673 2693
2674 #undef DECLARE_HYDROGEN_ACCESSOR 2694 #undef DECLARE_HYDROGEN_ACCESSOR
2675 #undef DECLARE_CONCRETE_INSTRUCTION 2695 #undef DECLARE_CONCRETE_INSTRUCTION
2676 2696
2677 } } // namespace v8::int 2697 } } // namespace v8::int
2678 2698
2679 #endif // V8_X64_LITHIUM_X64_H_ 2699 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-gap-resolver-x64.h ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698