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

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

Issue 101413006: Implement in-heap backing store for typed arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: GC fixes Created 6 years, 11 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
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen.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 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 13 matching lines...) Expand all
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_HEAP_INL_H_ 28 #ifndef V8_HEAP_INL_H_
29 #define V8_HEAP_INL_H_ 29 #define V8_HEAP_INL_H_
30 30
31 #include <cmath> 31 #include <cmath>
32 32
33 #include "heap.h" 33 #include "heap.h"
34 #include "heap-profiler.h"
34 #include "isolate.h" 35 #include "isolate.h"
35 #include "list-inl.h" 36 #include "list-inl.h"
36 #include "objects.h" 37 #include "objects.h"
37 #include "platform.h" 38 #include "platform.h"
38 #include "v8-counters.h" 39 #include "v8-counters.h"
39 #include "store-buffer.h" 40 #include "store-buffer.h"
40 #include "store-buffer-inl.h" 41 #include "store-buffer-inl.h"
41 42
42 namespace v8 { 43 namespace v8 {
43 namespace internal { 44 namespace internal {
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 { \ 660 { \
660 AlwaysAllocateScope __scope__; \ 661 AlwaysAllocateScope __scope__; \
661 __maybe_object__ = FUNCTION_CALL; \ 662 __maybe_object__ = FUNCTION_CALL; \
662 } \ 663 } \
663 if (__maybe_object__->ToObject(&__object__)) RETURN_VALUE; \ 664 if (__maybe_object__->ToObject(&__object__)) RETURN_VALUE; \
664 if (__maybe_object__->IsOutOfMemory()) { \ 665 if (__maybe_object__->IsOutOfMemory()) { \
665 OOM; \ 666 OOM; \
666 } \ 667 } \
667 if (__maybe_object__->IsRetryAfterGC()) { \ 668 if (__maybe_object__->IsRetryAfterGC()) { \
668 /* TODO(1181417): Fix this. */ \ 669 /* TODO(1181417): Fix this. */ \
669 v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); \ 670 v8::internal::Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true);\
670 } \ 671 } \
671 RETURN_EMPTY; \ 672 RETURN_EMPTY; \
672 } while (false) 673 } while (false)
673 674
674 #define CALL_AND_RETRY_OR_DIE( \ 675 #define CALL_AND_RETRY_OR_DIE( \
675 ISOLATE, FUNCTION_CALL, RETURN_VALUE, RETURN_EMPTY) \ 676 ISOLATE, FUNCTION_CALL, RETURN_VALUE, RETURN_EMPTY) \
676 CALL_AND_RETRY( \ 677 CALL_AND_RETRY( \
677 ISOLATE, \ 678 ISOLATE, \
678 FUNCTION_CALL, \ 679 FUNCTION_CALL, \
679 RETURN_VALUE, \ 680 RETURN_VALUE, \
680 RETURN_EMPTY, \ 681 RETURN_EMPTY, \
681 v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY", true)) 682 v8::internal::Heap::FatalProcessOutOfMemory("CALL_AND_RETRY", true))
682 683
683 #define CALL_HEAP_FUNCTION(ISOLATE, FUNCTION_CALL, TYPE) \ 684 #define CALL_HEAP_FUNCTION(ISOLATE, FUNCTION_CALL, TYPE) \
684 CALL_AND_RETRY_OR_DIE(ISOLATE, \ 685 CALL_AND_RETRY_OR_DIE(ISOLATE, \
685 FUNCTION_CALL, \ 686 FUNCTION_CALL, \
686 return Handle<TYPE>(TYPE::cast(__object__), ISOLATE), \ 687 return Handle<TYPE>(TYPE::cast(__object__), ISOLATE), \
687 return Handle<TYPE>()) \ 688 return Handle<TYPE>()) \
688 689
689 690
690 #define CALL_HEAP_FUNCTION_VOID(ISOLATE, FUNCTION_CALL) \ 691 #define CALL_HEAP_FUNCTION_VOID(ISOLATE, FUNCTION_CALL) \
691 CALL_AND_RETRY_OR_DIE(ISOLATE, FUNCTION_CALL, return, return) 692 CALL_AND_RETRY_OR_DIE(ISOLATE, FUNCTION_CALL, return, return)
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 #ifdef DEBUG 834 #ifdef DEBUG
834 Isolate* isolate = Isolate::Current(); 835 Isolate* isolate = Isolate::Current();
835 isolate->heap()->disallow_allocation_failure_ = old_state_; 836 isolate->heap()->disallow_allocation_failure_ = old_state_;
836 #endif 837 #endif
837 } 838 }
838 839
839 840
840 } } // namespace v8::internal 841 } } // namespace v8::internal
841 842
842 #endif // V8_HEAP_INL_H_ 843 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698