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 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1615 break; | 1615 break; |
1616 | 1616 |
1617 case Expression::kValueTest: | 1617 case Expression::kValueTest: |
1618 true_label_ = &push_true; | 1618 true_label_ = &push_true; |
1619 break; | 1619 break; |
1620 | 1620 |
1621 case Expression::kTestValue: | 1621 case Expression::kTestValue: |
1622 false_label_ = &push_false; | 1622 false_label_ = &push_false; |
1623 break; | 1623 break; |
1624 } | 1624 } |
| 1625 |
1625 // Convert current context to test context: End pre-test code. | 1626 // Convert current context to test context: End pre-test code. |
1626 | |
1627 switch (expr->op()) { | 1627 switch (expr->op()) { |
1628 case Token::IN: { | 1628 case Token::IN: { |
1629 __ InvokeBuiltin(Builtins::IN, CALL_JS); | 1629 __ InvokeBuiltin(Builtins::IN, CALL_JS); |
1630 __ LoadRoot(ip, Heap::kTrueValueRootIndex); | 1630 __ LoadRoot(ip, Heap::kTrueValueRootIndex); |
1631 __ cmp(r0, ip); | 1631 __ cmp(r0, ip); |
1632 __ b(eq, true_label_); | 1632 __ b(eq, true_label_); |
1633 __ jmp(false_label_); | 1633 __ jmp(false_label_); |
1634 break; | 1634 break; |
1635 } | 1635 } |
1636 | 1636 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1793 __ pop(result_register()); | 1793 __ pop(result_register()); |
1794 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); | 1794 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); |
1795 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 1795 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
1796 __ add(pc, r1, Operand(masm_->CodeObject())); | 1796 __ add(pc, r1, Operand(masm_->CodeObject())); |
1797 } | 1797 } |
1798 | 1798 |
1799 | 1799 |
1800 #undef __ | 1800 #undef __ |
1801 | 1801 |
1802 } } // namespace v8::internal | 1802 } } // namespace v8::internal |
OLD | NEW |