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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 | 553 |
554 // Emit code to perform a binary operation on two untagged int32 values. | 554 // Emit code to perform a binary operation on two untagged int32 values. |
555 // The values are on top of the frame, and the result is pushed on the frame. | 555 // The values are on top of the frame, and the result is pushed on the frame. |
556 void Int32BinaryOperation(BinaryOperation* node); | 556 void Int32BinaryOperation(BinaryOperation* node); |
557 | 557 |
558 | 558 |
559 void Comparison(AstNode* node, | 559 void Comparison(AstNode* node, |
560 Condition cc, | 560 Condition cc, |
561 bool strict, | 561 bool strict, |
562 ControlDestination* destination); | 562 ControlDestination* destination); |
| 563 |
| 564 // If at least one of the sides is a constant smi, generate optimized code. |
| 565 void ConstantSmiComparison(Condition cc, |
| 566 bool strict, |
| 567 ControlDestination* destination, |
| 568 Result* left_side, |
| 569 Result* right_side, |
| 570 bool left_side_constant_smi, |
| 571 bool right_side_constant_smi, |
| 572 bool is_loop_condition); |
| 573 |
563 void GenerateInlineNumberComparison(Result* left_side, | 574 void GenerateInlineNumberComparison(Result* left_side, |
564 Result* right_side, | 575 Result* right_side, |
565 Condition cc, | 576 Condition cc, |
566 ControlDestination* dest); | 577 ControlDestination* dest); |
567 | 578 |
568 // To prevent long attacker-controlled byte sequences, integer constants | 579 // To prevent long attacker-controlled byte sequences, integer constants |
569 // from the JavaScript source are loaded in two parts if they are larger | 580 // from the JavaScript source are loaded in two parts if they are larger |
570 // than 17 bits. | 581 // than 17 bits. |
571 static const int kMaxSmiInlinedBits = 17; | 582 static const int kMaxSmiInlinedBits = 17; |
572 bool IsUnsafeSmi(Handle<Object> value); | 583 bool IsUnsafeSmi(Handle<Object> value); |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 void Print() { | 1078 void Print() { |
1068 PrintF("NumberToStringStub\n"); | 1079 PrintF("NumberToStringStub\n"); |
1069 } | 1080 } |
1070 #endif | 1081 #endif |
1071 }; | 1082 }; |
1072 | 1083 |
1073 | 1084 |
1074 } } // namespace v8::internal | 1085 } } // namespace v8::internal |
1075 | 1086 |
1076 #endif // V8_IA32_CODEGEN_IA32_H_ | 1087 #endif // V8_IA32_CODEGEN_IA32_H_ |
OLD | NEW |