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

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

Issue 22891028: 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 | « src/ia32/full-codegen-ia32.cc ('k') | src/mips/full-codegen-mips.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 6164 matching lines...) Expand 10 before | Expand all | Expand 10 after
6175 Register scratch3, 6175 Register scratch3,
6176 Register scratch4, 6176 Register scratch4,
6177 Label* slow) { 6177 Label* slow) {
6178 // First check if the argument is already a string. 6178 // First check if the argument is already a string.
6179 Label not_string, done; 6179 Label not_string, done;
6180 __ JumpIfSmi(arg, &not_string); 6180 __ JumpIfSmi(arg, &not_string);
6181 __ GetObjectType(arg, scratch1, scratch1); 6181 __ GetObjectType(arg, scratch1, scratch1);
6182 __ Branch(&done, lt, scratch1, Operand(FIRST_NONSTRING_TYPE)); 6182 __ Branch(&done, lt, scratch1, Operand(FIRST_NONSTRING_TYPE));
6183 6183
6184 // Check the number to string cache. 6184 // Check the number to string cache.
6185 Label not_cached;
6186 __ bind(&not_string); 6185 __ bind(&not_string);
6187 // Puts the cached result into scratch1. 6186 // Puts the cached result into scratch1.
6188 NumberToStringStub::GenerateLookupNumberStringCache(masm, 6187 NumberToStringStub::GenerateLookupNumberStringCache(masm,
6189 arg, 6188 arg,
6190 scratch1, 6189 scratch1,
6191 scratch2, 6190 scratch2,
6192 scratch3, 6191 scratch3,
6193 scratch4, 6192 scratch4,
6194 &not_cached); 6193 slow);
6195 __ mov(arg, scratch1); 6194 __ mov(arg, scratch1);
6196 __ sw(arg, MemOperand(sp, stack_offset)); 6195 __ sw(arg, MemOperand(sp, stack_offset));
6197 __ jmp(&done);
6198
6199 // Check if the argument is a safe string wrapper.
6200 __ bind(&not_cached);
6201 __ JumpIfSmi(arg, slow);
6202 __ GetObjectType(arg, scratch1, scratch2); // map -> scratch1.
6203 __ Branch(slow, ne, scratch2, Operand(JS_VALUE_TYPE));
6204 __ lbu(scratch2, FieldMemOperand(scratch1, Map::kBitField2Offset));
6205 __ li(scratch4, 1 << Map::kStringWrapperSafeForDefaultValueOf);
6206 __ And(scratch2, scratch2, scratch4);
6207 __ Branch(slow, ne, scratch2, Operand(scratch4));
6208 __ lw(arg, FieldMemOperand(arg, JSValue::kValueOffset));
6209 __ sw(arg, MemOperand(sp, stack_offset));
6210
6211 __ bind(&done); 6196 __ bind(&done);
6212 } 6197 }
6213 6198
6214 6199
6215 void ICCompareStub::GenerateSmis(MacroAssembler* masm) { 6200 void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
6216 ASSERT(state_ == CompareIC::SMI); 6201 ASSERT(state_ == CompareIC::SMI);
6217 Label miss; 6202 Label miss;
6218 __ Or(a2, a1, a0); 6203 __ Or(a2, a1, a0);
6219 __ JumpIfNotSmi(a2, &miss); 6204 __ JumpIfNotSmi(a2, &miss);
6220 6205
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
7579 __ bind(&fast_elements_case); 7564 __ bind(&fast_elements_case);
7580 GenerateCase(masm, FAST_ELEMENTS); 7565 GenerateCase(masm, FAST_ELEMENTS);
7581 } 7566 }
7582 7567
7583 7568
7584 #undef __ 7569 #undef __
7585 7570
7586 } } // namespace v8::internal 7571 } } // namespace v8::internal
7587 7572
7588 #endif // V8_TARGET_ARCH_MIPS 7573 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698