| 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 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 | 740 |
| 741 | 741 |
| 742 Code* StubCache::FindCallInitialize(int argc, | 742 Code* StubCache::FindCallInitialize(int argc, |
| 743 RelocInfo::Mode mode, | 743 RelocInfo::Mode mode, |
| 744 Code::Kind kind) { | 744 Code::Kind kind) { |
| 745 Code::ExtraICState extra_state = | 745 Code::ExtraICState extra_state = |
| 746 CallICBase::StringStubState::encode(DEFAULT_STRING_STUB) | | 746 CallICBase::StringStubState::encode(DEFAULT_STRING_STUB) | |
| 747 CallICBase::Contextual::encode(mode == RelocInfo::CODE_TARGET_CONTEXT); | 747 CallICBase::Contextual::encode(mode == RelocInfo::CODE_TARGET_CONTEXT); |
| 748 Code::Flags flags = | 748 Code::Flags flags = |
| 749 Code::ComputeFlags(kind, UNINITIALIZED, extra_state, Code::NORMAL, argc); | 749 Code::ComputeFlags(kind, UNINITIALIZED, extra_state, Code::NORMAL, argc); |
| 750 | |
| 751 // Use raw_unchecked... so we don't get assert failures during GC. | |
| 752 UnseededNumberDictionary* dictionary = | 750 UnseededNumberDictionary* dictionary = |
| 753 isolate()->heap()->raw_unchecked_non_monomorphic_cache(); | 751 isolate()->heap()->non_monomorphic_cache(); |
| 754 int entry = dictionary->FindEntry(isolate(), flags); | 752 int entry = dictionary->FindEntry(isolate(), flags); |
| 755 ASSERT(entry != -1); | 753 ASSERT(entry != -1); |
| 756 Object* code = dictionary->ValueAt(entry); | 754 Object* code = dictionary->ValueAt(entry); |
| 757 // This might be called during the marking phase of the collector | 755 // This might be called during the marking phase of the collector |
| 758 // hence the unchecked cast. | 756 // hence the unchecked cast. |
| 759 return reinterpret_cast<Code*>(code); | 757 return reinterpret_cast<Code*>(code); |
| 760 } | 758 } |
| 761 | 759 |
| 762 | 760 |
| 763 Handle<Code> StubCache::ComputeCallInitialize(int argc, | 761 Handle<Code> StubCache::ComputeCallInitialize(int argc, |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 Handle<FunctionTemplateInfo>( | 1579 Handle<FunctionTemplateInfo>( |
| 1582 FunctionTemplateInfo::cast(signature->receiver())); | 1580 FunctionTemplateInfo::cast(signature->receiver())); |
| 1583 } | 1581 } |
| 1584 } | 1582 } |
| 1585 | 1583 |
| 1586 is_simple_api_call_ = true; | 1584 is_simple_api_call_ = true; |
| 1587 } | 1585 } |
| 1588 | 1586 |
| 1589 | 1587 |
| 1590 } } // namespace v8::internal | 1588 } } // namespace v8::internal |
| OLD | NEW |