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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 NO_ARGUMENTS_ALLOCATION, | 150 NO_ARGUMENTS_ALLOCATION, |
151 EAGER_ARGUMENTS_ALLOCATION, | 151 EAGER_ARGUMENTS_ALLOCATION, |
152 LAZY_ARGUMENTS_ALLOCATION | 152 LAZY_ARGUMENTS_ALLOCATION |
153 }; | 153 }; |
154 | 154 |
155 | 155 |
156 // Different nop operations are used by the code generator to detect certain | 156 // Different nop operations are used by the code generator to detect certain |
157 // states of the generated code. | 157 // states of the generated code. |
158 enum NopMarkerTypes { | 158 enum NopMarkerTypes { |
159 NON_MARKING_NOP = 0, | 159 NON_MARKING_NOP = 0, |
160 PROPERTY_LOAD_INLINED | 160 PROPERTY_ACCESS_INLINED |
161 }; | 161 }; |
162 | 162 |
163 | 163 |
164 // ------------------------------------------------------------------------- | 164 // ------------------------------------------------------------------------- |
165 // CodeGenerator | 165 // CodeGenerator |
166 | 166 |
167 class CodeGenerator: public AstVisitor { | 167 class CodeGenerator: public AstVisitor { |
168 public: | 168 public: |
169 // Takes a function literal, generates code for it. This function should only | 169 // Takes a function literal, generates code for it. This function should only |
170 // be called by compiler.cc. | 170 // be called by compiler.cc. |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 void StoreToSlot(Slot* slot, InitState init_state); | 313 void StoreToSlot(Slot* slot, InitState init_state); |
314 | 314 |
315 // Load a named property, leaving it in r0. The receiver is passed on the | 315 // Load a named property, leaving it in r0. The receiver is passed on the |
316 // stack, and remains there. | 316 // stack, and remains there. |
317 void EmitNamedLoad(Handle<String> name, bool is_contextual); | 317 void EmitNamedLoad(Handle<String> name, bool is_contextual); |
318 | 318 |
319 // Load a keyed property, leaving it in r0. The receiver and key are | 319 // Load a keyed property, leaving it in r0. The receiver and key are |
320 // passed on the stack, and remain there. | 320 // passed on the stack, and remain there. |
321 void EmitKeyedLoad(); | 321 void EmitKeyedLoad(); |
322 | 322 |
| 323 // Store a keyed property. Key and receiver are on the stack and the value is |
| 324 // in r0. Result is returned in r0. |
| 325 void EmitKeyedStore(StaticType* key_type); |
| 326 |
323 void LoadFromGlobalSlotCheckExtensions(Slot* slot, | 327 void LoadFromGlobalSlotCheckExtensions(Slot* slot, |
324 TypeofState typeof_state, | 328 TypeofState typeof_state, |
325 JumpTarget* slow); | 329 JumpTarget* slow); |
326 | 330 |
327 // Special code for typeof expressions: Unfortunately, we must | 331 // Special code for typeof expressions: Unfortunately, we must |
328 // be careful when loading the expression in 'typeof' | 332 // be careful when loading the expression in 'typeof' |
329 // expressions. We are not allowed to throw reference errors for | 333 // expressions. We are not allowed to throw reference errors for |
330 // non-existing properties of the global object, so we must make it | 334 // non-existing properties of the global object, so we must make it |
331 // look like an explicit property access, instead of an access | 335 // look like an explicit property access, instead of an access |
332 // through the context chain. | 336 // through the context chain. |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 void Print() { | 857 void Print() { |
854 PrintF("NumberToStringStub\n"); | 858 PrintF("NumberToStringStub\n"); |
855 } | 859 } |
856 #endif | 860 #endif |
857 }; | 861 }; |
858 | 862 |
859 | 863 |
860 } } // namespace v8::internal | 864 } } // namespace v8::internal |
861 | 865 |
862 #endif // V8_ARM_CODEGEN_ARM_H_ | 866 #endif // V8_ARM_CODEGEN_ARM_H_ |
OLD | NEW |