| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 const char* GetName() { return "NumberToStringStub"; } | 498 const char* GetName() { return "NumberToStringStub"; } |
| 499 | 499 |
| 500 #ifdef DEBUG | 500 #ifdef DEBUG |
| 501 void Print() { | 501 void Print() { |
| 502 PrintF("NumberToStringStub\n"); | 502 PrintF("NumberToStringStub\n"); |
| 503 } | 503 } |
| 504 #endif | 504 #endif |
| 505 }; | 505 }; |
| 506 | 506 |
| 507 | 507 |
| 508 class IncrementalMarkingRecordWriteStub: public CodeStub { |
| 509 public: |
| 510 IncrementalMarkingRecordWriteStub(Register object, |
| 511 Register value, |
| 512 Register scratch, |
| 513 ObjectMode object_mode, |
| 514 ValueMode value_mode, |
| 515 ScratchMode scratch_mode) |
| 516 : object_(object), |
| 517 value_(value), |
| 518 scratch_(scratch), |
| 519 object_mode_(object_mode), |
| 520 value_mode_(value_mode), |
| 521 scratch_mode_(scratch_mode) { |
| 522 } |
| 523 |
| 524 private: |
| 525 void Generate(MacroAssembler* masm); |
| 526 |
| 527 Major MajorKey() { return IncrementalMarkingRecordWrite; } |
| 528 |
| 529 int MinorKey() { |
| 530 return ObjectBits::encode(object_.code()) | |
| 531 ValueBits::encode(value_.code()) | |
| 532 ScratchBits::encode(scratch_.code()) | |
| 533 ObjectModeBits::encode(object_mode_) | |
| 534 ValueModeBits::encode(value_mode_) | |
| 535 ScratchModeBits::encode(scratch_mode_); |
| 536 } |
| 537 |
| 538 class ObjectBits: public BitField<int, 0, 3> {}; |
| 539 class ValueBits: public BitField<int, 3, 3> {}; |
| 540 class ScratchBits: public BitField<int, 6, 3> {}; |
| 541 class ObjectModeBits: public BitField<ObjectMode, 9, 1> {}; |
| 542 class ValueModeBits: public BitField<ValueMode, 10, 1> {}; |
| 543 class ScratchModeBits: public BitField<ScratchMode, 11, 1> {}; |
| 544 |
| 545 Register object_; |
| 546 Register value_; |
| 547 Register scratch_; |
| 548 ObjectMode object_mode_; |
| 549 ValueMode value_mode_; |
| 550 ScratchMode scratch_mode_; |
| 551 }; |
| 552 |
| 553 |
| 508 // Generate code to load an element from a pixel array. The receiver is assumed | 554 // Generate code to load an element from a pixel array. The receiver is assumed |
| 509 // to not be a smi and to have elements, the caller must guarantee this | 555 // to not be a smi and to have elements, the caller must guarantee this |
| 510 // precondition. If key is not a smi, then the generated code branches to | 556 // precondition. If key is not a smi, then the generated code branches to |
| 511 // key_not_smi. Callers can specify NULL for key_not_smi to signal that a smi | 557 // key_not_smi. Callers can specify NULL for key_not_smi to signal that a smi |
| 512 // check has already been performed on key so that the smi check is not | 558 // check has already been performed on key so that the smi check is not |
| 513 // generated. If key is not a valid index within the bounds of the pixel array, | 559 // generated. If key is not a valid index within the bounds of the pixel array, |
| 514 // the generated code jumps to out_of_range. receiver, key and elements are | 560 // the generated code jumps to out_of_range. receiver, key and elements are |
| 515 // unchanged throughout the generated code sequence. | 561 // unchanged throughout the generated code sequence. |
| 516 void GenerateFastPixelArrayLoad(MacroAssembler* masm, | 562 void GenerateFastPixelArrayLoad(MacroAssembler* masm, |
| 517 Register receiver, | 563 Register receiver, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 542 Register scratch1, | 588 Register scratch1, |
| 543 bool load_elements_from_receiver, | 589 bool load_elements_from_receiver, |
| 544 Label* key_not_smi, | 590 Label* key_not_smi, |
| 545 Label* value_not_smi, | 591 Label* value_not_smi, |
| 546 Label* not_pixel_array, | 592 Label* not_pixel_array, |
| 547 Label* out_of_range); | 593 Label* out_of_range); |
| 548 | 594 |
| 549 } } // namespace v8::internal | 595 } } // namespace v8::internal |
| 550 | 596 |
| 551 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 597 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
| OLD | NEW |