| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 // Constants related to patching of inlined load/store. | 272 // Constants related to patching of inlined load/store. |
| 273 static int GetInlinedKeyedLoadInstructionsAfterPatch() { | 273 static int GetInlinedKeyedLoadInstructionsAfterPatch() { |
| 274 return FLAG_debug_code ? 32 : 13; | 274 return FLAG_debug_code ? 32 : 13; |
| 275 } | 275 } |
| 276 static const int kInlinedKeyedStoreInstructionsAfterPatch = 5; | 276 static const int kInlinedKeyedStoreInstructionsAfterPatch = 5; |
| 277 static int GetInlinedNamedStoreInstructionsAfterPatch() { | 277 static int GetInlinedNamedStoreInstructionsAfterPatch() { |
| 278 ASSERT(inlined_write_barrier_size_ != -1); | 278 ASSERT(inlined_write_barrier_size_ != -1); |
| 279 return inlined_write_barrier_size_ + 4; | 279 return inlined_write_barrier_size_ + 4; |
| 280 } | 280 } |
| 281 | 281 |
| 282 static MemOperand ContextOperand(Register context, int index) { | |
| 283 return MemOperand(context, Context::SlotOffset(index)); | |
| 284 } | |
| 285 | |
| 286 private: | 282 private: |
| 287 // Type of a member function that generates inline code for a native function. | 283 // Type of a member function that generates inline code for a native function. |
| 288 typedef void (CodeGenerator::*InlineFunctionGenerator) | 284 typedef void (CodeGenerator::*InlineFunctionGenerator) |
| 289 (ZoneList<Expression*>*); | 285 (ZoneList<Expression*>*); |
| 290 | 286 |
| 291 static const InlineFunctionGenerator kInlineFunctionGenerators[]; | 287 static const InlineFunctionGenerator kInlineFunctionGenerators[]; |
| 292 | 288 |
| 293 // Construction/Destruction | 289 // Construction/Destruction |
| 294 explicit CodeGenerator(MacroAssembler* masm); | 290 explicit CodeGenerator(MacroAssembler* masm); |
| 295 | 291 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 void UnloadReference(Reference* ref); | 338 void UnloadReference(Reference* ref); |
| 343 | 339 |
| 344 MemOperand SlotOperand(Slot* slot, Register tmp); | 340 MemOperand SlotOperand(Slot* slot, Register tmp); |
| 345 | 341 |
| 346 MemOperand ContextSlotOperandCheckExtensions(Slot* slot, | 342 MemOperand ContextSlotOperandCheckExtensions(Slot* slot, |
| 347 Register tmp, | 343 Register tmp, |
| 348 Register tmp2, | 344 Register tmp2, |
| 349 JumpTarget* slow); | 345 JumpTarget* slow); |
| 350 | 346 |
| 351 // Expressions | 347 // Expressions |
| 352 static MemOperand GlobalObject() { | |
| 353 return ContextOperand(cp, Context::GLOBAL_INDEX); | |
| 354 } | |
| 355 | |
| 356 void LoadCondition(Expression* x, | 348 void LoadCondition(Expression* x, |
| 357 JumpTarget* true_target, | 349 JumpTarget* true_target, |
| 358 JumpTarget* false_target, | 350 JumpTarget* false_target, |
| 359 bool force_cc); | 351 bool force_cc); |
| 360 void Load(Expression* expr); | 352 void Load(Expression* expr); |
| 361 void LoadGlobal(); | 353 void LoadGlobal(); |
| 362 void LoadGlobalReceiver(Register scratch); | 354 void LoadGlobalReceiver(Register scratch); |
| 363 | 355 |
| 364 // Read a value from a slot and leave it on top of the expression stack. | 356 // Read a value from a slot and leave it on top of the expression stack. |
| 365 void LoadFromSlot(Slot* slot, TypeofState typeof_state); | 357 void LoadFromSlot(Slot* slot, TypeofState typeof_state); |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 friend class FullCodeGenerator; | 589 friend class FullCodeGenerator; |
| 598 friend class FullCodeGenSyntaxChecker; | 590 friend class FullCodeGenSyntaxChecker; |
| 599 | 591 |
| 600 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 592 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
| 601 }; | 593 }; |
| 602 | 594 |
| 603 | 595 |
| 604 } } // namespace v8::internal | 596 } } // namespace v8::internal |
| 605 | 597 |
| 606 #endif // V8_ARM_CODEGEN_ARM_H_ | 598 #endif // V8_ARM_CODEGEN_ARM_H_ |
| OLD | NEW |