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

Side by Side Diff: src/arm/ic-arm.cc

Issue 68343016: [Object.observe] Don't force normalization of elements for observed objects (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | src/arm/stub-cache-arm.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 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 Register elements_map = r6; 1425 Register elements_map = r6;
1426 Register elements = r9; // Elements array of the receiver. 1426 Register elements = r9; // Elements array of the receiver.
1427 // r4 and r5 are used as general scratch registers. 1427 // r4 and r5 are used as general scratch registers.
1428 1428
1429 // Check that the key is a smi. 1429 // Check that the key is a smi.
1430 __ JumpIfNotSmi(key, &slow); 1430 __ JumpIfNotSmi(key, &slow);
1431 // Check that the object isn't a smi. 1431 // Check that the object isn't a smi.
1432 __ JumpIfSmi(receiver, &slow); 1432 __ JumpIfSmi(receiver, &slow);
1433 // Get the map of the object. 1433 // Get the map of the object.
1434 __ ldr(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset)); 1434 __ ldr(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset));
1435 // Check that the receiver does not require access checks. We need 1435 // Check that the receiver does not require access checks and is not observed.
1436 // to do this because this generic stub does not perform map checks. 1436 // The generic stub does not perform map checks or handle observed objects.
1437 __ ldrb(ip, FieldMemOperand(receiver_map, Map::kBitFieldOffset)); 1437 __ ldrb(ip, FieldMemOperand(receiver_map, Map::kBitFieldOffset));
1438 __ tst(ip, Operand(1 << Map::kIsAccessCheckNeeded)); 1438 __ tst(ip, Operand(1 << Map::kIsAccessCheckNeeded | 1 << Map::kIsObserved));
1439 __ b(ne, &slow); 1439 __ b(ne, &slow);
1440 // Check if the object is a JS array or not. 1440 // Check if the object is a JS array or not.
1441 __ ldrb(r4, FieldMemOperand(receiver_map, Map::kInstanceTypeOffset)); 1441 __ ldrb(r4, FieldMemOperand(receiver_map, Map::kInstanceTypeOffset));
1442 __ cmp(r4, Operand(JS_ARRAY_TYPE)); 1442 __ cmp(r4, Operand(JS_ARRAY_TYPE));
1443 __ b(eq, &array); 1443 __ b(eq, &array);
1444 // Check that the object is some kind of JSObject. 1444 // Check that the object is some kind of JSObject.
1445 __ cmp(r4, Operand(FIRST_JS_OBJECT_TYPE)); 1445 __ cmp(r4, Operand(FIRST_JS_OBJECT_TYPE));
1446 __ b(lt, &slow); 1446 __ b(lt, &slow);
1447 1447
1448 // Object case: Check key against length in the elements array. 1448 // Object case: Check key against length in the elements array.
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 } else { 1682 } else {
1683 ASSERT(Assembler::GetCondition(branch_instr) == ne); 1683 ASSERT(Assembler::GetCondition(branch_instr) == ne);
1684 patcher.EmitCondition(eq); 1684 patcher.EmitCondition(eq);
1685 } 1685 }
1686 } 1686 }
1687 1687
1688 1688
1689 } } // namespace v8::internal 1689 } } // namespace v8::internal
1690 1690
1691 #endif // V8_TARGET_ARCH_ARM 1691 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698