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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/ia32/code-stubs-ia32.cc » ('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 2940 matching lines...) Expand 10 before | Expand all | Expand 10 after
2951 GenerateAddStrings(masm); 2951 GenerateAddStrings(masm);
2952 } 2952 }
2953 2953
2954 __ bind(&call_runtime); 2954 __ bind(&call_runtime);
2955 GenerateCallRuntime(masm); 2955 GenerateCallRuntime(masm);
2956 } 2956 }
2957 2957
2958 2958
2959 void TypeRecordingBinaryOpStub::GenerateAddStrings(MacroAssembler* masm) { 2959 void TypeRecordingBinaryOpStub::GenerateAddStrings(MacroAssembler* masm) {
2960 ASSERT(op_ == Token::ADD); 2960 ASSERT(op_ == Token::ADD);
2961 Label left_not_string, call_runtime;
2961 2962
2962 Register left = r1; 2963 Register left = r1;
2963 Register right = r0; 2964 Register right = r0;
2964 Label left_not_string, call_runtime;
2965 2965
2966 // Check if left argument is a string. 2966 // Check if left argument is a string.
2967 __ JumpIfSmi(left, &left_not_string); 2967 __ JumpIfSmi(left, &left_not_string);
2968 __ CompareObjectType(left, r2, r2, FIRST_NONSTRING_TYPE); 2968 __ CompareObjectType(left, r2, r2, FIRST_NONSTRING_TYPE);
2969 __ b(ge, &left_not_string); 2969 __ b(ge, &left_not_string);
2970 2970
2971 StringAddStub string_add_left_stub(NO_STRING_CHECK_LEFT_IN_STUB); 2971 StringAddStub string_add_left_stub(NO_STRING_CHECK_LEFT_IN_STUB);
2972 GenerateRegisterArgsPush(masm); 2972 GenerateRegisterArgsPush(masm);
2973 __ TailCallStub(&string_add_left_stub); 2973 __ TailCallStub(&string_add_left_stub);
2974 2974
(...skipping 3153 matching lines...) Expand 10 before | Expand all | Expand 10 after
6128 __ strb(untagged_value, MemOperand(external_pointer, untagged_key)); 6128 __ strb(untagged_value, MemOperand(external_pointer, untagged_key));
6129 __ Ret(); 6129 __ Ret();
6130 } 6130 }
6131 6131
6132 6132
6133 #undef __ 6133 #undef __
6134 6134
6135 } } // namespace v8::internal 6135 } } // namespace v8::internal
6136 6136
6137 #endif // V8_TARGET_ARCH_ARM 6137 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698