| Index: src/ia32/stub-cache-ia32.cc
|
| diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
|
| index c27a60fd06573ae7fc91c30fd343886f3772d453..ca8883640f8cbe85f49b2fc344ebab25e1a7d1b9 100644
|
| --- a/src/ia32/stub-cache-ia32.cc
|
| +++ b/src/ia32/stub-cache-ia32.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2011 the V8 project authors. All rights reserved.
|
| +// Copyright 2012 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:
|
| @@ -695,13 +695,9 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
|
| Register name_reg,
|
| Register scratch,
|
| Label* miss_label) {
|
| - // Check that the object isn't a smi.
|
| - __ JumpIfSmi(receiver_reg, miss_label);
|
| -
|
| // Check that the map of the object hasn't changed.
|
| - __ cmp(FieldOperand(receiver_reg, HeapObject::kMapOffset),
|
| - Immediate(Handle<Map>(object->map())));
|
| - __ j(not_equal, miss_label);
|
| + __ CheckMap(receiver_reg, Handle<Map>(object->map()),
|
| + miss_label, DO_SMI_CHECK, ALLOW_ELEMENT_TRANSITION_MAPS);
|
|
|
| // Perform global security token check if needed.
|
| if (object->IsJSGlobalProxy()) {
|
| @@ -878,13 +874,10 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object,
|
| if (in_new_space) {
|
| // Save the map in scratch1 for later.
|
| __ mov(scratch1, FieldOperand(reg, HeapObject::kMapOffset));
|
| - __ cmp(scratch1, Immediate(current_map));
|
| - } else {
|
| - __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
|
| - Immediate(current_map));
|
| }
|
| - // Branch on the result of the map check.
|
| - __ j(not_equal, miss);
|
| + __ CheckMap(reg, current_map, miss, DONT_DO_SMI_CHECK,
|
| + ALLOW_ELEMENT_TRANSITION_MAPS);
|
| +
|
| // Check access rights to the global object. This has to happen after
|
| // the map check so that we know that the object is actually a global
|
| // object.
|
| @@ -916,9 +909,8 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object,
|
| LOG(isolate(), IntEvent("check-maps-depth", depth + 1));
|
|
|
| // Check the holder map.
|
| - __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
|
| - Immediate(Handle<Map>(holder->map())));
|
| - __ j(not_equal, miss);
|
| + __ CheckMap(reg, Handle<Map>(holder->map()),
|
| + miss, DONT_DO_SMI_CHECK, ALLOW_ELEMENT_TRANSITION_MAPS);
|
|
|
| // Perform security check for access to the global object.
|
| ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded());
|
| @@ -2403,13 +2395,9 @@ Handle<Code> StoreStubCompiler::CompileStoreCallback(
|
| // -----------------------------------
|
| Label miss;
|
|
|
| - // Check that the object isn't a smi.
|
| - __ JumpIfSmi(edx, &miss);
|
| -
|
| // Check that the map of the object hasn't changed.
|
| - __ cmp(FieldOperand(edx, HeapObject::kMapOffset),
|
| - Immediate(Handle<Map>(object->map())));
|
| - __ j(not_equal, &miss);
|
| + __ CheckMap(edx, Handle<Map>(object->map()),
|
| + &miss, DO_SMI_CHECK, ALLOW_ELEMENT_TRANSITION_MAPS);
|
|
|
| // Perform global security token check if needed.
|
| if (object->IsJSGlobalProxy()) {
|
| @@ -2453,13 +2441,9 @@ Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
|
| // -----------------------------------
|
| Label miss;
|
|
|
| - // Check that the object isn't a smi.
|
| - __ JumpIfSmi(edx, &miss);
|
| -
|
| // Check that the map of the object hasn't changed.
|
| - __ cmp(FieldOperand(edx, HeapObject::kMapOffset),
|
| - Immediate(Handle<Map>(receiver->map())));
|
| - __ j(not_equal, &miss);
|
| + __ CheckMap(edx, Handle<Map>(receiver->map()),
|
| + &miss, DO_SMI_CHECK, ALLOW_ELEMENT_TRANSITION_MAPS);
|
|
|
| // Perform global security token check if needed.
|
| if (receiver->IsJSGlobalProxy()) {
|
|
|