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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 | 434 |
435 void GenericBinaryOperation(Token::Value op, | 435 void GenericBinaryOperation(Token::Value op, |
436 StaticType* type, | 436 StaticType* type, |
437 const OverwriteMode overwrite_mode = NO_OVERWRITE); | 437 const OverwriteMode overwrite_mode = NO_OVERWRITE); |
438 | 438 |
439 // If possible, combine two constant smi values using op to produce | 439 // If possible, combine two constant smi values using op to produce |
440 // 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. |
441 // Returns true if it succeeds. Otherwise it has no effect. | 441 // Returns true if it succeeds. Otherwise it has no effect. |
442 bool FoldConstantSmis(Token::Value op, int left, int right); | 442 bool FoldConstantSmis(Token::Value op, int left, int right); |
443 | 443 |
444 // Emit code to perform a binary operation on | 444 // Emit code to perform a binary operation on a constant |
445 // a constant smi and a likely smi. Consumes the Result *operand. | 445 // smi and a likely smi. Consumes the Result *operand. |
446 void ConstantSmiBinaryOperation(Token::Value op, | 446 void ConstantSmiBinaryOperation(Token::Value op, |
447 Result* operand, | 447 Result* operand, |
448 Handle<Object> constant_operand, | 448 Handle<Object> constant_operand, |
449 StaticType* type, | 449 StaticType* type, |
450 bool reversed, | 450 bool reversed, |
451 OverwriteMode overwrite_mode); | 451 OverwriteMode overwrite_mode); |
452 | 452 |
453 // Emit code to perform a binary operation on two likely smis. | 453 // Emit code to perform a binary operation on two likely smis. |
454 // The code to handle smi arguments is produced inline. | 454 // The code to handle smi arguments is produced inline. |
455 // Consumes the Results *left and *right. | 455 // Consumes the Results *left and *right. |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 friend class Reference; | 610 friend class Reference; |
611 friend class Result; | 611 friend class Result; |
612 | 612 |
613 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 613 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
614 }; | 614 }; |
615 | 615 |
616 | 616 |
617 } } // namespace v8::internal | 617 } } // namespace v8::internal |
618 | 618 |
619 #endif // V8_CODEGEN_IA32_H_ | 619 #endif // V8_CODEGEN_IA32_H_ |
OLD | NEW |