| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 21 matching lines...) Expand all Loading... |
| 32 #include "ic-inl.h" | 32 #include "ic-inl.h" |
| 33 #include "stub-cache.h" | 33 #include "stub-cache.h" |
| 34 | 34 |
| 35 namespace v8 { | 35 namespace v8 { |
| 36 namespace internal { | 36 namespace internal { |
| 37 | 37 |
| 38 // ----------------------------------------------------------------------- | 38 // ----------------------------------------------------------------------- |
| 39 // StubCache implementation. | 39 // StubCache implementation. |
| 40 | 40 |
| 41 | 41 |
| 42 StubCache::Entry StubCache::primary_[StubCache::kPrimaryTableSize]; | |
| 43 StubCache::Entry StubCache::secondary_[StubCache::kSecondaryTableSize]; | |
| 44 | |
| 45 StubCache::StubCache() { | 42 StubCache::StubCache() { |
| 43 memset(primary_, 0, sizeof(primary_[0]) * StubCache::kPrimaryTableSize); |
| 44 memset(secondary_, 0, sizeof(secondary_[0]) * StubCache::kSecondaryTableSize); |
| 46 } | 45 } |
| 47 | 46 |
| 48 | 47 |
| 49 void StubCache::Initialize(bool create_heap_objects) { | 48 void StubCache::Initialize(bool create_heap_objects) { |
| 50 ASSERT(IsPowerOf2(kPrimaryTableSize)); | 49 ASSERT(IsPowerOf2(kPrimaryTableSize)); |
| 51 ASSERT(IsPowerOf2(kSecondaryTableSize)); | 50 ASSERT(IsPowerOf2(kSecondaryTableSize)); |
| 52 if (create_heap_objects) { | 51 if (create_heap_objects) { |
| 53 HandleScope scope; | 52 HandleScope scope; |
| 54 Clear(); | 53 Clear(); |
| 55 } | 54 } |
| (...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 expected_receiver_type_ = | 1325 expected_receiver_type_ = |
| 1327 FunctionTemplateInfo::cast(signature->receiver()); | 1326 FunctionTemplateInfo::cast(signature->receiver()); |
| 1328 } | 1327 } |
| 1329 } | 1328 } |
| 1330 | 1329 |
| 1331 is_simple_api_call_ = true; | 1330 is_simple_api_call_ = true; |
| 1332 } | 1331 } |
| 1333 | 1332 |
| 1334 | 1333 |
| 1335 } } // namespace v8::internal | 1334 } } // namespace v8::internal |
| OLD | NEW |