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

Side by Side Diff: src/contexts.h

Issue 3135026: Merge flush code phase into marking phase. (Closed)
Patch Set: returned checked casts 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
« no previous file with comments | « src/compiler.cc ('k') | src/frames.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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 return reinterpret_cast<Context*>(result); 236 return reinterpret_cast<Context*>(result);
237 } 237 }
238 void set_previous(Context* context) { set(PREVIOUS_INDEX, context); } 238 void set_previous(Context* context) { set(PREVIOUS_INDEX, context); }
239 239
240 bool has_extension() { return unchecked_extension() != NULL; } 240 bool has_extension() { return unchecked_extension() != NULL; }
241 JSObject* extension() { return JSObject::cast(unchecked_extension()); } 241 JSObject* extension() { return JSObject::cast(unchecked_extension()); }
242 void set_extension(JSObject* object) { set(EXTENSION_INDEX, object); } 242 void set_extension(JSObject* object) { set(EXTENSION_INDEX, object); }
243 243
244 GlobalObject* global() { 244 GlobalObject* global() {
245 Object* result = get(GLOBAL_INDEX); 245 Object* result = get(GLOBAL_INDEX);
246 ASSERT(IsBootstrappingOrGlobalObject(result)); 246 ASSERT(Heap::gc_state() != Heap::NOT_IN_GC ||
247 IsBootstrappingOrGlobalObject(result));
247 return reinterpret_cast<GlobalObject*>(result); 248 return reinterpret_cast<GlobalObject*>(result);
248 } 249 }
249 void set_global(GlobalObject* global) { set(GLOBAL_INDEX, global); } 250 void set_global(GlobalObject* global) { set(GLOBAL_INDEX, global); }
250 251
251 // Returns a JSGlobalProxy object or null. 252 // Returns a JSGlobalProxy object or null.
252 JSObject* global_proxy(); 253 JSObject* global_proxy();
253 void set_global_proxy(JSObject* global); 254 void set_global_proxy(JSObject* global);
254 255
255 // The builtins object. 256 // The builtins object.
256 JSBuiltinsObject* builtins(); 257 JSBuiltinsObject* builtins();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 #ifdef DEBUG 336 #ifdef DEBUG
336 // Bootstrapping-aware type checks. 337 // Bootstrapping-aware type checks.
337 static bool IsBootstrappingOrContext(Object* object); 338 static bool IsBootstrappingOrContext(Object* object);
338 static bool IsBootstrappingOrGlobalObject(Object* object); 339 static bool IsBootstrappingOrGlobalObject(Object* object);
339 #endif 340 #endif
340 }; 341 };
341 342
342 } } // namespace v8::internal 343 } } // namespace v8::internal
343 344
344 #endif // V8_CONTEXTS_H_ 345 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698