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

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

Powered by Google App Engine
This is Rietveld 408576698