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