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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 // are both smis. Cannot be in MacroAssembler because it takes | 523 // are both smis. Cannot be in MacroAssembler because it takes |
524 // advantage of TypeInfo to skip unneeded checks. | 524 // advantage of TypeInfo to skip unneeded checks. |
525 // Allocates a temporary register, possibly spilling from the frame, | 525 // Allocates a temporary register, possibly spilling from the frame, |
526 // if it needs to check both left and right. | 526 // if it needs to check both left and right. |
527 void JumpIfBothSmiUsingTypeInfo(Result* left, | 527 void JumpIfBothSmiUsingTypeInfo(Result* left, |
528 Result* right, | 528 Result* right, |
529 JumpTarget* both_smi); | 529 JumpTarget* both_smi); |
530 | 530 |
531 // Emits code sequence that jumps to deferred code if the inputs | 531 // Emits code sequence that jumps to deferred code if the inputs |
532 // are not both smis. Cannot be in MacroAssembler because it takes | 532 // are not both smis. Cannot be in MacroAssembler because it takes |
533 // advantage of TypeInfo to skip unneeded checks. | 533 // a deferred code object. |
534 void JumpIfNotBothSmiUsingTypeInfo(Register left, | 534 void JumpIfNotBothSmiUsingTypeInfo(Register left, |
535 Register right, | 535 Register right, |
536 Register scratch, | 536 Register scratch, |
537 TypeInfo left_info, | 537 TypeInfo left_info, |
538 TypeInfo right_info, | 538 TypeInfo right_info, |
539 DeferredCode* deferred); | 539 DeferredCode* deferred); |
540 | 540 |
| 541 // Emits code sequence that jumps to the label if the inputs |
| 542 // are not both smis. |
| 543 void JumpIfNotBothSmiUsingTypeInfo(Register left, |
| 544 Register right, |
| 545 Register scratch, |
| 546 TypeInfo left_info, |
| 547 TypeInfo right_info, |
| 548 Label* on_non_smi); |
| 549 |
541 // If possible, combine two constant smi values using op to produce | 550 // If possible, combine two constant smi values using op to produce |
542 // a smi result, and push it on the virtual frame, all at compile time. | 551 // a smi result, and push it on the virtual frame, all at compile time. |
543 // Returns true if it succeeds. Otherwise it has no effect. | 552 // Returns true if it succeeds. Otherwise it has no effect. |
544 bool FoldConstantSmis(Token::Value op, int left, int right); | 553 bool FoldConstantSmis(Token::Value op, int left, int right); |
545 | 554 |
546 // Emit code to perform a binary operation on a constant | 555 // Emit code to perform a binary operation on a constant |
547 // smi and a likely smi. Consumes the Result operand. | 556 // smi and a likely smi. Consumes the Result operand. |
548 Result ConstantSmiBinaryOperation(BinaryOperation* expr, | 557 Result ConstantSmiBinaryOperation(BinaryOperation* expr, |
549 Result* operand, | 558 Result* operand, |
550 Handle<Object> constant_operand, | 559 Handle<Object> constant_operand, |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 void Print() { | 1097 void Print() { |
1089 PrintF("NumberToStringStub\n"); | 1098 PrintF("NumberToStringStub\n"); |
1090 } | 1099 } |
1091 #endif | 1100 #endif |
1092 }; | 1101 }; |
1093 | 1102 |
1094 | 1103 |
1095 } } // namespace v8::internal | 1104 } } // namespace v8::internal |
1096 | 1105 |
1097 #endif // V8_IA32_CODEGEN_IA32_H_ | 1106 #endif // V8_IA32_CODEGEN_IA32_H_ |
OLD | NEW |