| 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 void GenerateFastCharCodeAt(ZoneList<Expression*>* args); | 345 void GenerateFastCharCodeAt(ZoneList<Expression*>* args); |
| 346 | 346 |
| 347 // Fast support for object equality testing. | 347 // Fast support for object equality testing. |
| 348 void GenerateObjectEquals(ZoneList<Expression*>* args); | 348 void GenerateObjectEquals(ZoneList<Expression*>* args); |
| 349 | 349 |
| 350 void GenerateLog(ZoneList<Expression*>* args); | 350 void GenerateLog(ZoneList<Expression*>* args); |
| 351 | 351 |
| 352 // Fast support for Math.random(). | 352 // Fast support for Math.random(). |
| 353 void GenerateRandomPositiveSmi(ZoneList<Expression*>* args); | 353 void GenerateRandomPositiveSmi(ZoneList<Expression*>* args); |
| 354 | 354 |
| 355 // Fast support for Math.sin and Math.cos. |
| 356 enum MathOp { SIN, COS }; |
| 357 void GenerateFastMathOp(MathOp op, ZoneList<Expression*>* args); |
| 358 inline void GenerateMathSin(ZoneList<Expression*>* args); |
| 359 inline void GenerateMathCos(ZoneList<Expression*>* args); |
| 360 |
| 355 // Methods and constants for fast case switch statement support. | 361 // Methods and constants for fast case switch statement support. |
| 356 // | 362 // |
| 357 // Only allow fast-case switch if the range of labels is at most | 363 // Only allow fast-case switch if the range of labels is at most |
| 358 // this factor times the number of case labels. | 364 // this factor times the number of case labels. |
| 359 // Value is derived from comparing the size of code generated by the normal | 365 // Value is derived from comparing the size of code generated by the normal |
| 360 // switch code for Smi-labels to the size of a single pointer. If code | 366 // switch code for Smi-labels to the size of a single pointer. If code |
| 361 // quality increases this number should be decreased to match. | 367 // quality increases this number should be decreased to match. |
| 362 static const int kFastSwitchMaxOverheadFactor = 10; | 368 static const int kFastSwitchMaxOverheadFactor = 10; |
| 363 | 369 |
| 364 // Minimal number of switch cases required before we allow jump-table | 370 // Minimal number of switch cases required before we allow jump-table |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 friend class JumpTarget; | 459 friend class JumpTarget; |
| 454 friend class Reference; | 460 friend class Reference; |
| 455 | 461 |
| 456 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 462 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
| 457 }; | 463 }; |
| 458 | 464 |
| 459 | 465 |
| 460 } } // namespace v8::internal | 466 } } // namespace v8::internal |
| 461 | 467 |
| 462 #endif // V8_ARM_CODEGEN_ARM_H_ | 468 #endif // V8_ARM_CODEGEN_ARM_H_ |
| OLD | NEW |