OLD | NEW |
---|---|
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 4948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4959 FrameScope frame(this, StackFrame::EXIT); | 4959 FrameScope frame(this, StackFrame::EXIT); |
4960 PushSafepointRegisters(); | 4960 PushSafepointRegisters(); |
4961 PrepareCallCFunction(3); | 4961 PrepareCallCFunction(3); |
4962 movq(arg_reg_2, object); | 4962 movq(arg_reg_2, object); |
4963 movq(arg_reg_3, Immediate(object_size)); | 4963 movq(arg_reg_3, Immediate(object_size)); |
4964 movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE); | 4964 movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE); |
4965 CallCFunction( | 4965 CallCFunction( |
4966 ExternalReference::record_object_allocation_function(isolate), 3); | 4966 ExternalReference::record_object_allocation_function(isolate), 3); |
4967 PopSafepointRegisters(); | 4967 PopSafepointRegisters(); |
4968 } | 4968 } |
4969 | 4969 |
danno
2013/11/04 17:44:44
nit: two lines between functions
mvstanton
2013/11/05 09:06:51
Done.
| |
4970 void MacroAssembler::JumpIfDictionaryInPrototypeChain( | |
4971 Register object, | |
4972 Register scratch0, | |
4973 Register scratch1, | |
4974 Label* found) { | |
4975 ASSERT(!(scratch0.is(kScratchRegister) && scratch1.is(kScratchRegister))); | |
4976 ASSERT(!scratch1.is(scratch0)); | |
4977 Register current = scratch0; | |
4978 Label loop_again; | |
4979 | |
4980 movq(current, object); | |
4981 | |
4982 // Loop based on the map going up the prototype chain. | |
4983 bind(&loop_again); | |
4984 movq(current, FieldOperand(current, HeapObject::kMapOffset)); | |
4985 movq(scratch1, FieldOperand(current, Map::kBitField2Offset)); | |
4986 and_(scratch1, Immediate(Map::kElementsKindMask)); | |
4987 shr(scratch1, Immediate(Map::kElementsKindShift)); | |
4988 cmpq(scratch1, Immediate(DICTIONARY_ELEMENTS)); | |
4989 j(equal, found); | |
4990 movq(current, FieldOperand(current, Map::kPrototypeOffset)); | |
4991 CompareRoot(current, Heap::kNullValueRootIndex); | |
4992 j(not_equal, &loop_again); | |
4993 } | |
4994 | |
4970 | 4995 |
4971 } } // namespace v8::internal | 4996 } } // namespace v8::internal |
4972 | 4997 |
4973 #endif // V8_TARGET_ARCH_X64 | 4998 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |