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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // If the reference is not consumed, it is left in place under its value. | 94 // If the reference is not consumed, it is left in place under its value. |
95 void GetValue(); | 95 void GetValue(); |
96 | 96 |
97 // Generate code to store the value on top of the expression stack in the | 97 // Generate code to store the value on top of the expression stack in the |
98 // reference. The reference is expected to be immediately below the value | 98 // reference. The reference is expected to be immediately below the value |
99 // on the expression stack. The value is stored in the location specified | 99 // on the expression stack. The value is stored in the location specified |
100 // by the reference, and is left on top of the stack, after the reference | 100 // by the reference, and is left on top of the stack, after the reference |
101 // is popped from beneath it (unloaded). | 101 // is popped from beneath it (unloaded). |
102 void SetValue(InitState init_state); | 102 void SetValue(InitState init_state); |
103 | 103 |
| 104 // This is in preparation for something that uses the reference on the stack. |
| 105 // If we need this reference afterwards get then dup it now. Otherwise mark |
| 106 // it as used. |
| 107 inline void DupIfPersist(); |
| 108 |
104 private: | 109 private: |
105 CodeGenerator* cgen_; | 110 CodeGenerator* cgen_; |
106 Expression* expression_; | 111 Expression* expression_; |
107 Type type_; | 112 Type type_; |
108 // Keep the reference on the stack after get, so it can be used by set later. | 113 // Keep the reference on the stack after get, so it can be used by set later. |
109 bool persist_after_get_; | 114 bool persist_after_get_; |
110 }; | 115 }; |
111 | 116 |
112 | 117 |
113 // ------------------------------------------------------------------------- | 118 // ------------------------------------------------------------------------- |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 return ObjectBits::encode(object_.code()) | | 929 return ObjectBits::encode(object_.code()) | |
925 OffsetBits::encode(offset_.code()) | | 930 OffsetBits::encode(offset_.code()) | |
926 ScratchBits::encode(scratch_.code()); | 931 ScratchBits::encode(scratch_.code()); |
927 } | 932 } |
928 }; | 933 }; |
929 | 934 |
930 | 935 |
931 } } // namespace v8::internal | 936 } } // namespace v8::internal |
932 | 937 |
933 #endif // V8_ARM_CODEGEN_ARM_H_ | 938 #endif // V8_ARM_CODEGEN_ARM_H_ |
OLD | NEW |