| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 541 |
| 542 // Fast support for Math.random(). | 542 // Fast support for Math.random(). |
| 543 void GenerateRandomPositiveSmi(ZoneList<Expression*>* args); | 543 void GenerateRandomPositiveSmi(ZoneList<Expression*>* args); |
| 544 | 544 |
| 545 // Fast support for Math.sin and Math.cos. | 545 // Fast support for Math.sin and Math.cos. |
| 546 enum MathOp { SIN, COS }; | 546 enum MathOp { SIN, COS }; |
| 547 void GenerateFastMathOp(MathOp op, ZoneList<Expression*>* args); | 547 void GenerateFastMathOp(MathOp op, ZoneList<Expression*>* args); |
| 548 inline void GenerateMathSin(ZoneList<Expression*>* args); | 548 inline void GenerateMathSin(ZoneList<Expression*>* args); |
| 549 inline void GenerateMathCos(ZoneList<Expression*>* args); | 549 inline void GenerateMathCos(ZoneList<Expression*>* args); |
| 550 | 550 |
| 551 // Simple condition analysis. |
| 552 enum ConditionAnalysis { |
| 553 ALWAYS_TRUE, |
| 554 ALWAYS_FALSE, |
| 555 DONT_KNOW |
| 556 }; |
| 557 ConditionAnalysis AnalyzeCondition(Expression* cond); |
| 558 |
| 551 // Methods used to indicate which source code is generated for. Source | 559 // Methods used to indicate which source code is generated for. Source |
| 552 // positions are collected by the assembler and emitted with the relocation | 560 // positions are collected by the assembler and emitted with the relocation |
| 553 // information. | 561 // information. |
| 554 void CodeForFunctionPosition(FunctionLiteral* fun); | 562 void CodeForFunctionPosition(FunctionLiteral* fun); |
| 555 void CodeForReturnPosition(FunctionLiteral* fun); | 563 void CodeForReturnPosition(FunctionLiteral* fun); |
| 556 void CodeForStatementPosition(Statement* node); | 564 void CodeForStatementPosition(Statement* node); |
| 557 void CodeForSourcePosition(int pos); | 565 void CodeForSourcePosition(int pos); |
| 558 | 566 |
| 559 #ifdef DEBUG | 567 #ifdef DEBUG |
| 560 // True if the registers are valid for entry to a block. There should | 568 // True if the registers are valid for entry to a block. There should |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 | FlagBits::encode(flags_) | 672 | FlagBits::encode(flags_) |
| 665 | SSE3Bits::encode(use_sse3_); | 673 | SSE3Bits::encode(use_sse3_); |
| 666 } | 674 } |
| 667 void Generate(MacroAssembler* masm); | 675 void Generate(MacroAssembler* masm); |
| 668 }; | 676 }; |
| 669 | 677 |
| 670 | 678 |
| 671 } } // namespace v8::internal | 679 } } // namespace v8::internal |
| 672 | 680 |
| 673 #endif // V8_X64_CODEGEN_X64_H_ | 681 #endif // V8_X64_CODEGEN_X64_H_ |
| OLD | NEW |