| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 return FindIC(name, Handle<Map>(stub_holder->map()), kind, | 129 return FindIC(name, Handle<Map>(stub_holder->map()), kind, |
| 130 type, extra_ic_state); | 130 type, extra_ic_state); |
| 131 } | 131 } |
| 132 | 132 |
| 133 | 133 |
| 134 Handle<Code> StubCache::FindLoadHandler(Handle<Name> name, | 134 Handle<Code> StubCache::FindLoadHandler(Handle<Name> name, |
| 135 Handle<JSObject> receiver, | 135 Handle<JSObject> receiver, |
| 136 Handle<JSObject> stub_holder, | 136 Handle<JSObject> stub_holder, |
| 137 Code::Kind kind, | 137 Code::Kind kind, |
| 138 Code::StubType type) { | 138 Code::StubType type) { |
| 139 Code::ExtraICState extra_ic_state = Code::ComputeExtraICState( | 139 InlineCacheHolderFlag holder_flag = receiver.is_identical_to(stub_holder) |
| 140 receiver.is_identical_to(stub_holder) ? Code::OWN_STUB | 140 ? OWN_MAP : PROTOTYPE_MAP; |
| 141 : Code::PROTOTYPE_STUB); | |
| 142 ASSERT(type != Code::NORMAL); | 141 ASSERT(type != Code::NORMAL); |
| 143 Code::Flags flags = Code::ComputeMonomorphicFlags( | 142 Code::Flags flags = Code::ComputeMonomorphicFlags( |
| 144 Code::STUB, extra_ic_state, type, kind); | 143 Code::STUB, Code::kNoExtraICState, type, kind, holder_flag); |
| 145 Handle<Object> probe(stub_holder->map()->FindInCodeCache(*name, flags), | 144 Handle<Object> probe(stub_holder->map()->FindInCodeCache(*name, flags), |
| 146 isolate_); | 145 isolate_); |
| 147 if (probe->IsCode()) return Handle<Code>::cast(probe); | 146 if (probe->IsCode()) return Handle<Code>::cast(probe); |
| 148 return Handle<Code>::null(); | 147 return Handle<Code>::null(); |
| 149 } | 148 } |
| 150 | 149 |
| 151 | 150 |
| 152 Handle<Code> StubCache::FindStoreHandler(Handle<Name> name, | 151 Handle<Code> StubCache::FindStoreHandler(Handle<Name> name, |
| 153 Handle<JSObject> receiver, | 152 Handle<JSObject> receiver, |
| 154 Code::Kind kind, | 153 Code::Kind kind, |
| (...skipping 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2254 Handle<FunctionTemplateInfo>( | 2253 Handle<FunctionTemplateInfo>( |
| 2255 FunctionTemplateInfo::cast(signature->receiver())); | 2254 FunctionTemplateInfo::cast(signature->receiver())); |
| 2256 } | 2255 } |
| 2257 } | 2256 } |
| 2258 | 2257 |
| 2259 is_simple_api_call_ = true; | 2258 is_simple_api_call_ = true; |
| 2260 } | 2259 } |
| 2261 | 2260 |
| 2262 | 2261 |
| 2263 } } // namespace v8::internal | 2262 } } // namespace v8::internal |
| OLD | NEW |