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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 35413006: Correct handling of arrays with callbacks in the prototype chain. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Bugfix: check on dictionary elements was incorrect. Added test. Re-enabled test. 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/x64/macro-assembler-x64.h ('k') | test/mjsunit/allocation-site-info.js » ('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 4951 matching lines...) Expand 10 before | Expand all | Expand 10 after
4962 PrepareCallCFunction(3); 4962 PrepareCallCFunction(3);
4963 movq(arg_reg_2, object); 4963 movq(arg_reg_2, object);
4964 movq(arg_reg_3, Immediate(object_size)); 4964 movq(arg_reg_3, Immediate(object_size));
4965 movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE); 4965 movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE);
4966 CallCFunction( 4966 CallCFunction(
4967 ExternalReference::record_object_allocation_function(isolate), 3); 4967 ExternalReference::record_object_allocation_function(isolate), 3);
4968 PopSafepointRegisters(); 4968 PopSafepointRegisters();
4969 } 4969 }
4970 4970
4971 4971
4972 void MacroAssembler::JumpIfDictionaryInPrototypeChain(
4973 Register object,
4974 Register scratch0,
4975 Register scratch1,
4976 Label* found) {
4977 ASSERT(!(scratch0.is(kScratchRegister) && scratch1.is(kScratchRegister)));
4978 ASSERT(!scratch1.is(scratch0));
4979 Register current = scratch0;
4980 Label loop_again;
4981
4982 movq(current, object);
4983
4984 // Loop based on the map going up the prototype chain.
4985 bind(&loop_again);
4986 movq(current, FieldOperand(current, HeapObject::kMapOffset));
4987 movq(scratch1, FieldOperand(current, Map::kBitField2Offset));
4988 and_(scratch1, Immediate(Map::kElementsKindMask));
4989 shr(scratch1, Immediate(Map::kElementsKindShift));
4990 cmpq(scratch1, Immediate(DICTIONARY_ELEMENTS));
4991 j(equal, found);
4992 movq(current, FieldOperand(current, Map::kPrototypeOffset));
4993 CompareRoot(current, Heap::kNullValueRootIndex);
4994 j(not_equal, &loop_again);
4995 }
4996
4997
4972 } } // namespace v8::internal 4998 } } // namespace v8::internal
4973 4999
4974 #endif // V8_TARGET_ARCH_X64 5000 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/mjsunit/allocation-site-info.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698