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

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

Issue 10534006: Remove TLS access for current Zone. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review. Created 8 years, 6 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
OLDNEW
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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 case StubCache::kPrimary: return StubCache::primary_; 293 case StubCache::kPrimary: return StubCache::primary_;
294 case StubCache::kSecondary: return StubCache::secondary_; 294 case StubCache::kSecondary: return StubCache::secondary_;
295 } 295 }
296 UNREACHABLE(); 296 UNREACHABLE();
297 return NULL; 297 return NULL;
298 } 298 }
299 299
300 Isolate* isolate() { return isolate_; } 300 Isolate* isolate() { return isolate_; }
301 Heap* heap() { return isolate()->heap(); } 301 Heap* heap() { return isolate()->heap(); }
302 Factory* factory() { return isolate()->factory(); } 302 Factory* factory() { return isolate()->factory(); }
303 Zone* zone() const { return zone_; }
303 304
304 private: 305 private:
305 explicit StubCache(Isolate* isolate); 306 StubCache(Isolate* isolate, Zone* zone);
306 307
307 Handle<Code> ComputeCallInitialize(int argc, 308 Handle<Code> ComputeCallInitialize(int argc,
308 RelocInfo::Mode mode, 309 RelocInfo::Mode mode,
309 Code::Kind kind); 310 Code::Kind kind);
310 311
311 // The stub cache has a primary and secondary level. The two levels have 312 // The stub cache has a primary and secondary level. The two levels have
312 // different hashing algorithms in order to avoid simultaneous collisions 313 // different hashing algorithms in order to avoid simultaneous collisions
313 // in both caches. Unlike a probing strategy (quadratic or otherwise) the 314 // in both caches. Unlike a probing strategy (quadratic or otherwise) the
314 // update strategy on updates is fairly clear and simple: Any existing entry 315 // update strategy on updates is fairly clear and simple: Any existing entry
315 // in the primary cache is moved to the secondary cache, and secondary cache 316 // in the primary cache is moved to the secondary cache, and secondary cache
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 369 }
369 370
370 static const int kPrimaryTableBits = 11; 371 static const int kPrimaryTableBits = 11;
371 static const int kPrimaryTableSize = (1 << kPrimaryTableBits); 372 static const int kPrimaryTableSize = (1 << kPrimaryTableBits);
372 static const int kSecondaryTableBits = 9; 373 static const int kSecondaryTableBits = 9;
373 static const int kSecondaryTableSize = (1 << kSecondaryTableBits); 374 static const int kSecondaryTableSize = (1 << kSecondaryTableBits);
374 375
375 Entry primary_[kPrimaryTableSize]; 376 Entry primary_[kPrimaryTableSize];
376 Entry secondary_[kSecondaryTableSize]; 377 Entry secondary_[kSecondaryTableSize];
377 Isolate* isolate_; 378 Isolate* isolate_;
379 Zone* zone_;
378 380
379 friend class Isolate; 381 friend class Isolate;
380 friend class SCTableReference; 382 friend class SCTableReference;
381 383
382 DISALLOW_COPY_AND_ASSIGN(StubCache); 384 DISALLOW_COPY_AND_ASSIGN(StubCache);
383 }; 385 };
384 386
385 387
386 // ------------------------------------------------------------------------ 388 // ------------------------------------------------------------------------
387 389
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 Handle<JSFunction> constant_function_; 896 Handle<JSFunction> constant_function_;
895 bool is_simple_api_call_; 897 bool is_simple_api_call_;
896 Handle<FunctionTemplateInfo> expected_receiver_type_; 898 Handle<FunctionTemplateInfo> expected_receiver_type_;
897 Handle<CallHandlerInfo> api_call_info_; 899 Handle<CallHandlerInfo> api_call_info_;
898 }; 900 };
899 901
900 902
901 } } // namespace v8::internal 903 } } // namespace v8::internal
902 904
903 #endif // V8_STUB_CACHE_H_ 905 #endif // V8_STUB_CACHE_H_
OLDNEW
« src/splay-tree-inl.h ('K') | « src/splay-tree-inl.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698