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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 436001: Remove the different length string types... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 1 month 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/ic-arm.cc ('k') | src/heap.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 Label* miss) { 222 Label* miss) {
223 Label check_string, check_wrapper; 223 Label check_string, check_wrapper;
224 224
225 __ bind(&check_string); 225 __ bind(&check_string);
226 // Check if the object is a string leaving the instance type in the 226 // Check if the object is a string leaving the instance type in the
227 // scratch1 register. 227 // scratch1 register.
228 GenerateStringCheck(masm, receiver, scratch1, scratch2, 228 GenerateStringCheck(masm, receiver, scratch1, scratch2,
229 miss, &check_wrapper); 229 miss, &check_wrapper);
230 230
231 // Load length directly from the string. 231 // Load length directly from the string.
232 __ and_(scratch1, scratch1, Operand(kStringSizeMask));
233 __ add(scratch1, scratch1, Operand(String::kHashShift));
234 __ ldr(r0, FieldMemOperand(receiver, String::kLengthOffset)); 232 __ ldr(r0, FieldMemOperand(receiver, String::kLengthOffset));
235 __ mov(r0, Operand(r0, LSR, scratch1));
236 __ mov(r0, Operand(r0, LSL, kSmiTagSize)); 233 __ mov(r0, Operand(r0, LSL, kSmiTagSize));
237 __ Ret(); 234 __ Ret();
238 235
239 // Check if the object is a JSValue wrapper. 236 // Check if the object is a JSValue wrapper.
240 __ bind(&check_wrapper); 237 __ bind(&check_wrapper);
241 __ cmp(scratch1, Operand(JS_VALUE_TYPE)); 238 __ cmp(scratch1, Operand(JS_VALUE_TYPE));
242 __ b(ne, miss); 239 __ b(ne, miss);
243 240
244 // Unwrap the value in place and check if the wrapped value is a string. 241 // Unwrap the value in place and check if the wrapped value is a string.
245 __ ldr(receiver, FieldMemOperand(receiver, JSValue::kValueOffset)); 242 __ ldr(receiver, FieldMemOperand(receiver, JSValue::kValueOffset));
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); 1478 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
1482 1479
1483 // Return the generated code. 1480 // Return the generated code.
1484 return GetCode(); 1481 return GetCode();
1485 } 1482 }
1486 1483
1487 1484
1488 #undef __ 1485 #undef __
1489 1486
1490 } } // namespace v8::internal 1487 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698