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

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

Issue 23600040: Revert "Clean up after r16292 (disable optimization for StringWrappers)." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/arm/full-codegen-arm.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 5772 matching lines...) Expand 10 before | Expand all | Expand 10 after
5783 Register scratch3, 5783 Register scratch3,
5784 Register scratch4, 5784 Register scratch4,
5785 Label* slow) { 5785 Label* slow) {
5786 // First check if the argument is already a string. 5786 // First check if the argument is already a string.
5787 Label not_string, done; 5787 Label not_string, done;
5788 __ JumpIfSmi(arg, &not_string); 5788 __ JumpIfSmi(arg, &not_string);
5789 __ CompareObjectType(arg, scratch1, scratch1, FIRST_NONSTRING_TYPE); 5789 __ CompareObjectType(arg, scratch1, scratch1, FIRST_NONSTRING_TYPE);
5790 __ b(lt, &done); 5790 __ b(lt, &done);
5791 5791
5792 // Check the number to string cache. 5792 // Check the number to string cache.
5793 Label not_cached;
5793 __ bind(&not_string); 5794 __ bind(&not_string);
5794 // Puts the cached result into scratch1. 5795 // Puts the cached result into scratch1.
5795 NumberToStringStub::GenerateLookupNumberStringCache(masm, 5796 NumberToStringStub::GenerateLookupNumberStringCache(masm,
5796 arg, 5797 arg,
5797 scratch1, 5798 scratch1,
5798 scratch2, 5799 scratch2,
5799 scratch3, 5800 scratch3,
5800 scratch4, 5801 scratch4,
5801 slow); 5802 &not_cached);
5802 __ mov(arg, scratch1); 5803 __ mov(arg, scratch1);
5803 __ str(arg, MemOperand(sp, stack_offset)); 5804 __ str(arg, MemOperand(sp, stack_offset));
5805 __ jmp(&done);
5806
5807 // Check if the argument is a safe string wrapper.
5808 __ bind(&not_cached);
5809 __ JumpIfSmi(arg, slow);
5810 __ CompareObjectType(
5811 arg, scratch1, scratch2, JS_VALUE_TYPE); // map -> scratch1.
5812 __ b(ne, slow);
5813 __ ldrb(scratch2, FieldMemOperand(scratch1, Map::kBitField2Offset));
5814 __ and_(scratch2,
5815 scratch2, Operand(1 << Map::kStringWrapperSafeForDefaultValueOf));
5816 __ cmp(scratch2,
5817 Operand(1 << Map::kStringWrapperSafeForDefaultValueOf));
5818 __ b(ne, slow);
5819 __ ldr(arg, FieldMemOperand(arg, JSValue::kValueOffset));
5820 __ str(arg, MemOperand(sp, stack_offset));
5821
5804 __ bind(&done); 5822 __ bind(&done);
5805 } 5823 }
5806 5824
5807 5825
5808 void ICCompareStub::GenerateSmis(MacroAssembler* masm) { 5826 void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
5809 ASSERT(state_ == CompareIC::SMI); 5827 ASSERT(state_ == CompareIC::SMI);
5810 Label miss; 5828 Label miss;
5811 __ orr(r2, r1, r0); 5829 __ orr(r2, r1, r0);
5812 __ JumpIfNotSmi(r2, &miss); 5830 __ JumpIfNotSmi(r2, &miss);
5813 5831
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
7114 __ bind(&fast_elements_case); 7132 __ bind(&fast_elements_case);
7115 GenerateCase(masm, FAST_ELEMENTS); 7133 GenerateCase(masm, FAST_ELEMENTS);
7116 } 7134 }
7117 7135
7118 7136
7119 #undef __ 7137 #undef __
7120 7138
7121 } } // namespace v8::internal 7139 } } // namespace v8::internal
7122 7140
7123 #endif // V8_TARGET_ARCH_ARM 7141 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698