| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 switch (table) { | 264 switch (table) { |
| 265 case StubCache::kPrimary: return StubCache::primary_; | 265 case StubCache::kPrimary: return StubCache::primary_; |
| 266 case StubCache::kSecondary: return StubCache::secondary_; | 266 case StubCache::kSecondary: return StubCache::secondary_; |
| 267 } | 267 } |
| 268 UNREACHABLE(); | 268 UNREACHABLE(); |
| 269 return NULL; | 269 return NULL; |
| 270 } | 270 } |
| 271 | 271 |
| 272 | 272 |
| 273 private: | 273 private: |
| 274 explicit StubCache(Isolate*); | 274 explicit StubCache(Isolate* isolate); |
| 275 | 275 |
| 276 friend class Isolate; | 276 friend class Isolate; |
| 277 friend class SCTableReference; | 277 friend class SCTableReference; |
| 278 static const int kPrimaryTableSize = 2048; | 278 static const int kPrimaryTableSize = 2048; |
| 279 static const int kSecondaryTableSize = 512; | 279 static const int kSecondaryTableSize = 512; |
| 280 Entry primary_[kPrimaryTableSize]; | 280 Entry primary_[kPrimaryTableSize]; |
| 281 Entry secondary_[kSecondaryTableSize]; | 281 Entry secondary_[kSecondaryTableSize]; |
| 282 | 282 |
| 283 // Computes the hashed offsets for primary and secondary caches. | 283 // Computes the hashed offsets for primary and secondary caches. |
| 284 RLYSTC int PrimaryOffset(String* name, Code::Flags flags, Map* map) { | 284 RLYSTC int PrimaryOffset(String* name, Code::Flags flags, Map* map) { |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 | 776 |
| 777 JSFunction* constant_function_; | 777 JSFunction* constant_function_; |
| 778 bool is_simple_api_call_; | 778 bool is_simple_api_call_; |
| 779 FunctionTemplateInfo* expected_receiver_type_; | 779 FunctionTemplateInfo* expected_receiver_type_; |
| 780 CallHandlerInfo* api_call_info_; | 780 CallHandlerInfo* api_call_info_; |
| 781 }; | 781 }; |
| 782 | 782 |
| 783 } } // namespace v8::internal | 783 } } // namespace v8::internal |
| 784 | 784 |
| 785 #endif // V8_STUB_CACHE_H_ | 785 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |