| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 // through the context chain. | 462 // through the context chain. |
| 463 void LoadTypeofExpression(Expression* x); | 463 void LoadTypeofExpression(Expression* x); |
| 464 | 464 |
| 465 // Translate the value on top of the frame into control flow to the | 465 // Translate the value on top of the frame into control flow to the |
| 466 // control destination. | 466 // control destination. |
| 467 void ToBoolean(ControlDestination* destination); | 467 void ToBoolean(ControlDestination* destination); |
| 468 | 468 |
| 469 void GenericBinaryOperation( | 469 void GenericBinaryOperation( |
| 470 Token::Value op, | 470 Token::Value op, |
| 471 StaticType* type, | 471 StaticType* type, |
| 472 OverwriteMode overwrite_mode); | 472 OverwriteMode overwrite_mode, |
| 473 bool no_negative_zero); |
| 473 | 474 |
| 474 // If possible, combine two constant smi values using op to produce | 475 // If possible, combine two constant smi values using op to produce |
| 475 // a smi result, and push it on the virtual frame, all at compile time. | 476 // a smi result, and push it on the virtual frame, all at compile time. |
| 476 // Returns true if it succeeds. Otherwise it has no effect. | 477 // Returns true if it succeeds. Otherwise it has no effect. |
| 477 bool FoldConstantSmis(Token::Value op, int left, int right); | 478 bool FoldConstantSmis(Token::Value op, int left, int right); |
| 478 | 479 |
| 479 // Emit code to perform a binary operation on a constant | 480 // Emit code to perform a binary operation on a constant |
| 480 // smi and a likely smi. Consumes the Result *operand. | 481 // smi and a likely smi. Consumes the Result *operand. |
| 481 Result ConstantSmiBinaryOperation(Token::Value op, | 482 Result ConstantSmiBinaryOperation(Token::Value op, |
| 482 Result* operand, | 483 Result* operand, |
| 483 Handle<Object> constant_operand, | 484 Handle<Object> constant_operand, |
| 484 StaticType* type, | 485 StaticType* type, |
| 485 bool reversed, | 486 bool reversed, |
| 486 OverwriteMode overwrite_mode); | 487 OverwriteMode overwrite_mode, |
| 488 bool no_negative_zero); |
| 487 | 489 |
| 488 // Emit code to perform a binary operation on two likely smis. | 490 // Emit code to perform a binary operation on two likely smis. |
| 489 // The code to handle smi arguments is produced inline. | 491 // The code to handle smi arguments is produced inline. |
| 490 // Consumes the Results *left and *right. | 492 // Consumes the Results *left and *right. |
| 491 Result LikelySmiBinaryOperation(Token::Value op, | 493 Result LikelySmiBinaryOperation(Token::Value op, |
| 492 Result* left, | 494 Result* left, |
| 493 Result* right, | 495 Result* right, |
| 494 OverwriteMode overwrite_mode); | 496 OverwriteMode overwrite_mode, |
| 497 bool no_negative_zero); |
| 495 | 498 |
| 496 void Comparison(AstNode* node, | 499 void Comparison(AstNode* node, |
| 497 Condition cc, | 500 Condition cc, |
| 498 bool strict, | 501 bool strict, |
| 499 ControlDestination* destination); | 502 ControlDestination* destination); |
| 500 | 503 |
| 501 // To prevent long attacker-controlled byte sequences, integer constants | 504 // To prevent long attacker-controlled byte sequences, integer constants |
| 502 // from the JavaScript source are loaded in two parts if they are larger | 505 // from the JavaScript source are loaded in two parts if they are larger |
| 503 // than 17 bits. | 506 // than 17 bits. |
| 504 static const int kMaxSmiInlinedBits = 17; | 507 static const int kMaxSmiInlinedBits = 17; |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 return ObjectBits::encode(object_.code()) | | 1012 return ObjectBits::encode(object_.code()) | |
| 1010 AddressBits::encode(addr_.code()) | | 1013 AddressBits::encode(addr_.code()) | |
| 1011 ScratchBits::encode(scratch_.code()); | 1014 ScratchBits::encode(scratch_.code()); |
| 1012 } | 1015 } |
| 1013 }; | 1016 }; |
| 1014 | 1017 |
| 1015 | 1018 |
| 1016 } } // namespace v8::internal | 1019 } } // namespace v8::internal |
| 1017 | 1020 |
| 1018 #endif // V8_IA32_CODEGEN_IA32_H_ | 1021 #endif // V8_IA32_CODEGEN_IA32_H_ |
| OLD | NEW |