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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 // Fast support for object equality testing. | 514 // Fast support for object equality testing. |
515 void GenerateObjectEquals(ZoneList<Expression*>* args); | 515 void GenerateObjectEquals(ZoneList<Expression*>* args); |
516 | 516 |
517 void GenerateLog(ZoneList<Expression*>* args); | 517 void GenerateLog(ZoneList<Expression*>* args); |
518 | 518 |
519 void GenerateGetFramePointer(ZoneList<Expression*>* args); | 519 void GenerateGetFramePointer(ZoneList<Expression*>* args); |
520 | 520 |
521 // Fast support for Math.random(). | 521 // Fast support for Math.random(). |
522 void GenerateRandomPositiveSmi(ZoneList<Expression*>* args); | 522 void GenerateRandomPositiveSmi(ZoneList<Expression*>* args); |
523 | 523 |
| 524 // Fast support for Math.sin and Math.cos. |
| 525 enum MathOp { SIN, COS }; |
| 526 void GenerateFastMathOp(MathOp op, ZoneList<Expression*>* args); |
| 527 inline void GenerateMathSin(ZoneList<Expression*>* args); |
| 528 inline void GenerateMathCos(ZoneList<Expression*>* args); |
| 529 |
524 // Methods and constants for fast case switch statement support. | 530 // Methods and constants for fast case switch statement support. |
525 // | 531 // |
526 // Only allow fast-case switch if the range of labels is at most | 532 // Only allow fast-case switch if the range of labels is at most |
527 // this factor times the number of case labels. | 533 // this factor times the number of case labels. |
528 // Value is derived from comparing the size of code generated by the normal | 534 // Value is derived from comparing the size of code generated by the normal |
529 // switch code for Smi-labels to the size of a single pointer. If code | 535 // switch code for Smi-labels to the size of a single pointer. If code |
530 // quality increases this number should be decreased to match. | 536 // quality increases this number should be decreased to match. |
531 static const int kFastSwitchMaxOverheadFactor = 5; | 537 static const int kFastSwitchMaxOverheadFactor = 5; |
532 | 538 |
533 // Minimal number of switch cases required before we allow jump-table | 539 // Minimal number of switch cases required before we allow jump-table |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 | 631 |
626 friend class CodeGeneratorPatcher; // Used in test-log-ia32.cc | 632 friend class CodeGeneratorPatcher; // Used in test-log-ia32.cc |
627 | 633 |
628 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 634 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
629 }; | 635 }; |
630 | 636 |
631 | 637 |
632 } } // namespace v8::internal | 638 } } // namespace v8::internal |
633 | 639 |
634 #endif // V8_IA32_CODEGEN_IA32_H_ | 640 #endif // V8_IA32_CODEGEN_IA32_H_ |
OLD | NEW |