| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index bafe74eec5e52c2c9bc3566963e354da497dd531..6239acb51531d1f39ecfd1e247315736e82c3e29 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2012 the V8 project authors. All rights reserved.
|
| +// Copyright 2011 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -3747,23 +3747,13 @@ void LCodeGen::DoCheckFunction(LCheckFunction* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoCheckMapCommon(Register reg,
|
| - Handle<Map> map,
|
| - CompareMapMode mode,
|
| - LEnvironment* env) {
|
| - Label success;
|
| - __ CompareMap(reg, map, &success, mode);
|
| - DeoptimizeIf(not_equal, env);
|
| - __ bind(&success);
|
| -}
|
| -
|
| -
|
| void LCodeGen::DoCheckMap(LCheckMap* instr) {
|
| LOperand* input = instr->InputAt(0);
|
| ASSERT(input->IsRegister());
|
| Register reg = ToRegister(input);
|
| - Handle<Map> map = instr->hydrogen()->map();
|
| - DoCheckMapCommon(reg, map, instr->hydrogen()->mode(), instr->environment());
|
| + __ Cmp(FieldOperand(reg, HeapObject::kMapOffset),
|
| + instr->hydrogen()->map());
|
| + DeoptimizeIf(not_equal, instr->environment());
|
| }
|
|
|
|
|
| @@ -3829,8 +3819,9 @@ void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
|
|
|
| // Check prototype maps up to the holder.
|
| while (!current_prototype.is_identical_to(holder)) {
|
| - DoCheckMapCommon(reg, Handle<Map>(current_prototype->map()),
|
| - ALLOW_ELEMENT_TRANSITION_MAPS, instr->environment());
|
| + __ Cmp(FieldOperand(reg, HeapObject::kMapOffset),
|
| + Handle<Map>(current_prototype->map()));
|
| + DeoptimizeIf(not_equal, instr->environment());
|
| current_prototype =
|
| Handle<JSObject>(JSObject::cast(current_prototype->GetPrototype()));
|
| // Load next prototype object.
|
| @@ -3838,8 +3829,9 @@ void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
|
| }
|
|
|
| // Check the holder map.
|
| - DoCheckMapCommon(reg, Handle<Map>(current_prototype->map()),
|
| - ALLOW_ELEMENT_TRANSITION_MAPS, instr->environment());
|
| + __ Cmp(FieldOperand(reg, HeapObject::kMapOffset),
|
| + Handle<Map>(current_prototype->map()));
|
| + DeoptimizeIf(not_equal, instr->environment());
|
| }
|
|
|
|
|
|
|