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

Side by Side Diff: src/heap-inl.h

Issue 2718007: [Isolates] Moving TranscendentalCache to Isolate. (Closed)
Patch Set: Created 10 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
« no previous file with comments | « src/heap.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 return condition ? HEAP->true_value() : HEAP->false_value(); 504 return condition ? HEAP->true_value() : HEAP->false_value();
505 } 505 }
506 506
507 507
508 void Heap::CompletelyClearInstanceofCache() { 508 void Heap::CompletelyClearInstanceofCache() {
509 set_instanceof_cache_map(HEAP->the_hole_value()); 509 set_instanceof_cache_map(HEAP->the_hole_value());
510 set_instanceof_cache_function(HEAP->the_hole_value()); 510 set_instanceof_cache_function(HEAP->the_hole_value());
511 } 511 }
512 512
513 513
514 Object* TranscendentalCache::Get(Type type, double input) {
515 SubCache* cache = caches_[type];
516 if (cache == NULL) {
517 caches_[type] = cache = new SubCache(type);
518 }
519 return cache->Get(input);
520 }
521
522
523 Address TranscendentalCache::cache_array_address() {
524 return reinterpret_cast<Address>(caches_);
525 }
526
527
514 Heap* _inline_get_heap_() { 528 Heap* _inline_get_heap_() {
515 return HEAP; 529 return HEAP;
516 } 530 }
517 531
518 532
519 } } // namespace v8::internal 533 } } // namespace v8::internal
520 534
521 #endif // V8_HEAP_INL_H_ 535 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698