Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: src/codegen-ia32.h

Issue 16567: Enable register allocation for return statements. Make sure to... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/codegen-ia32.cc » ('j') | src/codegen-ia32.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 // permits optimization and calls GenerateFastCaseSwitch if it does. 447 // permits optimization and calls GenerateFastCaseSwitch if it does.
448 // Returns true if the fast-case switch was generated, and false if not. 448 // Returns true if the fast-case switch was generated, and false if not.
449 bool TryGenerateFastCaseSwitchStatement(SwitchStatement* node); 449 bool TryGenerateFastCaseSwitchStatement(SwitchStatement* node);
450 450
451 // Methods used to indicate which source code is generated for. Source 451 // Methods used to indicate which source code is generated for. Source
452 // positions are collected by the assembler and emitted with the relocation 452 // positions are collected by the assembler and emitted with the relocation
453 // information. 453 // information.
454 void CodeForStatement(Node* node); 454 void CodeForStatement(Node* node);
455 void CodeForSourcePosition(int pos); 455 void CodeForSourcePosition(int pos);
456 456
457 // Is the given jump target the actual (ie, non-shadowed) function return
458 // target?
459 bool IsActualFunctionReturn(JumpTarget* target);
460
461 bool is_eval_; // Tells whether code is generated for eval. 457 bool is_eval_; // Tells whether code is generated for eval.
462 458
463 #ifdef DEBUG 459 #ifdef DEBUG
464 // True if the registers are valid for entry to a block. There should be 460 // True if the registers are valid for entry to a block. There should be
465 // no frame-external references to eax, ebx, ecx, edx, or edi. 461 // no frame-external references to eax, ebx, ecx, edx, or edi.
466 bool HasValidEntryRegisters(); 462 bool HasValidEntryRegisters();
467 #endif 463 #endif
468 464
469 Handle<Script> script_; 465 Handle<Script> script_;
470 List<DeferredCode*> deferred_; 466 List<DeferredCode*> deferred_;
471 467
472 // Assembler 468 // Assembler
473 MacroAssembler* masm_; // to generate code 469 MacroAssembler* masm_; // to generate code
474 470
475 // Code generation state 471 // Code generation state
476 Scope* scope_; 472 Scope* scope_;
477 VirtualFrame* frame_; 473 VirtualFrame* frame_;
478 RegisterAllocator* allocator_; 474 RegisterAllocator* allocator_;
479 Condition cc_reg_; 475 Condition cc_reg_;
480 CodeGenState* state_; 476 CodeGenState* state_;
481 bool is_inside_try_;
482 int break_stack_height_; 477 int break_stack_height_;
483 int loop_nesting_; 478 int loop_nesting_;
484 479
485 // Jump targets. 480 // Jump targets.
486 // The target of the return from the function. 481 // The target of the return from the function.
487 JumpTarget function_return_; 482 JumpTarget function_return_;
488 483
489 // True if the function return is shadowed (ie, jumping to the target 484 // True if the function return is shadowed (ie, jumping to the target
490 // function_return_ does not jump to the true function return, but rather 485 // function_return_ does not jump to the true function return, but rather
491 // to some unlinking code). 486 // to some unlinking code).
(...skipping 18 matching lines...) Expand all
510 cgen_->set_in_spilled_code(false); 505 cgen_->set_in_spilled_code(false);
511 GetValue(typeof_state); 506 GetValue(typeof_state);
512 cgen_->frame()->SpillAll(); 507 cgen_->frame()->SpillAll();
513 cgen_->set_in_spilled_code(true); 508 cgen_->set_in_spilled_code(true);
514 } 509 }
515 510
516 511
517 } } // namespace v8::internal 512 } } // namespace v8::internal
518 513
519 #endif // V8_CODEGEN_IA32_H_ 514 #endif // V8_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | src/codegen-ia32.cc » ('j') | src/codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698