OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2378 case Token::SHR: | 2378 case Token::SHR: |
2379 __ InvokeBuiltin(Builtins::SHR, JUMP_FUNCTION); | 2379 __ InvokeBuiltin(Builtins::SHR, JUMP_FUNCTION); |
2380 break; | 2380 break; |
2381 default: | 2381 default: |
2382 UNREACHABLE(); | 2382 UNREACHABLE(); |
2383 } | 2383 } |
2384 } | 2384 } |
2385 | 2385 |
2386 | 2386 |
2387 void TypeRecordingBinaryOpStub::GenerateAddStrings(MacroAssembler* masm) { | 2387 void TypeRecordingBinaryOpStub::GenerateAddStrings(MacroAssembler* masm) { |
2388 NearLabel call_runtime; | 2388 ASSERT(op_ == Token::ADD); |
| 2389 NearLabel left_not_string, call_runtime; |
2389 | 2390 |
2390 // Registers containing left and right operands respectively. | 2391 // Registers containing left and right operands respectively. |
2391 Register left = edx; | 2392 Register left = edx; |
2392 Register right = eax; | 2393 Register right = eax; |
2393 | 2394 |
2394 // Test if left operand is a string. | 2395 // Test if left operand is a string. |
2395 NearLabel left_not_string; | |
2396 __ test(left, Immediate(kSmiTagMask)); | 2396 __ test(left, Immediate(kSmiTagMask)); |
2397 __ j(zero, &left_not_string); | 2397 __ j(zero, &left_not_string); |
2398 __ CmpObjectType(left, FIRST_NONSTRING_TYPE, ecx); | 2398 __ CmpObjectType(left, FIRST_NONSTRING_TYPE, ecx); |
2399 __ j(above_equal, &left_not_string); | 2399 __ j(above_equal, &left_not_string); |
2400 | 2400 |
2401 StringAddStub string_add_left_stub(NO_STRING_CHECK_LEFT_IN_STUB); | 2401 StringAddStub string_add_left_stub(NO_STRING_CHECK_LEFT_IN_STUB); |
2402 GenerateRegisterArgsPush(masm); | 2402 GenerateRegisterArgsPush(masm); |
2403 __ TailCallStub(&string_add_left_stub); | 2403 __ TailCallStub(&string_add_left_stub); |
2404 | 2404 |
2405 // Left operand is not a string, test right. | 2405 // Left operand is not a string, test right. |
(...skipping 4210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6616 __ mov_b(Operand(external_pointer, untagged_key, times_1, 0), untagged_value); | 6616 __ mov_b(Operand(external_pointer, untagged_key, times_1, 0), untagged_value); |
6617 __ ret(0); // Return value in eax. | 6617 __ ret(0); // Return value in eax. |
6618 } | 6618 } |
6619 | 6619 |
6620 | 6620 |
6621 #undef __ | 6621 #undef __ |
6622 | 6622 |
6623 } } // namespace v8::internal | 6623 } } // namespace v8::internal |
6624 | 6624 |
6625 #endif // V8_TARGET_ARCH_IA32 | 6625 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |