| 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 // expressions. We are not allowed to throw reference errors for | 424 // expressions. We are not allowed to throw reference errors for |
| 425 // non-existing properties of the global object, so we must make it | 425 // non-existing properties of the global object, so we must make it |
| 426 // look like an explicit property access, instead of an access | 426 // look like an explicit property access, instead of an access |
| 427 // through the context chain. | 427 // through the context chain. |
| 428 void LoadTypeofExpression(Expression* x); | 428 void LoadTypeofExpression(Expression* x); |
| 429 | 429 |
| 430 // Translate the value on top of the frame into control flow to the | 430 // Translate the value on top of the frame into control flow to the |
| 431 // control destination. | 431 // control destination. |
| 432 void ToBoolean(ControlDestination* destination); | 432 void ToBoolean(ControlDestination* destination); |
| 433 | 433 |
| 434 void GenericBinaryOperation(Token::Value op, | 434 void GenericBinaryOperation( |
| 435 StaticType* type, | 435 Token::Value op, |
| 436 SmiAnalysis* type, |
| 436 const OverwriteMode overwrite_mode = NO_OVERWRITE); | 437 const OverwriteMode overwrite_mode = NO_OVERWRITE); |
| 437 | 438 |
| 438 // If possible, combine two constant smi values using op to produce | 439 // If possible, combine two constant smi values using op to produce |
| 439 // a smi result, and push it on the virtual frame, all at compile time. | 440 // a smi result, and push it on the virtual frame, all at compile time. |
| 440 // Returns true if it succeeds. Otherwise it has no effect. | 441 // Returns true if it succeeds. Otherwise it has no effect. |
| 441 bool FoldConstantSmis(Token::Value op, int left, int right); | 442 bool FoldConstantSmis(Token::Value op, int left, int right); |
| 442 | 443 |
| 443 // Emit code to perform a binary operation on a constant | 444 // Emit code to perform a binary operation on a constant |
| 444 // smi and a likely smi. Consumes the Result *operand. | 445 // smi and a likely smi. Consumes the Result *operand. |
| 445 void ConstantSmiBinaryOperation(Token::Value op, | 446 void ConstantSmiBinaryOperation(Token::Value op, |
| 446 Result* operand, | 447 Result* operand, |
| 447 Handle<Object> constant_operand, | 448 Handle<Object> constant_operand, |
| 448 StaticType* type, | 449 SmiAnalysis* type, |
| 449 bool reversed, | 450 bool reversed, |
| 450 OverwriteMode overwrite_mode); | 451 OverwriteMode overwrite_mode); |
| 451 | 452 |
| 452 // Emit code to perform a binary operation on two likely smis. | 453 // Emit code to perform a binary operation on two likely smis. |
| 453 // The code to handle smi arguments is produced inline. | 454 // The code to handle smi arguments is produced inline. |
| 454 // Consumes the Results *left and *right. | 455 // Consumes the Results *left and *right. |
| 455 void LikelySmiBinaryOperation(Token::Value op, | 456 void LikelySmiBinaryOperation(Token::Value op, |
| 456 Result* left, | 457 Result* left, |
| 457 Result* right, | 458 Result* right, |
| 458 OverwriteMode overwrite_mode); | 459 OverwriteMode overwrite_mode); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 friend class Reference; | 611 friend class Reference; |
| 611 friend class Result; | 612 friend class Result; |
| 612 | 613 |
| 613 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 614 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
| 614 }; | 615 }; |
| 615 | 616 |
| 616 | 617 |
| 617 } } // namespace v8::internal | 618 } } // namespace v8::internal |
| 618 | 619 |
| 619 #endif // V8_CODEGEN_IA32_H_ | 620 #endif // V8_CODEGEN_IA32_H_ |
| OLD | NEW |