OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 7023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7034 __ push(edx); | 7034 __ push(edx); |
7035 } else { | 7035 } else { |
7036 __ push(edx); | 7036 __ push(edx); |
7037 __ push(eax); | 7037 __ push(eax); |
7038 } | 7038 } |
7039 __ push(ecx); | 7039 __ push(ecx); |
7040 } | 7040 } |
7041 switch (op_) { | 7041 switch (op_) { |
7042 case Token::ADD: { | 7042 case Token::ADD: { |
7043 // Test for string arguments before calling runtime. | 7043 // Test for string arguments before calling runtime. |
7044 Label not_strings, both_strings, not_string1, string1; | 7044 Label not_strings, not_string1, string1; |
7045 Result answer; | 7045 Result answer; |
7046 __ mov(eax, Operand(esp, 2 * kPointerSize)); // First argument. | 7046 __ mov(eax, Operand(esp, 2 * kPointerSize)); // First argument. |
7047 __ mov(edx, Operand(esp, 1 * kPointerSize)); // Second argument. | 7047 __ mov(edx, Operand(esp, 1 * kPointerSize)); // Second argument. |
7048 __ test(eax, Immediate(kSmiTagMask)); | 7048 __ test(eax, Immediate(kSmiTagMask)); |
7049 __ j(zero, ¬_string1); | 7049 __ j(zero, ¬_string1); |
7050 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, eax); | 7050 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, eax); |
7051 __ j(above_equal, ¬_string1); | 7051 __ j(above_equal, ¬_string1); |
7052 | 7052 |
7053 // First argument is a a string, test second. | 7053 // First argument is a a string, test second. |
7054 __ test(edx, Immediate(kSmiTagMask)); | 7054 __ test(edx, Immediate(kSmiTagMask)); |
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8399 __ add(Operand(dest), Immediate(2)); | 8399 __ add(Operand(dest), Immediate(2)); |
8400 } | 8400 } |
8401 __ sub(Operand(count), Immediate(1)); | 8401 __ sub(Operand(count), Immediate(1)); |
8402 __ j(not_zero, &loop); | 8402 __ j(not_zero, &loop); |
8403 } | 8403 } |
8404 | 8404 |
8405 | 8405 |
8406 #undef __ | 8406 #undef __ |
8407 | 8407 |
8408 } } // namespace v8::internal | 8408 } } // namespace v8::internal |
OLD | NEW |