| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 // Check that the object isn't a smi. | 264 // Check that the object isn't a smi. |
| 265 __ JumpIfSmi(rcx, &slow); | 265 __ JumpIfSmi(rcx, &slow); |
| 266 | 266 |
| 267 // Check that the object is some kind of JS object EXCEPT JS Value type. | 267 // Check that the object is some kind of JS object EXCEPT JS Value type. |
| 268 // In the case that the object is a value-wrapper object, | 268 // In the case that the object is a value-wrapper object, |
| 269 // we enter the runtime system to make sure that indexing | 269 // we enter the runtime system to make sure that indexing |
| 270 // into string objects work as intended. | 270 // into string objects work as intended. |
| 271 ASSERT(JS_OBJECT_TYPE > JS_VALUE_TYPE); | 271 ASSERT(JS_OBJECT_TYPE > JS_VALUE_TYPE); |
| 272 __ CmpObjectType(rcx, JS_OBJECT_TYPE, rdx); | 272 __ CmpObjectType(rcx, JS_OBJECT_TYPE, rdx); |
| 273 __ j(below, &slow); | 273 __ j(below, &slow); |
| 274 // Check that the receiver does not require access checks. We need | 274 |
| 275 // to check this explicitly since this generic stub does not perform | 275 // Check bit field. |
| 276 // map checks. The map is already in rdx. | |
| 277 __ testb(FieldOperand(rdx, Map::kBitFieldOffset), | 276 __ testb(FieldOperand(rdx, Map::kBitFieldOffset), |
| 278 Immediate(1 << Map::kIsAccessCheckNeeded)); | 277 Immediate(kSlowCaseBitFieldMask)); |
| 279 __ j(not_zero, &slow); | 278 __ j(not_zero, &slow); |
| 280 | 279 |
| 281 // Check that the key is a smi. | 280 // Check that the key is a smi. |
| 282 __ JumpIfNotSmi(rax, &check_string); | 281 __ JumpIfNotSmi(rax, &check_string); |
| 283 __ SmiToInteger32(rax, rax); | 282 __ SmiToInteger32(rax, rax); |
| 284 // Get the elements array of the object. | 283 // Get the elements array of the object. |
| 285 __ bind(&index_int); | 284 __ bind(&index_int); |
| 286 __ movq(rcx, FieldOperand(rcx, JSObject::kElementsOffset)); | 285 __ movq(rcx, FieldOperand(rcx, JSObject::kElementsOffset)); |
| 287 // Check that the object is in fast mode (not dictionary). | 286 // Check that the object is in fast mode (not dictionary). |
| 288 __ CompareRoot(FieldOperand(rcx, HeapObject::kMapOffset), | 287 __ CompareRoot(FieldOperand(rcx, HeapObject::kMapOffset), |
| (...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1384 | 1383 |
| 1385 // Cache miss: Jump to runtime. | 1384 // Cache miss: Jump to runtime. |
| 1386 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); | 1385 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); |
| 1387 } | 1386 } |
| 1388 | 1387 |
| 1389 | 1388 |
| 1390 #undef __ | 1389 #undef __ |
| 1391 | 1390 |
| 1392 | 1391 |
| 1393 } } // namespace v8::internal | 1392 } } // namespace v8::internal |
| OLD | NEW |