Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 6542060: X64: Refactor the string add in the type recording binary operation stub... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/x64/code-stubs-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/x64/code-stubs-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698