| Index: src/code-stubs-hydrogen.cc
|
| diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
|
| index 020514e08df1a225a231f6c82186be4d6f2324a2..c0e66bc0544550e83c45efb0d62285036e25e44a 100644
|
| --- a/src/code-stubs-hydrogen.cc
|
| +++ b/src/code-stubs-hydrogen.cc
|
| @@ -1030,13 +1030,16 @@ HValue* CodeStubGraphBuilder<StoreGlobalStub>::BuildCodeInitializedStub() {
|
| Handle<PropertyCell> placeholder_cell =
|
| isolate()->factory()->NewPropertyCell(placeholer_value);
|
|
|
| - HParameter* receiver = GetParameter(0);
|
| HParameter* value = GetParameter(2);
|
|
|
| - // Check that the map of the global has not changed: use a placeholder map
|
| - // that will be replaced later with the global object's map.
|
| - Handle<Map> placeholder_map = isolate()->factory()->meta_map();
|
| - Add<HCheckMaps>(receiver, placeholder_map, top_info());
|
| + if (stub->check_global()) {
|
| + // Check that the map of the global has not changed: use a placeholder map
|
| + // that will be replaced later with the global object's map.
|
| + Handle<Map> placeholder_map = isolate()->factory()->meta_map();
|
| + HValue* global = Add<HConstant>(
|
| + StoreGlobalStub::global_placeholder(isolate()));
|
| + Add<HCheckMaps>(global, placeholder_map, top_info());
|
| + }
|
|
|
| HValue* cell = Add<HConstant>(placeholder_cell);
|
| HObjectAccess access(HObjectAccess::ForCellPayload(isolate()));
|
|
|