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