| OLD | NEW |
| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 Register receiver, | 266 Register receiver, |
| 267 Register scratch, | 267 Register scratch, |
| 268 Label* smi, | 268 Label* smi, |
| 269 Label* non_string_object) { | 269 Label* non_string_object) { |
| 270 // Check that the object isn't a smi. | 270 // Check that the object isn't a smi. |
| 271 __ JumpIfSmi(receiver, smi); | 271 __ JumpIfSmi(receiver, smi); |
| 272 | 272 |
| 273 // Check that the object is a string. | 273 // Check that the object is a string. |
| 274 __ mov(scratch, FieldOperand(receiver, HeapObject::kMapOffset)); | 274 __ mov(scratch, FieldOperand(receiver, HeapObject::kMapOffset)); |
| 275 __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset)); | 275 __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset)); |
| 276 ASSERT(kNotStringTag != 0); | 276 STATIC_ASSERT(kNotStringTag != 0); |
| 277 __ test(scratch, Immediate(kNotStringTag)); | 277 __ test(scratch, Immediate(kNotStringTag)); |
| 278 __ j(not_zero, non_string_object); | 278 __ j(not_zero, non_string_object); |
| 279 } | 279 } |
| 280 | 280 |
| 281 | 281 |
| 282 void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm, | 282 void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm, |
| 283 Register receiver, | 283 Register receiver, |
| 284 Register scratch1, | 284 Register scratch1, |
| 285 Register scratch2, | 285 Register scratch2, |
| 286 Label* miss, | 286 Label* miss, |
| (...skipping 3692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3979 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 3979 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
| 3980 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); | 3980 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); |
| 3981 } | 3981 } |
| 3982 | 3982 |
| 3983 | 3983 |
| 3984 #undef __ | 3984 #undef __ |
| 3985 | 3985 |
| 3986 } } // namespace v8::internal | 3986 } } // namespace v8::internal |
| 3987 | 3987 |
| 3988 #endif // V8_TARGET_ARCH_IA32 | 3988 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |