| 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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 // is optimal compared to the default code generated for a switch statement | 431 // is optimal compared to the default code generated for a switch statement |
| 432 // on that platform. | 432 // on that platform. |
| 433 int FastCaseSwitchMinCaseCount(); | 433 int FastCaseSwitchMinCaseCount(); |
| 434 | 434 |
| 435 // Allocate a jump table and create code to jump through it. | 435 // Allocate a jump table and create code to jump through it. |
| 436 // Should call GenerateFastCaseSwitchCases to generate the code for | 436 // Should call GenerateFastCaseSwitchCases to generate the code for |
| 437 // all the cases at the appropriate point. | 437 // all the cases at the appropriate point. |
| 438 void GenerateFastCaseSwitchJumpTable(SwitchStatement* node, | 438 void GenerateFastCaseSwitchJumpTable(SwitchStatement* node, |
| 439 int min_index, | 439 int min_index, |
| 440 int range, | 440 int range, |
| 441 JumpTarget* fail_label, | 441 Label* fail_label, |
| 442 Vector<JumpTarget*> case_targets, | 442 Vector<Label*> case_targets, |
| 443 Vector<JumpTarget> case_labels); | 443 Vector<Label> case_labels); |
| 444 | 444 |
| 445 // Generate the code for cases for the fast case switch. | 445 // Generate the code for cases for the fast case switch. |
| 446 // Called by GenerateFastCaseSwitchJumpTable. | 446 // Called by GenerateFastCaseSwitchJumpTable. |
| 447 void GenerateFastCaseSwitchCases(SwitchStatement* node, | 447 void GenerateFastCaseSwitchCases(SwitchStatement* node, |
| 448 Vector<JumpTarget> case_labels, | 448 Vector<Label> case_labels, |
| 449 JumpTarget* table_start); | 449 VirtualFrame* start_frame); |
| 450 | 450 |
| 451 // Fast support for constant-Smi switches. | 451 // Fast support for constant-Smi switches. |
| 452 void GenerateFastCaseSwitchStatement(SwitchStatement* node, | 452 void GenerateFastCaseSwitchStatement(SwitchStatement* node, |
| 453 int min_index, | 453 int min_index, |
| 454 int range, | 454 int range, |
| 455 int default_index); | 455 int default_index); |
| 456 | 456 |
| 457 // Fast support for constant-Smi switches. Tests whether switch statement | 457 // Fast support for constant-Smi switches. Tests whether switch statement |
| 458 // permits optimization and calls GenerateFastCaseSwitch if it does. | 458 // permits optimization and calls GenerateFastCaseSwitch if it does. |
| 459 // Returns true if the fast-case switch was generated, and false if not. | 459 // Returns true if the fast-case switch was generated, and false if not. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 cgen_->set_in_spilled_code(false); | 516 cgen_->set_in_spilled_code(false); |
| 517 GetValue(typeof_state); | 517 GetValue(typeof_state); |
| 518 cgen_->frame()->SpillAll(); | 518 cgen_->frame()->SpillAll(); |
| 519 cgen_->set_in_spilled_code(true); | 519 cgen_->set_in_spilled_code(true); |
| 520 } | 520 } |
| 521 | 521 |
| 522 | 522 |
| 523 } } // namespace v8::internal | 523 } } // namespace v8::internal |
| 524 | 524 |
| 525 #endif // V8_CODEGEN_IA32_H_ | 525 #endif // V8_CODEGEN_IA32_H_ |
| OLD | NEW |