| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 // permits optimization and calls GenerateFastCaseSwitch if it does. | 332 // permits optimization and calls GenerateFastCaseSwitch if it does. |
| 333 // Returns true if the fast-case switch was generated, and false if not. | 333 // Returns true if the fast-case switch was generated, and false if not. |
| 334 bool TryGenerateFastCaseSwitchStatement(SwitchStatement* node); | 334 bool TryGenerateFastCaseSwitchStatement(SwitchStatement* node); |
| 335 | 335 |
| 336 | 336 |
| 337 // Bottle-neck interface to call the Assembler to generate the statement | 337 // Bottle-neck interface to call the Assembler to generate the statement |
| 338 // position. This allows us to easily control whether statement positions | 338 // position. This allows us to easily control whether statement positions |
| 339 // should be generated or not. | 339 // should be generated or not. |
| 340 void RecordStatementPosition(Node* node); | 340 void RecordStatementPosition(Node* node); |
| 341 | 341 |
| 342 // Is the given jump target the actual (ie, non-shadowed) function return |
| 343 // target? |
| 344 bool IsActualFunctionReturn(JumpTarget* target); |
| 345 |
| 342 bool is_eval_; // Tells whether code is generated for eval. | 346 bool is_eval_; // Tells whether code is generated for eval. |
| 343 Handle<Script> script_; | 347 Handle<Script> script_; |
| 344 List<DeferredCode*> deferred_; | 348 List<DeferredCode*> deferred_; |
| 345 | 349 |
| 346 // Assembler | 350 // Assembler |
| 347 MacroAssembler* masm_; // to generate code | 351 MacroAssembler* masm_; // to generate code |
| 348 | 352 |
| 349 // Code generation state | 353 // Code generation state |
| 350 Scope* scope_; | 354 Scope* scope_; |
| 351 VirtualFrame* frame_; | 355 VirtualFrame* frame_; |
| 352 Condition cc_reg_; | 356 Condition cc_reg_; |
| 353 CodeGenState* state_; | 357 CodeGenState* state_; |
| 354 bool is_inside_try_; | 358 bool is_inside_try_; |
| 355 int break_stack_height_; | 359 int break_stack_height_; |
| 356 | 360 |
| 357 // Jump targets | 361 // Jump targets |
| 358 JumpTarget function_return_; | 362 JumpTarget function_return_; |
| 359 | 363 |
| 364 // True if the function return is shadowed (ie, jumping to the target |
| 365 // function_return_ does not jump to the true function return, but rather |
| 366 // to some unlinking code). |
| 367 bool function_return_is_shadowed_; |
| 368 |
| 360 friend class VirtualFrame; | 369 friend class VirtualFrame; |
| 370 friend class JumpTarget; |
| 361 friend class Reference; | 371 friend class Reference; |
| 362 | 372 |
| 363 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 373 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
| 364 }; | 374 }; |
| 365 | 375 |
| 366 } } // namespace v8::internal | 376 } } // namespace v8::internal |
| 367 | 377 |
| 368 #endif // V8_CODEGEN_ARM_H_ | 378 #endif // V8_CODEGEN_ARM_H_ |
| OLD | NEW |