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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 void DecrementLoopNesting() { loop_nesting_--; } | 250 void DecrementLoopNesting() { loop_nesting_--; } |
251 | 251 |
252 // Node visitors. | 252 // Node visitors. |
253 void VisitStatements(ZoneList<Statement*>* statements); | 253 void VisitStatements(ZoneList<Statement*>* statements); |
254 | 254 |
255 #define DEF_VISIT(type) \ | 255 #define DEF_VISIT(type) \ |
256 void Visit##type(type* node); | 256 void Visit##type(type* node); |
257 AST_NODE_LIST(DEF_VISIT) | 257 AST_NODE_LIST(DEF_VISIT) |
258 #undef DEF_VISIT | 258 #undef DEF_VISIT |
259 | 259 |
260 // Visit a statement and then spill the virtual frame if control flow can | |
261 // reach the end of the statement (ie, it does not exit via break, | |
262 // continue, return, or throw). This function is used temporarily while | |
263 // the code generator is being transformed. | |
264 inline void VisitAndSpill(Statement* statement); | |
265 | |
266 // Visit a list of statements and then spill the virtual frame if control | |
267 // flow can reach the end of the list. | |
268 inline void VisitStatementsAndSpill(ZoneList<Statement*>* statements); | |
269 | |
270 // Main code generation function | 260 // Main code generation function |
271 void Generate(CompilationInfo* info); | 261 void Generate(CompilationInfo* info); |
272 | 262 |
273 // Returns the arguments allocation mode. | 263 // Returns the arguments allocation mode. |
274 ArgumentsAllocationMode ArgumentsMode(); | 264 ArgumentsAllocationMode ArgumentsMode(); |
275 | 265 |
276 // Store the arguments object and allocate it if necessary. | 266 // Store the arguments object and allocate it if necessary. |
277 void StoreArgumentsObject(bool initial); | 267 void StoreArgumentsObject(bool initial); |
278 | 268 |
279 // The following are used by class Reference. | 269 // The following are used by class Reference. |
(...skipping 17 matching lines...) Expand all Loading... |
297 } | 287 } |
298 | 288 |
299 void LoadCondition(Expression* x, | 289 void LoadCondition(Expression* x, |
300 JumpTarget* true_target, | 290 JumpTarget* true_target, |
301 JumpTarget* false_target, | 291 JumpTarget* false_target, |
302 bool force_cc); | 292 bool force_cc); |
303 void Load(Expression* expr); | 293 void Load(Expression* expr); |
304 void LoadGlobal(); | 294 void LoadGlobal(); |
305 void LoadGlobalReceiver(Register scratch); | 295 void LoadGlobalReceiver(Register scratch); |
306 | 296 |
307 // Call LoadCondition and then spill the virtual frame unless control flow | |
308 // cannot reach the end of the expression (ie, by emitting only | |
309 // unconditional jumps to the control targets). | |
310 inline void LoadConditionAndSpill(Expression* expression, | |
311 JumpTarget* true_target, | |
312 JumpTarget* false_target, | |
313 bool force_control); | |
314 | |
315 // Read a value from a slot and leave it on top of the expression stack. | 297 // Read a value from a slot and leave it on top of the expression stack. |
316 void LoadFromSlot(Slot* slot, TypeofState typeof_state); | 298 void LoadFromSlot(Slot* slot, TypeofState typeof_state); |
317 void LoadFromSlotCheckForArguments(Slot* slot, TypeofState state); | 299 void LoadFromSlotCheckForArguments(Slot* slot, TypeofState state); |
318 | 300 |
319 // Store the value on top of the stack to a slot. | 301 // Store the value on top of the stack to a slot. |
320 void StoreToSlot(Slot* slot, InitState init_state); | 302 void StoreToSlot(Slot* slot, InitState init_state); |
321 | 303 |
322 // Support for compiling assignment expressions. | 304 // Support for compiling assignment expressions. |
323 void EmitSlotAssignment(Assignment* node); | 305 void EmitSlotAssignment(Assignment* node); |
324 void EmitNamedPropertyAssignment(Assignment* node); | 306 void EmitNamedPropertyAssignment(Assignment* node); |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 return ObjectBits::encode(object_.code()) | | 906 return ObjectBits::encode(object_.code()) | |
925 OffsetBits::encode(offset_.code()) | | 907 OffsetBits::encode(offset_.code()) | |
926 ScratchBits::encode(scratch_.code()); | 908 ScratchBits::encode(scratch_.code()); |
927 } | 909 } |
928 }; | 910 }; |
929 | 911 |
930 | 912 |
931 } } // namespace v8::internal | 913 } } // namespace v8::internal |
932 | 914 |
933 #endif // V8_ARM_CODEGEN_ARM_H_ | 915 #endif // V8_ARM_CODEGEN_ARM_H_ |
OLD | NEW |