| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 inline Scope* scope(); | 208 inline Scope* scope(); |
| 209 | 209 |
| 210 // Generating deferred code. | 210 // Generating deferred code. |
| 211 void ProcessDeferred(); | 211 void ProcessDeferred(); |
| 212 | 212 |
| 213 // State | 213 // State |
| 214 bool has_cc() const { return cc_reg_ != al; } | 214 bool has_cc() const { return cc_reg_ != al; } |
| 215 JumpTarget* true_target() const { return state_->true_target(); } | 215 JumpTarget* true_target() const { return state_->true_target(); } |
| 216 JumpTarget* false_target() const { return state_->false_target(); } | 216 JumpTarget* false_target() const { return state_->false_target(); } |
| 217 | 217 |
| 218 // We don't track loop nesting level on ARM yet. | 218 // Track loop nesting level. |
| 219 int loop_nesting() const { return 0; } | 219 int loop_nesting() const { return loop_nesting_; } |
| 220 void IncrementLoopNesting() { loop_nesting_++; } |
| 221 void DecrementLoopNesting() { loop_nesting_--; } |
| 220 | 222 |
| 221 // Node visitors. | 223 // Node visitors. |
| 222 void VisitStatements(ZoneList<Statement*>* statements); | 224 void VisitStatements(ZoneList<Statement*>* statements); |
| 223 | 225 |
| 224 #define DEF_VISIT(type) \ | 226 #define DEF_VISIT(type) \ |
| 225 void Visit##type(type* node); | 227 void Visit##type(type* node); |
| 226 AST_NODE_LIST(DEF_VISIT) | 228 AST_NODE_LIST(DEF_VISIT) |
| 227 #undef DEF_VISIT | 229 #undef DEF_VISIT |
| 228 | 230 |
| 229 // Visit a statement and then spill the virtual frame if control flow can | 231 // Visit a statement and then spill the virtual frame if control flow can |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 // unconditional jumps to the control targets). | 279 // unconditional jumps to the control targets). |
| 278 inline void LoadConditionAndSpill(Expression* expression, | 280 inline void LoadConditionAndSpill(Expression* expression, |
| 279 JumpTarget* true_target, | 281 JumpTarget* true_target, |
| 280 JumpTarget* false_target, | 282 JumpTarget* false_target, |
| 281 bool force_control); | 283 bool force_control); |
| 282 | 284 |
| 283 // Read a value from a slot and leave it on top of the expression stack. | 285 // Read a value from a slot and leave it on top of the expression stack. |
| 284 void LoadFromSlot(Slot* slot, TypeofState typeof_state); | 286 void LoadFromSlot(Slot* slot, TypeofState typeof_state); |
| 285 // Store the value on top of the stack to a slot. | 287 // Store the value on top of the stack to a slot. |
| 286 void StoreToSlot(Slot* slot, InitState init_state); | 288 void StoreToSlot(Slot* slot, InitState init_state); |
| 289 |
| 287 // Load a keyed property, leaving it in r0. The receiver and key are | 290 // Load a keyed property, leaving it in r0. The receiver and key are |
| 288 // passed on the stack, and remain there. | 291 // passed on the stack, and remain there. |
| 289 void EmitKeyedLoad(bool is_global); | 292 void EmitKeyedLoad(bool is_global); |
| 290 | 293 |
| 291 void LoadFromGlobalSlotCheckExtensions(Slot* slot, | 294 void LoadFromGlobalSlotCheckExtensions(Slot* slot, |
| 292 TypeofState typeof_state, | 295 TypeofState typeof_state, |
| 293 Register tmp, | 296 Register tmp, |
| 294 Register tmp2, | 297 Register tmp2, |
| 295 JumpTarget* slow); | 298 JumpTarget* slow); |
| 296 | 299 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 // Assembler | 454 // Assembler |
| 452 MacroAssembler* masm_; // to generate code | 455 MacroAssembler* masm_; // to generate code |
| 453 | 456 |
| 454 CompilationInfo* info_; | 457 CompilationInfo* info_; |
| 455 | 458 |
| 456 // Code generation state | 459 // Code generation state |
| 457 VirtualFrame* frame_; | 460 VirtualFrame* frame_; |
| 458 RegisterAllocator* allocator_; | 461 RegisterAllocator* allocator_; |
| 459 Condition cc_reg_; | 462 Condition cc_reg_; |
| 460 CodeGenState* state_; | 463 CodeGenState* state_; |
| 464 int loop_nesting_; |
| 461 | 465 |
| 462 // Jump targets | 466 // Jump targets |
| 463 BreakTarget function_return_; | 467 BreakTarget function_return_; |
| 464 | 468 |
| 465 // True if the function return is shadowed (ie, jumping to the target | 469 // True if the function return is shadowed (ie, jumping to the target |
| 466 // function_return_ does not jump to the true function return, but rather | 470 // function_return_ does not jump to the true function return, but rather |
| 467 // to some unlinking code). | 471 // to some unlinking code). |
| 468 bool function_return_is_shadowed_; | 472 bool function_return_is_shadowed_; |
| 469 | 473 |
| 470 static InlineRuntimeLUT kInlineRuntimeLUT[]; | 474 static InlineRuntimeLUT kInlineRuntimeLUT[]; |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 void Print() { | 817 void Print() { |
| 814 PrintF("NumberToStringStub\n"); | 818 PrintF("NumberToStringStub\n"); |
| 815 } | 819 } |
| 816 #endif | 820 #endif |
| 817 }; | 821 }; |
| 818 | 822 |
| 819 | 823 |
| 820 } } // namespace v8::internal | 824 } } // namespace v8::internal |
| 821 | 825 |
| 822 #endif // V8_ARM_CODEGEN_ARM_H_ | 826 #endif // V8_ARM_CODEGEN_ARM_H_ |
| OLD | NEW |