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

Side by Side Diff: src/hydrogen.cc

Issue 225283005: Return MaybeHandle from SetProperty. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 6 years, 8 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/i18n.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 5195 matching lines...) Expand 10 before | Expand all | Expand 10 after
5206 HInstruction* literal; 5206 HInstruction* literal;
5207 5207
5208 Handle<AllocationSite> site; 5208 Handle<AllocationSite> site;
5209 Handle<FixedArray> literals(environment()->closure()->literals(), isolate()); 5209 Handle<FixedArray> literals(environment()->closure()->literals(), isolate());
5210 bool uninitialized = false; 5210 bool uninitialized = false;
5211 Handle<Object> literals_cell(literals->get(expr->literal_index()), 5211 Handle<Object> literals_cell(literals->get(expr->literal_index()),
5212 isolate()); 5212 isolate());
5213 Handle<JSObject> boilerplate_object; 5213 Handle<JSObject> boilerplate_object;
5214 if (literals_cell->IsUndefined()) { 5214 if (literals_cell->IsUndefined()) {
5215 uninitialized = true; 5215 uninitialized = true;
5216 Handle<Object> raw_boilerplate = Runtime::CreateArrayLiteralBoilerplate( 5216 Handle<Object> raw_boilerplate;
5217 isolate(), literals, expr->constant_elements()); 5217 ASSIGN_RETURN_ON_EXCEPTION_VALUE(
5218 if (raw_boilerplate.is_null()) { 5218 isolate(), raw_boilerplate,
5219 return Bailout(kArrayBoilerplateCreationFailed); 5219 Runtime::CreateArrayLiteralBoilerplate(
5220 } 5220 isolate(), literals, expr->constant_elements()),
5221 Bailout(kArrayBoilerplateCreationFailed));
5221 5222
5222 boilerplate_object = Handle<JSObject>::cast(raw_boilerplate); 5223 boilerplate_object = Handle<JSObject>::cast(raw_boilerplate);
5223 AllocationSiteCreationContext creation_context(isolate()); 5224 AllocationSiteCreationContext creation_context(isolate());
5224 site = creation_context.EnterNewScope(); 5225 site = creation_context.EnterNewScope();
5225 if (JSObject::DeepWalk(boilerplate_object, &creation_context).is_null()) { 5226 if (JSObject::DeepWalk(boilerplate_object, &creation_context).is_null()) {
5226 return Bailout(kArrayBoilerplateCreationFailed); 5227 return Bailout(kArrayBoilerplateCreationFailed);
5227 } 5228 }
5228 creation_context.ExitScope(site, boilerplate_object); 5229 creation_context.ExitScope(site, boilerplate_object);
5229 literals->set(expr->literal_index(), *site); 5230 literals->set(expr->literal_index(), *site);
5230 5231
(...skipping 6270 matching lines...) Expand 10 before | Expand all | Expand 10 after
11501 if (ShouldProduceTraceOutput()) { 11502 if (ShouldProduceTraceOutput()) {
11502 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11503 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11503 } 11504 }
11504 11505
11505 #ifdef DEBUG 11506 #ifdef DEBUG
11506 graph_->Verify(false); // No full verify. 11507 graph_->Verify(false); // No full verify.
11507 #endif 11508 #endif
11508 } 11509 }
11509 11510
11510 } } // namespace v8::internal 11511 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/i18n.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698