Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: src/stub-cache.h

Issue 9323002: ARM microoptimizations to megamorphic stub probing. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/objects.h ('K') | « src/objects.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // we do in generated code. We generate an hash code that already 336 // we do in generated code. We generate an hash code that already
337 // ends in String::kHashShift 0s. Then we shift it so it is a multiple 337 // ends in String::kHashShift 0s. Then we shift it so it is a multiple
338 // of sizeof(Entry). This makes it easier to avoid making mistakes 338 // of sizeof(Entry). This makes it easier to avoid making mistakes
339 // in the hashed offset computations. 339 // in the hashed offset computations.
340 static Entry* entry(Entry* table, int offset) { 340 static Entry* entry(Entry* table, int offset) {
341 const int shift_amount = kPointerSizeLog2 + 1 - String::kHashShift; 341 const int shift_amount = kPointerSizeLog2 + 1 - String::kHashShift;
342 return reinterpret_cast<Entry*>( 342 return reinterpret_cast<Entry*>(
343 reinterpret_cast<Address>(table) + (offset << shift_amount)); 343 reinterpret_cast<Address>(table) + (offset << shift_amount));
344 } 344 }
345 345
346 static const int kPrimaryTableSize = 2048; 346 static const int kPrimaryTableBits = 11;
347 static const int kSecondaryTableSize = 512; 347 static const int kPrimaryTableSize = (1 << kPrimaryTableBits);
348 static const int kSecondaryTableBits = 9;
349 static const int kSecondaryTableSize = (1 << kSecondaryTableBits);
348 350
349 Entry primary_[kPrimaryTableSize]; 351 Entry primary_[kPrimaryTableSize];
350 Entry secondary_[kSecondaryTableSize]; 352 Entry secondary_[kSecondaryTableSize];
351 Isolate* isolate_; 353 Isolate* isolate_;
352 354
353 friend class Isolate; 355 friend class Isolate;
354 friend class SCTableReference; 356 friend class SCTableReference;
355 357
356 DISALLOW_COPY_AND_ASSIGN(StubCache); 358 DISALLOW_COPY_AND_ASSIGN(StubCache);
357 }; 359 };
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 Handle<JSFunction> constant_function_; 860 Handle<JSFunction> constant_function_;
859 bool is_simple_api_call_; 861 bool is_simple_api_call_;
860 Handle<FunctionTemplateInfo> expected_receiver_type_; 862 Handle<FunctionTemplateInfo> expected_receiver_type_;
861 Handle<CallHandlerInfo> api_call_info_; 863 Handle<CallHandlerInfo> api_call_info_;
862 }; 864 };
863 865
864 866
865 } } // namespace v8::internal 867 } } // namespace v8::internal
866 868
867 #endif // V8_STUB_CACHE_H_ 869 #endif // V8_STUB_CACHE_H_
OLDNEW
« src/objects.h ('K') | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698