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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 24072016: Use Unique<Cell> and Unique<PropertyCell> in LoadGlobalCell and StoreGlobalCell. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.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 3127 matching lines...) Expand 10 before | Expand all | Expand 10 after
3138 stream->Add(" %p [%s] -> %p [%s]", 3138 stream->Add(" %p [%s] -> %p [%s]",
3139 *original_map(), 3139 *original_map(),
3140 ElementsAccessor::ForKind(from_kind)->name(), 3140 ElementsAccessor::ForKind(from_kind)->name(),
3141 *transitioned_map(), 3141 *transitioned_map(),
3142 ElementsAccessor::ForKind(to_kind)->name()); 3142 ElementsAccessor::ForKind(to_kind)->name());
3143 if (IsSimpleMapChangeTransition(from_kind, to_kind)) stream->Add(" (simple)"); 3143 if (IsSimpleMapChangeTransition(from_kind, to_kind)) stream->Add(" (simple)");
3144 } 3144 }
3145 3145
3146 3146
3147 void HLoadGlobalCell::PrintDataTo(StringStream* stream) { 3147 void HLoadGlobalCell::PrintDataTo(StringStream* stream) {
3148 stream->Add("[%p]", *cell()); 3148 stream->Add("[%p]", *cell().handle());
3149 if (!details_.IsDontDelete()) stream->Add(" (deleteable)"); 3149 if (!details_.IsDontDelete()) stream->Add(" (deleteable)");
3150 if (details_.IsReadOnly()) stream->Add(" (read-only)"); 3150 if (details_.IsReadOnly()) stream->Add(" (read-only)");
3151 } 3151 }
3152 3152
3153 3153
3154 bool HLoadGlobalCell::RequiresHoleCheck() const { 3154 bool HLoadGlobalCell::RequiresHoleCheck() const {
3155 if (details_.IsDontDelete() && !details_.IsReadOnly()) return false; 3155 if (details_.IsDontDelete() && !details_.IsReadOnly()) return false;
3156 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { 3156 for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
3157 HValue* use = it.value(); 3157 HValue* use = it.value();
3158 if (!use->IsChange()) return true; 3158 if (!use->IsChange()) return true;
3159 } 3159 }
3160 return false; 3160 return false;
3161 } 3161 }
3162 3162
3163 3163
3164 void HLoadGlobalGeneric::PrintDataTo(StringStream* stream) { 3164 void HLoadGlobalGeneric::PrintDataTo(StringStream* stream) {
3165 stream->Add("%o ", *name()); 3165 stream->Add("%o ", *name());
3166 } 3166 }
3167 3167
3168 3168
3169 void HInnerAllocatedObject::PrintDataTo(StringStream* stream) { 3169 void HInnerAllocatedObject::PrintDataTo(StringStream* stream) {
3170 base_object()->PrintNameTo(stream); 3170 base_object()->PrintNameTo(stream);
3171 stream->Add(" offset %d", offset()); 3171 stream->Add(" offset %d", offset());
3172 } 3172 }
3173 3173
3174 3174
3175 void HStoreGlobalCell::PrintDataTo(StringStream* stream) { 3175 void HStoreGlobalCell::PrintDataTo(StringStream* stream) {
3176 stream->Add("[%p] = ", *cell()); 3176 stream->Add("[%p] = ", *cell().handle());
3177 value()->PrintNameTo(stream); 3177 value()->PrintNameTo(stream);
3178 if (!details_.IsDontDelete()) stream->Add(" (deleteable)"); 3178 if (!details_.IsDontDelete()) stream->Add(" (deleteable)");
3179 if (details_.IsReadOnly()) stream->Add(" (read-only)"); 3179 if (details_.IsReadOnly()) stream->Add(" (read-only)");
3180 } 3180 }
3181 3181
3182 3182
3183 void HStoreGlobalGeneric::PrintDataTo(StringStream* stream) { 3183 void HStoreGlobalGeneric::PrintDataTo(StringStream* stream) {
3184 stream->Add("%o = ", *name()); 3184 stream->Add("%o = ", *name());
3185 value()->PrintNameTo(stream); 3185 value()->PrintNameTo(stream);
3186 } 3186 }
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
4223 break; 4223 break;
4224 case kExternalMemory: 4224 case kExternalMemory:
4225 stream->Add("[external-memory]"); 4225 stream->Add("[external-memory]");
4226 break; 4226 break;
4227 } 4227 }
4228 4228
4229 stream->Add("@%d", offset()); 4229 stream->Add("@%d", offset());
4230 } 4230 }
4231 4231
4232 } } // namespace v8::internal 4232 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698