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/mark-compact.cc

Issue 6718023: Cleanup of Isolate usage (guided by SunSpider profiling) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback Created 9 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/spaces.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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 static inline bool IsJSBuiltinsObject(Object* obj) { 661 static inline bool IsJSBuiltinsObject(Object* obj) {
662 return obj->IsHeapObject() && 662 return obj->IsHeapObject() &&
663 (SafeMap(obj)->instance_type() == JS_BUILTINS_OBJECT_TYPE); 663 (SafeMap(obj)->instance_type() == JS_BUILTINS_OBJECT_TYPE);
664 } 664 }
665 665
666 666
667 static inline bool IsValidNotBuiltinContext(Object* ctx) { 667 static inline bool IsValidNotBuiltinContext(Object* ctx) {
668 if (!ctx->IsHeapObject()) return false; 668 if (!ctx->IsHeapObject()) return false;
669 669
670 Map* map = SafeMap(ctx); 670 Map* map = SafeMap(ctx);
671 if (!(map == HEAP->raw_unchecked_context_map() || 671 Heap* heap = map->heap();
672 map == HEAP->raw_unchecked_catch_context_map() || 672 if (!(map == heap->raw_unchecked_context_map() ||
673 map == HEAP->raw_unchecked_global_context_map())) { 673 map == heap->raw_unchecked_catch_context_map() ||
674 map == heap->raw_unchecked_global_context_map())) {
674 return false; 675 return false;
675 } 676 }
676 677
677 Context* context = reinterpret_cast<Context*>(ctx); 678 Context* context = reinterpret_cast<Context*>(ctx);
678 679
679 if (IsJSBuiltinsObject(context->global())) { 680 if (IsJSBuiltinsObject(context->global())) {
680 return false; 681 return false;
681 } 682 }
682 683
683 return true; 684 return true;
(...skipping 2382 matching lines...) Expand 10 before | Expand all | Expand 10 after
3066 } 3067 }
3067 3068
3068 3069
3069 void MarkCompactCollector::Initialize() { 3070 void MarkCompactCollector::Initialize() {
3070 StaticPointersToNewGenUpdatingVisitor::Initialize(); 3071 StaticPointersToNewGenUpdatingVisitor::Initialize();
3071 StaticMarkingVisitor::Initialize(); 3072 StaticMarkingVisitor::Initialize();
3072 } 3073 }
3073 3074
3074 3075
3075 } } // namespace v8::internal 3076 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698