OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 // flow can reach the end of the list. | 235 // flow can reach the end of the list. |
236 inline void VisitStatementsAndSpill(ZoneList<Statement*>* statements); | 236 inline void VisitStatementsAndSpill(ZoneList<Statement*>* statements); |
237 | 237 |
238 // Main code generation function | 238 // Main code generation function |
239 void GenCode(FunctionLiteral* fun); | 239 void GenCode(FunctionLiteral* fun); |
240 | 240 |
241 // The following are used by class Reference. | 241 // The following are used by class Reference. |
242 void LoadReference(Reference* ref); | 242 void LoadReference(Reference* ref); |
243 void UnloadReference(Reference* ref); | 243 void UnloadReference(Reference* ref); |
244 | 244 |
245 MemOperand ContextOperand(Register context, int index) const { | 245 static MemOperand ContextOperand(Register context, int index) { |
246 return MemOperand(context, Context::SlotOffset(index)); | 246 return MemOperand(context, Context::SlotOffset(index)); |
247 } | 247 } |
248 | 248 |
249 MemOperand SlotOperand(Slot* slot, Register tmp); | 249 MemOperand SlotOperand(Slot* slot, Register tmp); |
250 | 250 |
251 MemOperand ContextSlotOperandCheckExtensions(Slot* slot, | 251 MemOperand ContextSlotOperandCheckExtensions(Slot* slot, |
252 Register tmp, | 252 Register tmp, |
253 Register tmp2, | 253 Register tmp2, |
254 JumpTarget* slow); | 254 JumpTarget* slow); |
255 | 255 |
256 // Expressions | 256 // Expressions |
257 MemOperand GlobalObject() const { | 257 static MemOperand GlobalObject() { |
258 return ContextOperand(cp, Context::GLOBAL_INDEX); | 258 return ContextOperand(cp, Context::GLOBAL_INDEX); |
259 } | 259 } |
260 | 260 |
261 void LoadCondition(Expression* x, | 261 void LoadCondition(Expression* x, |
262 TypeofState typeof_state, | 262 TypeofState typeof_state, |
263 JumpTarget* true_target, | 263 JumpTarget* true_target, |
264 JumpTarget* false_target, | 264 JumpTarget* false_target, |
265 bool force_cc); | 265 bool force_cc); |
266 void Load(Expression* x, TypeofState typeof_state = NOT_INSIDE_TYPEOF); | 266 void Load(Expression* x, TypeofState typeof_state = NOT_INSIDE_TYPEOF); |
267 void LoadGlobal(); | 267 void LoadGlobal(); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 // True if the function return is shadowed (ie, jumping to the target | 418 // True if the function return is shadowed (ie, jumping to the target |
419 // function_return_ does not jump to the true function return, but rather | 419 // function_return_ does not jump to the true function return, but rather |
420 // to some unlinking code). | 420 // to some unlinking code). |
421 bool function_return_is_shadowed_; | 421 bool function_return_is_shadowed_; |
422 | 422 |
423 static InlineRuntimeLUT kInlineRuntimeLUT[]; | 423 static InlineRuntimeLUT kInlineRuntimeLUT[]; |
424 | 424 |
425 friend class VirtualFrame; | 425 friend class VirtualFrame; |
426 friend class JumpTarget; | 426 friend class JumpTarget; |
427 friend class Reference; | 427 friend class Reference; |
| 428 friend class FastCodeGenerator; |
428 | 429 |
429 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 430 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
430 }; | 431 }; |
431 | 432 |
432 | 433 |
433 class GenericBinaryOpStub : public CodeStub { | 434 class GenericBinaryOpStub : public CodeStub { |
434 public: | 435 public: |
435 GenericBinaryOpStub(Token::Value op, | 436 GenericBinaryOpStub(Token::Value op, |
436 OverwriteMode mode, | 437 OverwriteMode mode, |
437 int constant_rhs = CodeGenerator::kUnknownIntValue) | 438 int constant_rhs = CodeGenerator::kUnknownIntValue) |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 constant_rhs_); | 517 constant_rhs_); |
517 } | 518 } |
518 } | 519 } |
519 #endif | 520 #endif |
520 }; | 521 }; |
521 | 522 |
522 | 523 |
523 } } // namespace v8::internal | 524 } } // namespace v8::internal |
524 | 525 |
525 #endif // V8_ARM_CODEGEN_ARM_H_ | 526 #endif // V8_ARM_CODEGEN_ARM_H_ |
OLD | NEW |