OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 ASSERT(Code::GetKeyedAccessStoreMode(code->extra_ic_state()) == store_mode); | 260 ASSERT(Code::GetKeyedAccessStoreMode(code->extra_ic_state()) == store_mode); |
261 return code; | 261 return code; |
262 } | 262 } |
263 | 263 |
264 | 264 |
265 Handle<Code> StubCache::ComputeStoreGlobal(Handle<Name> name, | 265 Handle<Code> StubCache::ComputeStoreGlobal(Handle<Name> name, |
266 Handle<GlobalObject> receiver, | 266 Handle<GlobalObject> receiver, |
267 Handle<PropertyCell> cell, | 267 Handle<PropertyCell> cell, |
268 Handle<Object> value, | 268 Handle<Object> value, |
269 StrictModeFlag strict_mode) { | 269 StrictModeFlag strict_mode) { |
270 Isolate* isolate = cell->GetIsolate(); | 270 Handle<Type> union_type = PropertyCell::UpdatedType(cell, value); |
271 Handle<Type> union_type(PropertyCell::UpdatedType(cell, value), isolate); | |
272 bool is_constant = union_type->IsConstant(); | 271 bool is_constant = union_type->IsConstant(); |
273 StoreGlobalStub stub(strict_mode, is_constant); | 272 StoreGlobalStub stub(strict_mode, is_constant); |
274 | 273 |
275 Handle<Code> code = FindIC( | 274 Handle<Code> code = FindIC( |
276 name, Handle<JSObject>::cast(receiver), | 275 name, Handle<JSObject>::cast(receiver), |
277 Code::STORE_IC, stub.GetExtraICState()); | 276 Code::STORE_IC, stub.GetExtraICState()); |
278 if (!code.is_null()) return code; | 277 if (!code.is_null()) return code; |
279 | 278 |
280 // Replace the placeholder cell and global object map with the actual global | 279 // Replace the placeholder cell and global object map with the actual global |
281 // cell and receiver map. | 280 // cell and receiver map. |
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1818 Handle<FunctionTemplateInfo>( | 1817 Handle<FunctionTemplateInfo>( |
1819 FunctionTemplateInfo::cast(signature->receiver())); | 1818 FunctionTemplateInfo::cast(signature->receiver())); |
1820 } | 1819 } |
1821 } | 1820 } |
1822 | 1821 |
1823 is_simple_api_call_ = true; | 1822 is_simple_api_call_ = true; |
1824 } | 1823 } |
1825 | 1824 |
1826 | 1825 |
1827 } } // namespace v8::internal | 1826 } } // namespace v8::internal |
OLD | NEW |