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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 void GenerateFastCaseSwitchStatement(SwitchStatement* node, | 430 void GenerateFastCaseSwitchStatement(SwitchStatement* node, |
431 int min_index, | 431 int min_index, |
432 int range, | 432 int range, |
433 int default_index); | 433 int default_index); |
434 | 434 |
435 // Fast support for constant-Smi switches. Tests whether switch statement | 435 // Fast support for constant-Smi switches. Tests whether switch statement |
436 // permits optimization and calls GenerateFastCaseSwitch if it does. | 436 // permits optimization and calls GenerateFastCaseSwitch if it does. |
437 // Returns true if the fast-case switch was generated, and false if not. | 437 // Returns true if the fast-case switch was generated, and false if not. |
438 bool TryGenerateFastCaseSwitchStatement(SwitchStatement* node); | 438 bool TryGenerateFastCaseSwitchStatement(SwitchStatement* node); |
439 | 439 |
440 | 440 // Methods used to indicate which source code is generated for. Source |
441 // Bottle-neck interface to call the Assembler to generate the statement | 441 // positions are collected by the assembler and emitted with the relocation |
442 // position. This allows us to easily control whether statement positions | 442 // information. |
443 // should be generated or not. | 443 void CodeForStatement(Node* node); |
444 void RecordStatementPosition(Node* node); | 444 void CodeForSourcePosition(int pos); |
445 | 445 |
446 // Is the given jump target the actual (ie, non-shadowed) function return | 446 // Is the given jump target the actual (ie, non-shadowed) function return |
447 // target? | 447 // target? |
448 bool IsActualFunctionReturn(JumpTarget* target); | 448 bool IsActualFunctionReturn(JumpTarget* target); |
449 | 449 |
450 bool is_eval_; // Tells whether code is generated for eval. | 450 bool is_eval_; // Tells whether code is generated for eval. |
451 Handle<Script> script_; | 451 Handle<Script> script_; |
452 List<DeferredCode*> deferred_; | 452 List<DeferredCode*> deferred_; |
453 | 453 |
454 // Assembler | 454 // Assembler |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 cgen_->set_in_spilled_code(false); | 492 cgen_->set_in_spilled_code(false); |
493 GetValue(typeof_state); | 493 GetValue(typeof_state); |
494 cgen_->frame()->SpillAll(); | 494 cgen_->frame()->SpillAll(); |
495 cgen_->set_in_spilled_code(true); | 495 cgen_->set_in_spilled_code(true); |
496 } | 496 } |
497 | 497 |
498 | 498 |
499 } } // namespace v8::internal | 499 } } // namespace v8::internal |
500 | 500 |
501 #endif // V8_CODEGEN_IA32_H_ | 501 #endif // V8_CODEGEN_IA32_H_ |
OLD | NEW |