| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 314 |
| 315 Handle<Code> StubCache::ComputeLoadNormal(Handle<Name> name, | 315 Handle<Code> StubCache::ComputeLoadNormal(Handle<Name> name, |
| 316 Handle<JSObject> receiver) { | 316 Handle<JSObject> receiver) { |
| 317 return isolate_->builtins()->LoadIC_Normal(); | 317 return isolate_->builtins()->LoadIC_Normal(); |
| 318 } | 318 } |
| 319 | 319 |
| 320 | 320 |
| 321 Handle<Code> StubCache::ComputeLoadGlobal(Handle<Name> name, | 321 Handle<Code> StubCache::ComputeLoadGlobal(Handle<Name> name, |
| 322 Handle<JSObject> receiver, | 322 Handle<JSObject> receiver, |
| 323 Handle<GlobalObject> holder, | 323 Handle<GlobalObject> holder, |
| 324 Handle<JSGlobalPropertyCell> cell, | 324 Handle<PropertyCell> cell, |
| 325 bool is_dont_delete) { | 325 bool is_dont_delete) { |
| 326 Handle<JSObject> stub_holder = StubHolder(receiver, holder); | 326 Handle<JSObject> stub_holder = StubHolder(receiver, holder); |
| 327 Handle<Code> stub = FindIC(name, stub_holder, Code::LOAD_IC, Code::NORMAL); | 327 Handle<Code> stub = FindIC(name, stub_holder, Code::LOAD_IC, Code::NORMAL); |
| 328 if (!stub.is_null()) return stub; | 328 if (!stub.is_null()) return stub; |
| 329 | 329 |
| 330 LoadStubCompiler compiler(isolate_); | 330 LoadStubCompiler compiler(isolate_); |
| 331 Handle<Code> ic = | 331 Handle<Code> ic = |
| 332 compiler.CompileLoadGlobal(receiver, holder, cell, name, is_dont_delete); | 332 compiler.CompileLoadGlobal(receiver, holder, cell, name, is_dont_delete); |
| 333 JSObject::UpdateMapCodeCache(stub_holder, name, ic); | 333 JSObject::UpdateMapCodeCache(stub_holder, name, ic); |
| 334 return ic; | 334 return ic; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 | 490 |
| 491 Handle<Code> StubCache::ComputeStoreNormal(StrictModeFlag strict_mode) { | 491 Handle<Code> StubCache::ComputeStoreNormal(StrictModeFlag strict_mode) { |
| 492 return (strict_mode == kStrictMode) | 492 return (strict_mode == kStrictMode) |
| 493 ? isolate_->builtins()->Builtins::StoreIC_Normal_Strict() | 493 ? isolate_->builtins()->Builtins::StoreIC_Normal_Strict() |
| 494 : isolate_->builtins()->Builtins::StoreIC_Normal(); | 494 : isolate_->builtins()->Builtins::StoreIC_Normal(); |
| 495 } | 495 } |
| 496 | 496 |
| 497 | 497 |
| 498 Handle<Code> StubCache::ComputeStoreGlobal(Handle<Name> name, | 498 Handle<Code> StubCache::ComputeStoreGlobal(Handle<Name> name, |
| 499 Handle<GlobalObject> receiver, | 499 Handle<GlobalObject> receiver, |
| 500 Handle<JSGlobalPropertyCell> cell, | 500 Handle<PropertyCell> cell, |
| 501 StrictModeFlag strict_mode) { | 501 StrictModeFlag strict_mode) { |
| 502 Handle<Code> stub = FindIC( | 502 Handle<Code> stub = FindIC( |
| 503 name, Handle<JSObject>::cast(receiver), | 503 name, Handle<JSObject>::cast(receiver), |
| 504 Code::STORE_IC, Code::NORMAL, strict_mode); | 504 Code::STORE_IC, Code::NORMAL, strict_mode); |
| 505 if (!stub.is_null()) return stub; | 505 if (!stub.is_null()) return stub; |
| 506 | 506 |
| 507 StoreStubCompiler compiler(isolate_, strict_mode); | 507 StoreStubCompiler compiler(isolate_, strict_mode); |
| 508 Handle<Code> code = compiler.CompileStoreGlobal(receiver, cell, name); | 508 Handle<Code> code = compiler.CompileStoreGlobal(receiver, cell, name); |
| 509 JSObject::UpdateMapCodeCache(receiver, name, code); | 509 JSObject::UpdateMapCodeCache(receiver, name, code); |
| 510 return code; | 510 return code; |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 return code; | 727 return code; |
| 728 } | 728 } |
| 729 | 729 |
| 730 | 730 |
| 731 Handle<Code> StubCache::ComputeCallGlobal(int argc, | 731 Handle<Code> StubCache::ComputeCallGlobal(int argc, |
| 732 Code::Kind kind, | 732 Code::Kind kind, |
| 733 Code::ExtraICState extra_state, | 733 Code::ExtraICState extra_state, |
| 734 Handle<Name> name, | 734 Handle<Name> name, |
| 735 Handle<JSObject> receiver, | 735 Handle<JSObject> receiver, |
| 736 Handle<GlobalObject> holder, | 736 Handle<GlobalObject> holder, |
| 737 Handle<JSGlobalPropertyCell> cell, | 737 Handle<PropertyCell> cell, |
| 738 Handle<JSFunction> function) { | 738 Handle<JSFunction> function) { |
| 739 InlineCacheHolderFlag cache_holder = | 739 InlineCacheHolderFlag cache_holder = |
| 740 IC::GetCodeCacheForObject(*receiver, *holder); | 740 IC::GetCodeCacheForObject(*receiver, *holder); |
| 741 Handle<JSObject> stub_holder(IC::GetCodeCacheHolder( | 741 Handle<JSObject> stub_holder(IC::GetCodeCacheHolder( |
| 742 isolate_, *receiver, cache_holder)); | 742 isolate_, *receiver, cache_holder)); |
| 743 Code::Flags flags = Code::ComputeMonomorphicFlags( | 743 Code::Flags flags = Code::ComputeMonomorphicFlags( |
| 744 kind, extra_state, Code::NORMAL, argc, cache_holder); | 744 kind, extra_state, Code::NORMAL, argc, cache_holder); |
| 745 Handle<Object> probe(stub_holder->map()->FindInCodeCache(*name, flags), | 745 Handle<Object> probe(stub_holder->map()->FindInCodeCache(*name, flags), |
| 746 isolate_); | 746 isolate_); |
| 747 if (probe->IsCode()) return Handle<Code>::cast(probe); | 747 if (probe->IsCode()) return Handle<Code>::cast(probe); |
| (...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2093 Handle<FunctionTemplateInfo>( | 2093 Handle<FunctionTemplateInfo>( |
| 2094 FunctionTemplateInfo::cast(signature->receiver())); | 2094 FunctionTemplateInfo::cast(signature->receiver())); |
| 2095 } | 2095 } |
| 2096 } | 2096 } |
| 2097 | 2097 |
| 2098 is_simple_api_call_ = true; | 2098 is_simple_api_call_ = true; |
| 2099 } | 2099 } |
| 2100 | 2100 |
| 2101 | 2101 |
| 2102 } } // namespace v8::internal | 2102 } } // namespace v8::internal |
| OLD | NEW |