Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index 79043d5e0f6a0a956d08fe1dbdf0d74dcdf20b98..3ac51e7358e133b89e14b14b1b9df41c973ceb6f 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -963,27 +963,19 @@ class LoadFieldStub: public HandlerStub { |
class StoreGlobalStub : public HandlerStub { |
public: |
- explicit StoreGlobalStub(bool is_constant, bool check_global) { |
- bit_field_ = IsConstantBits::encode(is_constant) | |
- CheckGlobalBits::encode(check_global); |
- } |
- |
- static Handle<HeapObject> global_placeholder(Isolate* isolate) { |
- return isolate->factory()->uninitialized_value(); |
+ explicit StoreGlobalStub(bool is_constant) { |
+ bit_field_ = IsConstantBits::encode(is_constant); |
} |
Handle<Code> GetCodeCopyFromTemplate(Isolate* isolate, |
- GlobalObject* global, |
+ Map* receiver_map, |
PropertyCell* cell) { |
Handle<Code> code = CodeStub::GetCodeCopyFromTemplate(isolate); |
- if (check_global()) { |
- // Replace the placeholder cell and global object map with the actual |
- // global cell and receiver map. |
- code->ReplaceNthObject(1, global_placeholder(isolate)->map(), global); |
- code->ReplaceNthObject(1, isolate->heap()->meta_map(), global->map()); |
- } |
+ // Replace the placeholder cell and global object map with the actual global |
+ // cell and receiver map. |
Map* cell_map = isolate->heap()->global_property_cell_map(); |
code->ReplaceNthObject(1, cell_map, cell); |
+ code->ReplaceNthObject(1, isolate->heap()->meta_map(), receiver_map); |
return code; |
} |
@@ -995,12 +987,9 @@ class StoreGlobalStub : public HandlerStub { |
Isolate* isolate, |
CodeStubInterfaceDescriptor* descriptor); |
- bool is_constant() const { |
+ bool is_constant() { |
return IsConstantBits::decode(bit_field_); |
} |
- bool check_global() const { |
- return CheckGlobalBits::decode(bit_field_); |
- } |
void set_is_constant(bool value) { |
bit_field_ = IsConstantBits::update(bit_field_, value); |
} |
@@ -1017,7 +1006,6 @@ class StoreGlobalStub : public HandlerStub { |
class IsConstantBits: public BitField<bool, 0, 1> {}; |
class RepresentationBits: public BitField<Representation::Kind, 1, 8> {}; |
- class CheckGlobalBits: public BitField<bool, 9, 1> {}; |
DISALLOW_COPY_AND_ASSIGN(StoreGlobalStub); |
}; |