| 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 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* stmt); | 564 void CodeForStatementPosition(Statement* stmt); |
| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 void SetArgsReversed() { args_reversed_ = true; } | 699 void SetArgsReversed() { args_reversed_ = true; } |
| 692 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } | 700 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } |
| 693 bool HasArgumentsInRegisters() { return args_in_registers_; } | 701 bool HasArgumentsInRegisters() { return args_in_registers_; } |
| 694 bool HasArgumentsReversed() { return args_reversed_; } | 702 bool HasArgumentsReversed() { return args_reversed_; } |
| 695 }; | 703 }; |
| 696 | 704 |
| 697 | 705 |
| 698 } } // namespace v8::internal | 706 } } // namespace v8::internal |
| 699 | 707 |
| 700 #endif // V8_IA32_CODEGEN_IA32_H_ | 708 #endif // V8_IA32_CODEGEN_IA32_H_ |
| OLD | NEW |