| OLD | NEW |
| 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 5897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5908 Register scratch3, | 5908 Register scratch3, |
| 5909 Register scratch4, | 5909 Register scratch4, |
| 5910 Label* slow) { | 5910 Label* slow) { |
| 5911 // First check if the argument is already a string. | 5911 // First check if the argument is already a string. |
| 5912 Label not_string, done; | 5912 Label not_string, done; |
| 5913 __ JumpIfSmi(arg, ¬_string); | 5913 __ JumpIfSmi(arg, ¬_string); |
| 5914 __ CompareObjectType(arg, scratch1, scratch1, FIRST_NONSTRING_TYPE); | 5914 __ CompareObjectType(arg, scratch1, scratch1, FIRST_NONSTRING_TYPE); |
| 5915 __ b(lt, &done); | 5915 __ b(lt, &done); |
| 5916 | 5916 |
| 5917 // Check the number to string cache. | 5917 // Check the number to string cache. |
| 5918 Label not_cached; | |
| 5919 __ bind(¬_string); | 5918 __ bind(¬_string); |
| 5920 // Puts the cached result into scratch1. | 5919 // Puts the cached result into scratch1. |
| 5921 NumberToStringStub::GenerateLookupNumberStringCache(masm, | 5920 NumberToStringStub::GenerateLookupNumberStringCache(masm, |
| 5922 arg, | 5921 arg, |
| 5923 scratch1, | 5922 scratch1, |
| 5924 scratch2, | 5923 scratch2, |
| 5925 scratch3, | 5924 scratch3, |
| 5926 scratch4, | 5925 scratch4, |
| 5927 ¬_cached); | 5926 slow); |
| 5928 __ mov(arg, scratch1); | 5927 __ mov(arg, scratch1); |
| 5929 __ str(arg, MemOperand(sp, stack_offset)); | 5928 __ str(arg, MemOperand(sp, stack_offset)); |
| 5930 __ jmp(&done); | |
| 5931 | |
| 5932 // Check if the argument is a safe string wrapper. | |
| 5933 __ bind(¬_cached); | |
| 5934 __ JumpIfSmi(arg, slow); | |
| 5935 __ CompareObjectType( | |
| 5936 arg, scratch1, scratch2, JS_VALUE_TYPE); // map -> scratch1. | |
| 5937 __ b(ne, slow); | |
| 5938 __ ldrb(scratch2, FieldMemOperand(scratch1, Map::kBitField2Offset)); | |
| 5939 __ and_(scratch2, | |
| 5940 scratch2, Operand(1 << Map::kStringWrapperSafeForDefaultValueOf)); | |
| 5941 __ cmp(scratch2, | |
| 5942 Operand(1 << Map::kStringWrapperSafeForDefaultValueOf)); | |
| 5943 __ b(ne, slow); | |
| 5944 __ ldr(arg, FieldMemOperand(arg, JSValue::kValueOffset)); | |
| 5945 __ str(arg, MemOperand(sp, stack_offset)); | |
| 5946 | |
| 5947 __ bind(&done); | 5929 __ bind(&done); |
| 5948 } | 5930 } |
| 5949 | 5931 |
| 5950 | 5932 |
| 5951 void ICCompareStub::GenerateSmis(MacroAssembler* masm) { | 5933 void ICCompareStub::GenerateSmis(MacroAssembler* masm) { |
| 5952 ASSERT(state_ == CompareIC::SMI); | 5934 ASSERT(state_ == CompareIC::SMI); |
| 5953 Label miss; | 5935 Label miss; |
| 5954 __ orr(r2, r1, r0); | 5936 __ orr(r2, r1, r0); |
| 5955 __ JumpIfNotSmi(r2, &miss); | 5937 __ JumpIfNotSmi(r2, &miss); |
| 5956 | 5938 |
| (...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7263 __ bind(&fast_elements_case); | 7245 __ bind(&fast_elements_case); |
| 7264 GenerateCase(masm, FAST_ELEMENTS); | 7246 GenerateCase(masm, FAST_ELEMENTS); |
| 7265 } | 7247 } |
| 7266 | 7248 |
| 7267 | 7249 |
| 7268 #undef __ | 7250 #undef __ |
| 7269 | 7251 |
| 7270 } } // namespace v8::internal | 7252 } } // namespace v8::internal |
| 7271 | 7253 |
| 7272 #endif // V8_TARGET_ARCH_ARM | 7254 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |