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

Side by Side Diff: src/isolate.h

Issue 3031005: [Isolates] Avoid dereferencing Isolate::Current() to check oddball identities... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 years, 4 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/ia32/codegen-ia32.cc ('k') | src/objects.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 1132
1133 // Temporary macros for accessing fields off the global isolate. Define these 1133 // Temporary macros for accessing fields off the global isolate. Define these
1134 // when reformatting code would become burdensome. 1134 // when reformatting code would become burdensome.
1135 #define HEAP (v8::internal::Isolate::Current()->heap()) 1135 #define HEAP (v8::internal::Isolate::Current()->heap())
1136 #define ZONE (v8::internal::Isolate::Current()->zone()) 1136 #define ZONE (v8::internal::Isolate::Current()->zone())
1137 #define LOGGER (v8::internal::Isolate::Current()->logger()) 1137 #define LOGGER (v8::internal::Isolate::Current()->logger())
1138 1138
1139 1139
1140 // Tells whether the global context is marked with out of memory. 1140 // Tells whether the global context is marked with out of memory.
1141 inline bool Context::has_out_of_memory() { 1141 inline bool Context::has_out_of_memory() {
1142 return global_context()->out_of_memory() == HEAP->true_value(); 1142 return global_context()->out_of_memory()->IsTrue();
1143 } 1143 }
1144 1144
1145 1145
1146 // Mark the global context with out of memory. 1146 // Mark the global context with out of memory.
1147 inline void Context::mark_out_of_memory() { 1147 inline void Context::mark_out_of_memory() {
1148 global_context()->set_out_of_memory(HEAP->true_value()); 1148 global_context()->set_out_of_memory(HEAP->true_value());
1149 } 1149 }
1150 1150
1151 1151
1152 // Temporary macro to be used to flag definitions that are indeed static 1152 // Temporary macro to be used to flag definitions that are indeed static
(...skipping 11 matching lines...) Expand all
1164 #define ISOLATED_CLASS class 1164 #define ISOLATED_CLASS class
1165 1165
1166 } } // namespace v8::internal 1166 } } // namespace v8::internal
1167 1167
1168 // TODO(isolates): Get rid of these -inl.h includes and place them only where 1168 // TODO(isolates): Get rid of these -inl.h includes and place them only where
1169 // they're needed. 1169 // they're needed.
1170 #include "allocation-inl.h" 1170 #include "allocation-inl.h"
1171 #include "zone-inl.h" 1171 #include "zone-inl.h"
1172 1172
1173 #endif // V8_ISOLATE_H_ 1173 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698