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

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

Issue 188543004: Track global cells as special side effects in GVN. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cells cannot move. Created 6 years, 9 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 | « no previous file | src/hydrogen-gvn.h » ('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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 Object** roots_array_start = heap->roots_array_start(); 90 Object** roots_array_start = heap->roots_array_start();
91 if (roots_array_start <= handle && 91 if (roots_array_start <= handle &&
92 handle < roots_array_start + Heap::kStrongRootListLength && 92 handle < roots_array_start + Heap::kStrongRootListLength &&
93 heap->RootCanBeTreatedAsConstant( 93 heap->RootCanBeTreatedAsConstant(
94 static_cast<Heap::RootListIndex>(handle - roots_array_start))) { 94 static_cast<Heap::RootListIndex>(handle - roots_array_start))) {
95 return true; 95 return true;
96 } 96 }
97 if (!AllowHandleDereference::IsAllowed()) return false; 97 if (!AllowHandleDereference::IsAllowed()) return false;
98 if (mode == INCLUDE_DEFERRED_CHECK && 98 if (mode == INCLUDE_DEFERRED_CHECK &&
99 !AllowDeferredHandleDereference::IsAllowed()) { 99 !AllowDeferredHandleDereference::IsAllowed()) {
100 // Accessing maps and internalized strings is safe. 100 // Accessing cells, maps and internalized strings is safe.
101 if (heap_object->IsCell()) return true;
101 if (heap_object->IsMap()) return true; 102 if (heap_object->IsMap()) return true;
102 if (heap_object->IsInternalizedString()) return true; 103 if (heap_object->IsInternalizedString()) return true;
103 return !heap->isolate()->IsDeferredHandle(handle); 104 return !heap->isolate()->IsDeferredHandle(handle);
104 } 105 }
105 return true; 106 return true;
106 } 107 }
107 #endif 108 #endif
108 109
109 110
110 111
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 current->level = level_; 201 current->level = level_;
201 ASSERT_EQ(current->next, current->limit); 202 ASSERT_EQ(current->next, current->limit);
202 current->limit = limit_; 203 current->limit = limit_;
203 } 204 }
204 205
205 #endif 206 #endif
206 207
207 } } // namespace v8::internal 208 } } // namespace v8::internal
208 209
209 #endif // V8_HANDLES_INL_H_ 210 #endif // V8_HANDLES_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-gvn.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698