| 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 NAMED_PROPERTY_LOAD_INLINED | 160 PROPERTY_LOAD_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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 void LoadFromSlotCheckForArguments(Slot* slot, TypeofState state); | 311 void LoadFromSlotCheckForArguments(Slot* slot, TypeofState state); |
| 312 // Store the value on top of the stack to a slot. | 312 // Store the value on top of the stack to a slot. |
| 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(bool is_global); | 321 void EmitKeyedLoad(); |
| 322 | 322 |
| 323 void LoadFromGlobalSlotCheckExtensions(Slot* slot, | 323 void LoadFromGlobalSlotCheckExtensions(Slot* slot, |
| 324 TypeofState typeof_state, | 324 TypeofState typeof_state, |
| 325 Register tmp, | 325 Register tmp, |
| 326 Register tmp2, | 326 Register tmp2, |
| 327 JumpTarget* slow); | 327 JumpTarget* slow); |
| 328 | 328 |
| 329 // Special code for typeof expressions: Unfortunately, we must | 329 // Special code for typeof expressions: Unfortunately, we must |
| 330 // be careful when loading the expression in 'typeof' | 330 // be careful when loading the expression in 'typeof' |
| 331 // expressions. We are not allowed to throw reference errors for | 331 // expressions. We are not allowed to throw reference errors for |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 void Print() { | 854 void Print() { |
| 855 PrintF("NumberToStringStub\n"); | 855 PrintF("NumberToStringStub\n"); |
| 856 } | 856 } |
| 857 #endif | 857 #endif |
| 858 }; | 858 }; |
| 859 | 859 |
| 860 | 860 |
| 861 } } // namespace v8::internal | 861 } } // namespace v8::internal |
| 862 | 862 |
| 863 #endif // V8_ARM_CODEGEN_ARM_H_ | 863 #endif // V8_ARM_CODEGEN_ARM_H_ |
| OLD | NEW |