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

Side by Side Diff: src/hydrogen.cc

Issue 22934006: Handlify JSObject::DeepCopy method. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Toon Verwaest. 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/handles.cc ('k') | src/isolate.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 4122 matching lines...) Expand 10 before | Expand all | Expand 10 after
4133 expr->literal_index()), isolate()); 4133 expr->literal_index()), isolate());
4134 if (original_boilerplate->IsJSObject() && 4134 if (original_boilerplate->IsJSObject() &&
4135 IsFastLiteral(Handle<JSObject>::cast(original_boilerplate), 4135 IsFastLiteral(Handle<JSObject>::cast(original_boilerplate),
4136 kMaxFastLiteralDepth, 4136 kMaxFastLiteralDepth,
4137 &max_properties, 4137 &max_properties,
4138 &data_size, 4138 &data_size,
4139 &pointer_size)) { 4139 &pointer_size)) {
4140 Handle<JSObject> original_boilerplate_object = 4140 Handle<JSObject> original_boilerplate_object =
4141 Handle<JSObject>::cast(original_boilerplate); 4141 Handle<JSObject>::cast(original_boilerplate);
4142 Handle<JSObject> boilerplate_object = 4142 Handle<JSObject> boilerplate_object =
4143 DeepCopy(original_boilerplate_object); 4143 JSObject::DeepCopy(original_boilerplate_object);
4144 4144
4145 literal = BuildFastLiteral(context, 4145 literal = BuildFastLiteral(context,
4146 boilerplate_object, 4146 boilerplate_object,
4147 original_boilerplate_object, 4147 original_boilerplate_object,
4148 Handle<Object>::null(), 4148 Handle<Object>::null(),
4149 data_size, 4149 data_size,
4150 pointer_size, 4150 pointer_size,
4151 DONT_TRACK_ALLOCATION_SITE); 4151 DONT_TRACK_ALLOCATION_SITE);
4152 } else { 4152 } else {
4153 NoObservableSideEffectsScope no_effects(this); 4153 NoObservableSideEffectsScope no_effects(this);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
4301 HCheckMaps* type_check = NULL; 4301 HCheckMaps* type_check = NULL;
4302 if (IsFastLiteral(original_boilerplate_object, 4302 if (IsFastLiteral(original_boilerplate_object,
4303 kMaxFastLiteralDepth, 4303 kMaxFastLiteralDepth,
4304 &max_properties, 4304 &max_properties,
4305 &data_size, 4305 &data_size,
4306 &pointer_size)) { 4306 &pointer_size)) {
4307 if (mode == TRACK_ALLOCATION_SITE) { 4307 if (mode == TRACK_ALLOCATION_SITE) {
4308 pointer_size += AllocationMemento::kSize; 4308 pointer_size += AllocationMemento::kSize;
4309 } 4309 }
4310 4310
4311 Handle<JSObject> boilerplate_object = DeepCopy(original_boilerplate_object); 4311 Handle<JSObject> boilerplate_object =
4312 JSObject::DeepCopy(original_boilerplate_object);
4312 literal = BuildFastLiteral(context, 4313 literal = BuildFastLiteral(context,
4313 boilerplate_object, 4314 boilerplate_object,
4314 original_boilerplate_object, 4315 original_boilerplate_object,
4315 site, 4316 site,
4316 data_size, 4317 data_size,
4317 pointer_size, 4318 pointer_size,
4318 mode); 4319 mode);
4319 } else { 4320 } else {
4320 NoObservableSideEffectsScope no_effects(this); 4321 NoObservableSideEffectsScope no_effects(this);
4321 // Boilerplate already exists and constant elements are never accessed, 4322 // Boilerplate already exists and constant elements are never accessed,
(...skipping 5507 matching lines...) Expand 10 before | Expand all | Expand 10 after
9829 if (ShouldProduceTraceOutput()) { 9830 if (ShouldProduceTraceOutput()) {
9830 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9831 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9831 } 9832 }
9832 9833
9833 #ifdef DEBUG 9834 #ifdef DEBUG
9834 graph_->Verify(false); // No full verify. 9835 graph_->Verify(false); // No full verify.
9835 #endif 9836 #endif
9836 } 9837 }
9837 9838
9838 } } // namespace v8::internal 9839 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698