| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 // The following are used by class Reference. | 260 // The following are used by class Reference. |
| 261 void LoadReference(Reference* ref); | 261 void LoadReference(Reference* ref); |
| 262 void UnloadReference(Reference* ref); | 262 void UnloadReference(Reference* ref); |
| 263 | 263 |
| 264 Operand ContextOperand(Register context, int index) const { | 264 Operand ContextOperand(Register context, int index) const { |
| 265 return Operand(context, Context::SlotOffset(index)); | 265 return Operand(context, Context::SlotOffset(index)); |
| 266 } | 266 } |
| 267 | 267 |
| 268 Operand SlotOperand(Slot* slot, Register tmp); | 268 Operand SlotOperand(Slot* slot, Register tmp); |
| 269 | 269 |
| 270 Operand ContextSlotOperandCheckExtensions(Slot* slot, |
| 271 Register tmp, |
| 272 Label* slow); |
| 270 | 273 |
| 271 // Expressions | 274 // Expressions |
| 272 Operand GlobalObject() const { | 275 Operand GlobalObject() const { |
| 273 return ContextOperand(esi, Context::GLOBAL_INDEX); | 276 return ContextOperand(esi, Context::GLOBAL_INDEX); |
| 274 } | 277 } |
| 275 | 278 |
| 276 void LoadCondition(Expression* x, | 279 void LoadCondition(Expression* x, |
| 277 TypeofState typeof_state, | 280 TypeofState typeof_state, |
| 278 Label* true_target, | 281 Label* true_target, |
| 279 Label* false_target, | 282 Label* false_target, |
| 280 bool force_cc); | 283 bool force_cc); |
| 281 void Load(Expression* x, TypeofState typeof_state = NOT_INSIDE_TYPEOF); | 284 void Load(Expression* x, TypeofState typeof_state = NOT_INSIDE_TYPEOF); |
| 282 void LoadGlobal(); | 285 void LoadGlobal(); |
| 283 void LoadGlobalReceiver(Register scratch); | 286 void LoadGlobalReceiver(Register scratch); |
| 284 | 287 |
| 285 // Read a value from a slot and leave it on top of the expression stack. | 288 // Read a value from a slot and leave it on top of the expression stack. |
| 286 void LoadFromSlot(Slot* slot, TypeofState typeof_state); | 289 void LoadFromSlot(Slot* slot, TypeofState typeof_state); |
| 290 void LoadFromGlobalSlotCheckExtensions(Slot* slot, |
| 291 TypeofState typeof_state, |
| 292 Register tmp, |
| 293 Label* slow); |
| 287 | 294 |
| 288 // Special code for typeof expressions: Unfortunately, we must | 295 // Special code for typeof expressions: Unfortunately, we must |
| 289 // be careful when loading the expression in 'typeof' | 296 // be careful when loading the expression in 'typeof' |
| 290 // expressions. We are not allowed to throw reference errors for | 297 // expressions. We are not allowed to throw reference errors for |
| 291 // non-existing properties of the global object, so we must make it | 298 // non-existing properties of the global object, so we must make it |
| 292 // look like an explicit property access, instead of an access | 299 // look like an explicit property access, instead of an access |
| 293 // through the context chain. | 300 // through the context chain. |
| 294 void LoadTypeofExpression(Expression* x); | 301 void LoadTypeofExpression(Expression* x); |
| 295 | 302 |
| 296 void ToBoolean(Label* true_target, Label* false_target); | 303 void ToBoolean(Label* true_target, Label* false_target); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 friend class VirtualFrame; | 441 friend class VirtualFrame; |
| 435 friend class Reference; | 442 friend class Reference; |
| 436 | 443 |
| 437 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 444 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
| 438 }; | 445 }; |
| 439 | 446 |
| 440 | 447 |
| 441 } } // namespace v8::internal | 448 } } // namespace v8::internal |
| 442 | 449 |
| 443 #endif // V8_CODEGEN_IA32_H_ | 450 #endif // V8_CODEGEN_IA32_H_ |
| OLD | NEW |