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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // distinguish memory operands from other operands on ia32. | 49 // distinguish memory operands from other operands on ia32. |
50 typedef Operand MemOperand; | 50 typedef Operand MemOperand; |
51 | 51 |
52 // Forward declaration. | 52 // Forward declaration. |
53 class JumpTarget; | 53 class JumpTarget; |
54 class PostCallGenerator; | 54 class PostCallGenerator; |
55 | 55 |
56 // MacroAssembler implements a collection of frequently used macros. | 56 // MacroAssembler implements a collection of frequently used macros. |
57 class MacroAssembler: public Assembler { | 57 class MacroAssembler: public Assembler { |
58 public: | 58 public: |
59 MacroAssembler(void* buffer, int size); | 59 // The isolate parameter can be NULL if the macro assembler should |
| 60 // not use isolate-dependent functionality. In this case, it's the |
| 61 // responsibility of the caller to never invoke such function on the |
| 62 // macro assembler. |
| 63 MacroAssembler(Isolate* isolate, void* buffer, int size); |
60 | 64 |
61 // --------------------------------------------------------------------------- | 65 // --------------------------------------------------------------------------- |
62 // GC Support | 66 // GC Support |
63 | 67 |
64 // For page containing |object| mark region covering |addr| dirty. | 68 // For page containing |object| mark region covering |addr| dirty. |
65 // RecordWriteHelper only works if the object is not in new | 69 // RecordWriteHelper only works if the object is not in new |
66 // space. | 70 // space. |
67 void RecordWriteHelper(Register object, | 71 void RecordWriteHelper(Register object, |
68 Register addr, | 72 Register addr, |
69 Register scratch); | 73 Register scratch); |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 void CallSelf() { | 577 void CallSelf() { |
574 Handle<Code> self(reinterpret_cast<Code**>(CodeObject().location())); | 578 Handle<Code> self(reinterpret_cast<Code**>(CodeObject().location())); |
575 call(self, RelocInfo::CODE_TARGET); | 579 call(self, RelocInfo::CODE_TARGET); |
576 } | 580 } |
577 | 581 |
578 // Move if the registers are not identical. | 582 // Move if the registers are not identical. |
579 void Move(Register target, Register source); | 583 void Move(Register target, Register source); |
580 | 584 |
581 void Move(Register target, Handle<Object> value); | 585 void Move(Register target, Handle<Object> value); |
582 | 586 |
583 Handle<Object> CodeObject() { return code_object_; } | 587 Handle<Object> CodeObject() { |
| 588 ASSERT(!code_object_.is_null()); |
| 589 return code_object_; |
| 590 } |
584 | 591 |
585 | 592 |
586 // --------------------------------------------------------------------------- | 593 // --------------------------------------------------------------------------- |
587 // StatsCounter support | 594 // StatsCounter support |
588 | 595 |
589 void SetCounter(StatsCounter* counter, int value); | 596 void SetCounter(StatsCounter* counter, int value); |
590 void IncrementCounter(StatsCounter* counter, int value); | 597 void IncrementCounter(StatsCounter* counter, int value); |
591 void DecrementCounter(StatsCounter* counter, int value); | 598 void DecrementCounter(StatsCounter* counter, int value); |
592 void IncrementCounter(Condition cc, StatsCounter* counter, int value); | 599 void IncrementCounter(Condition cc, StatsCounter* counter, int value); |
593 void DecrementCounter(Condition cc, StatsCounter* counter, int value); | 600 void DecrementCounter(Condition cc, StatsCounter* counter, int value); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 } \ | 798 } \ |
792 masm-> | 799 masm-> |
793 #else | 800 #else |
794 #define ACCESS_MASM(masm) masm-> | 801 #define ACCESS_MASM(masm) masm-> |
795 #endif | 802 #endif |
796 | 803 |
797 | 804 |
798 } } // namespace v8::internal | 805 } } // namespace v8::internal |
799 | 806 |
800 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 807 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |