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

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

Issue 67233002: Revert "Reland [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 | « src/ia32/ic-ia32.cc ('k') | src/objects.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 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 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 Register elements_map = t2; 1347 Register elements_map = t2;
1348 Register elements = t3; // Elements array of the receiver. 1348 Register elements = t3; // Elements array of the receiver.
1349 // t0 and t1 are used as general scratch registers. 1349 // t0 and t1 are used as general scratch registers.
1350 1350
1351 // Check that the key is a smi. 1351 // Check that the key is a smi.
1352 __ JumpIfNotSmi(key, &slow); 1352 __ JumpIfNotSmi(key, &slow);
1353 // Check that the object isn't a smi. 1353 // Check that the object isn't a smi.
1354 __ JumpIfSmi(receiver, &slow); 1354 __ JumpIfSmi(receiver, &slow);
1355 // Get the map of the object. 1355 // Get the map of the object.
1356 __ lw(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset)); 1356 __ lw(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset));
1357 // Check that the receiver does not require access checks and is not observed. 1357 // Check that the receiver does not require access checks. We need
1358 // The generic stub does not perform map checks or handle observed objects. 1358 // to do this because this generic stub does not perform map checks.
1359 __ lbu(t0, FieldMemOperand(receiver_map, Map::kBitFieldOffset)); 1359 __ lbu(t0, FieldMemOperand(receiver_map, Map::kBitFieldOffset));
1360 __ And(t0, t0, Operand(1 << Map::kIsAccessCheckNeeded | 1360 __ And(t0, t0, Operand(1 << Map::kIsAccessCheckNeeded));
1361 1 << Map::kIsObserved));
1362 __ Branch(&slow, ne, t0, Operand(zero_reg)); 1361 __ Branch(&slow, ne, t0, Operand(zero_reg));
1363 // Check if the object is a JS array or not. 1362 // Check if the object is a JS array or not.
1364 __ lbu(t0, FieldMemOperand(receiver_map, Map::kInstanceTypeOffset)); 1363 __ lbu(t0, FieldMemOperand(receiver_map, Map::kInstanceTypeOffset));
1365 __ Branch(&array, eq, t0, Operand(JS_ARRAY_TYPE)); 1364 __ Branch(&array, eq, t0, Operand(JS_ARRAY_TYPE));
1366 // Check that the object is some kind of JSObject. 1365 // Check that the object is some kind of JSObject.
1367 __ Branch(&slow, lt, t0, Operand(FIRST_JS_OBJECT_TYPE)); 1366 __ Branch(&slow, lt, t0, Operand(FIRST_JS_OBJECT_TYPE));
1368 1367
1369 // Object case: Check key against length in the elements array. 1368 // Object case: Check key against length in the elements array.
1370 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1369 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1371 // Check array bounds. Both the key and the length of FixedArray are smis. 1370 // Check array bounds. Both the key and the length of FixedArray are smis.
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 } else { 1689 } else {
1691 ASSERT(Assembler::IsBne(branch_instr)); 1690 ASSERT(Assembler::IsBne(branch_instr));
1692 patcher.ChangeBranchCondition(eq); 1691 patcher.ChangeBranchCondition(eq);
1693 } 1692 }
1694 } 1693 }
1695 1694
1696 1695
1697 } } // namespace v8::internal 1696 } } // namespace v8::internal
1698 1697
1699 #endif // V8_TARGET_ARCH_MIPS 1698 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698