| Index: src/x64/macro-assembler-x64.cc
|
| diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
|
| index 075f07cc353e991fd7969a49725599cb5fcfd45b..d98c7199a15db43d1d969885a0aa94d93f27d794 100644
|
| --- a/src/x64/macro-assembler-x64.cc
|
| +++ b/src/x64/macro-assembler-x64.cc
|
| @@ -37,6 +37,7 @@
|
| #include "serialize.h"
|
| #include "debug.h"
|
| #include "heap.h"
|
| +#include "isolate-inl.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -3659,7 +3660,7 @@ void MacroAssembler::Prologue(PrologueFrameMode frame_mode) {
|
| } else {
|
| PredictableCodeSizeScope predictible_code_size_scope(this,
|
| kNoCodeAgeSequenceLength);
|
| - if (FLAG_optimize_for_size && FLAG_age_code) {
|
| + if (isolate()->IsCodePreAgingActive()) {
|
| // Pre-age the code.
|
| Call(isolate()->builtins()->MarkCodeAsExecutedOnce(),
|
| RelocInfo::CODE_AGE_SEQUENCE);
|
| @@ -4968,6 +4969,32 @@ void MacroAssembler::RecordObjectAllocation(Isolate* isolate,
|
| }
|
|
|
|
|
| +void MacroAssembler::JumpIfDictionaryInPrototypeChain(
|
| + Register object,
|
| + Register scratch0,
|
| + Register scratch1,
|
| + Label* found) {
|
| + ASSERT(!(scratch0.is(kScratchRegister) && scratch1.is(kScratchRegister)));
|
| + ASSERT(!scratch1.is(scratch0));
|
| + Register current = scratch0;
|
| + Label loop_again;
|
| +
|
| + movq(current, object);
|
| +
|
| + // Loop based on the map going up the prototype chain.
|
| + bind(&loop_again);
|
| + movq(current, FieldOperand(current, HeapObject::kMapOffset));
|
| + movq(scratch1, FieldOperand(current, Map::kBitField2Offset));
|
| + and_(scratch1, Immediate(Map::kElementsKindMask));
|
| + shr(scratch1, Immediate(Map::kElementsKindShift));
|
| + cmpq(scratch1, Immediate(DICTIONARY_ELEMENTS));
|
| + j(equal, found);
|
| + movq(current, FieldOperand(current, Map::kPrototypeOffset));
|
| + CompareRoot(current, Heap::kNullValueRootIndex);
|
| + j(not_equal, &loop_again);
|
| +}
|
| +
|
| +
|
| } } // namespace v8::internal
|
|
|
| #endif // V8_TARGET_ARCH_X64
|
|
|