| 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 // Constants related to patching of inlined load/store. | 279 // Constants related to patching of inlined load/store. |
| 280 static int GetInlinedKeyedLoadInstructionsAfterPatch() { | 280 static int GetInlinedKeyedLoadInstructionsAfterPatch() { |
| 281 return FLAG_debug_code ? 27 : 13; | 281 return FLAG_debug_code ? 27 : 13; |
| 282 } | 282 } |
| 283 static const int kInlinedKeyedStoreInstructionsAfterPatch = 5; | 283 static const int kInlinedKeyedStoreInstructionsAfterPatch = 5; |
| 284 static int GetInlinedNamedStoreInstructionsAfterPatch() { | 284 static int GetInlinedNamedStoreInstructionsAfterPatch() { |
| 285 ASSERT(inlined_write_barrier_size_ != -1); | 285 ASSERT(inlined_write_barrier_size_ != -1); |
| 286 return inlined_write_barrier_size_ + 4; | 286 return inlined_write_barrier_size_ + 4; |
| 287 } | 287 } |
| 288 | 288 |
| 289 static MemOperand ContextOperand(Register context, int index) { |
| 290 return MemOperand(context, Context::SlotOffset(index)); |
| 291 } |
| 292 |
| 289 private: | 293 private: |
| 290 // Construction/Destruction | 294 // Construction/Destruction |
| 291 explicit CodeGenerator(MacroAssembler* masm); | 295 explicit CodeGenerator(MacroAssembler* masm); |
| 292 | 296 |
| 293 // Accessors | 297 // Accessors |
| 294 inline bool is_eval(); | 298 inline bool is_eval(); |
| 295 inline Scope* scope(); | 299 inline Scope* scope(); |
| 296 | 300 |
| 297 // Generating deferred code. | 301 // Generating deferred code. |
| 298 void ProcessDeferred(); | 302 void ProcessDeferred(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 // Returns the arguments allocation mode. | 335 // Returns the arguments allocation mode. |
| 332 ArgumentsAllocationMode ArgumentsMode(); | 336 ArgumentsAllocationMode ArgumentsMode(); |
| 333 | 337 |
| 334 // Store the arguments object and allocate it if necessary. | 338 // Store the arguments object and allocate it if necessary. |
| 335 void StoreArgumentsObject(bool initial); | 339 void StoreArgumentsObject(bool initial); |
| 336 | 340 |
| 337 // The following are used by class Reference. | 341 // The following are used by class Reference. |
| 338 void LoadReference(Reference* ref); | 342 void LoadReference(Reference* ref); |
| 339 void UnloadReference(Reference* ref); | 343 void UnloadReference(Reference* ref); |
| 340 | 344 |
| 341 static MemOperand ContextOperand(Register context, int index) { | |
| 342 return MemOperand(context, Context::SlotOffset(index)); | |
| 343 } | |
| 344 | |
| 345 MemOperand SlotOperand(Slot* slot, Register tmp); | 345 MemOperand SlotOperand(Slot* slot, Register tmp); |
| 346 | 346 |
| 347 MemOperand ContextSlotOperandCheckExtensions(Slot* slot, | 347 MemOperand ContextSlotOperandCheckExtensions(Slot* slot, |
| 348 Register tmp, | 348 Register tmp, |
| 349 Register tmp2, | 349 Register tmp2, |
| 350 JumpTarget* slow); | 350 JumpTarget* slow); |
| 351 | 351 |
| 352 // Expressions | 352 // Expressions |
| 353 static MemOperand GlobalObject() { | 353 static MemOperand GlobalObject() { |
| 354 return ContextOperand(cp, Context::GLOBAL_INDEX); | 354 return ContextOperand(cp, Context::GLOBAL_INDEX); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 | 475 |
| 476 // Support for type checks. | 476 // Support for type checks. |
| 477 void GenerateIsSmi(ZoneList<Expression*>* args); | 477 void GenerateIsSmi(ZoneList<Expression*>* args); |
| 478 void GenerateIsNonNegativeSmi(ZoneList<Expression*>* args); | 478 void GenerateIsNonNegativeSmi(ZoneList<Expression*>* args); |
| 479 void GenerateIsArray(ZoneList<Expression*>* args); | 479 void GenerateIsArray(ZoneList<Expression*>* args); |
| 480 void GenerateIsRegExp(ZoneList<Expression*>* args); | 480 void GenerateIsRegExp(ZoneList<Expression*>* args); |
| 481 void GenerateIsObject(ZoneList<Expression*>* args); | 481 void GenerateIsObject(ZoneList<Expression*>* args); |
| 482 void GenerateIsSpecObject(ZoneList<Expression*>* args); | 482 void GenerateIsSpecObject(ZoneList<Expression*>* args); |
| 483 void GenerateIsFunction(ZoneList<Expression*>* args); | 483 void GenerateIsFunction(ZoneList<Expression*>* args); |
| 484 void GenerateIsUndetectableObject(ZoneList<Expression*>* args); | 484 void GenerateIsUndetectableObject(ZoneList<Expression*>* args); |
| 485 void GenerateIsStringWrapperSafeForDefaultValueOf( |
| 486 ZoneList<Expression*>* args); |
| 485 | 487 |
| 486 // Support for construct call checks. | 488 // Support for construct call checks. |
| 487 void GenerateIsConstructCall(ZoneList<Expression*>* args); | 489 void GenerateIsConstructCall(ZoneList<Expression*>* args); |
| 488 | 490 |
| 489 // Support for arguments.length and arguments[?]. | 491 // Support for arguments.length and arguments[?]. |
| 490 void GenerateArgumentsLength(ZoneList<Expression*>* args); | 492 void GenerateArgumentsLength(ZoneList<Expression*>* args); |
| 491 void GenerateArguments(ZoneList<Expression*>* args); | 493 void GenerateArguments(ZoneList<Expression*>* args); |
| 492 | 494 |
| 493 // Support for accessing the class and value fields of an object. | 495 // Support for accessing the class and value fields of an object. |
| 494 void GenerateClassOf(ZoneList<Expression*>* args); | 496 void GenerateClassOf(ZoneList<Expression*>* args); |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1095 return ObjectBits::encode(object_.code()) | | 1097 return ObjectBits::encode(object_.code()) | |
| 1096 OffsetBits::encode(offset_.code()) | | 1098 OffsetBits::encode(offset_.code()) | |
| 1097 ScratchBits::encode(scratch_.code()); | 1099 ScratchBits::encode(scratch_.code()); |
| 1098 } | 1100 } |
| 1099 }; | 1101 }; |
| 1100 | 1102 |
| 1101 | 1103 |
| 1102 } } // namespace v8::internal | 1104 } } // namespace v8::internal |
| 1103 | 1105 |
| 1104 #endif // V8_ARM_CODEGEN_ARM_H_ | 1106 #endif // V8_ARM_CODEGEN_ARM_H_ |
| OLD | NEW |