| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 StaticType* type, | 437 StaticType* type, |
| 438 OverwriteMode overwrite_mode); | 438 OverwriteMode overwrite_mode); |
| 439 | 439 |
| 440 // If possible, combine two constant smi values using op to produce | 440 // If possible, combine two constant smi values using op to produce |
| 441 // a smi result, and push it on the virtual frame, all at compile time. | 441 // a smi result, and push it on the virtual frame, all at compile time. |
| 442 // Returns true if it succeeds. Otherwise it has no effect. | 442 // Returns true if it succeeds. Otherwise it has no effect. |
| 443 bool FoldConstantSmis(Token::Value op, int left, int right); | 443 bool FoldConstantSmis(Token::Value op, int left, int right); |
| 444 | 444 |
| 445 // Emit code to perform a binary operation on a constant | 445 // Emit code to perform a binary operation on a constant |
| 446 // smi and a likely smi. Consumes the Result *operand. | 446 // smi and a likely smi. Consumes the Result *operand. |
| 447 void ConstantSmiBinaryOperation(Token::Value op, | 447 Result ConstantSmiBinaryOperation(Token::Value op, |
| 448 Result* operand, | 448 Result* operand, |
| 449 Handle<Object> constant_operand, | 449 Handle<Object> constant_operand, |
| 450 StaticType* type, | 450 StaticType* type, |
| 451 bool reversed, | 451 bool reversed, |
| 452 OverwriteMode overwrite_mode); | 452 OverwriteMode overwrite_mode); |
| 453 | 453 |
| 454 // Emit code to perform a binary operation on two likely smis. | 454 // Emit code to perform a binary operation on two likely smis. |
| 455 // The code to handle smi arguments is produced inline. | 455 // The code to handle smi arguments is produced inline. |
| 456 // Consumes the Results *left and *right. | 456 // Consumes the Results *left and *right. |
| 457 void LikelySmiBinaryOperation(Token::Value op, | 457 Result LikelySmiBinaryOperation(Token::Value op, |
| 458 Result* left, | 458 Result* left, |
| 459 Result* right, | 459 Result* right, |
| 460 OverwriteMode overwrite_mode); | 460 OverwriteMode overwrite_mode); |
| 461 | 461 |
| 462 void Comparison(AstNode* node, | 462 void Comparison(AstNode* node, |
| 463 Condition cc, | 463 Condition cc, |
| 464 bool strict, | 464 bool strict, |
| 465 ControlDestination* destination); | 465 ControlDestination* destination); |
| 466 | 466 |
| 467 // To prevent long attacker-controlled byte sequences, integer constants | 467 // To prevent long attacker-controlled byte sequences, integer constants |
| 468 // from the JavaScript source are loaded in two parts if they are larger | 468 // from the JavaScript source are loaded in two parts if they are larger |
| 469 // than 16 bits. | 469 // than 16 bits. |
| 470 static const int kMaxSmiInlinedBits = 16; | 470 static const int kMaxSmiInlinedBits = 16; |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 Major MajorKey() { return StringCompare; } | 795 Major MajorKey() { return StringCompare; } |
| 796 int MinorKey() { return 0; } | 796 int MinorKey() { return 0; } |
| 797 | 797 |
| 798 void Generate(MacroAssembler* masm); | 798 void Generate(MacroAssembler* masm); |
| 799 }; | 799 }; |
| 800 | 800 |
| 801 | 801 |
| 802 } } // namespace v8::internal | 802 } } // namespace v8::internal |
| 803 | 803 |
| 804 #endif // V8_IA32_CODEGEN_IA32_H_ | 804 #endif // V8_IA32_CODEGEN_IA32_H_ |
| OLD | NEW |