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

Side by Side Diff: src/hydrogen.cc

Issue 54333003: Remove CreateArrayLiteralShallow (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comments and a test. Created 7 years, 1 month 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/arm/full-codegen-arm.cc ('k') | src/ia32/code-stubs-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 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 4480 matching lines...) Expand 10 before | Expand all | Expand 10 after
4491 Handle<FixedArray> constants = isolate()->factory()->empty_fixed_array(); 4491 Handle<FixedArray> constants = isolate()->factory()->empty_fixed_array();
4492 int literal_index = expr->literal_index(); 4492 int literal_index = expr->literal_index();
4493 4493
4494 Add<HPushArgument>(Add<HConstant>(literals)); 4494 Add<HPushArgument>(Add<HConstant>(literals));
4495 Add<HPushArgument>(Add<HConstant>(literal_index)); 4495 Add<HPushArgument>(Add<HConstant>(literal_index));
4496 Add<HPushArgument>(Add<HConstant>(constants)); 4496 Add<HPushArgument>(Add<HConstant>(constants));
4497 4497
4498 // TODO(mvstanton): Consider a flag to turn off creation of any 4498 // TODO(mvstanton): Consider a flag to turn off creation of any
4499 // AllocationMementos for this call: we are in crankshaft and should have 4499 // AllocationMementos for this call: we are in crankshaft and should have
4500 // learned enough about transition behavior to stop emitting mementos. 4500 // learned enough about transition behavior to stop emitting mementos.
4501 Runtime::FunctionId function_id = (expr->depth() > 1) 4501 Runtime::FunctionId function_id = Runtime::kCreateArrayLiteral;
4502 ? Runtime::kCreateArrayLiteral : Runtime::kCreateArrayLiteralShallow;
4503 literal = Add<HCallRuntime>(isolate()->factory()->empty_string(), 4502 literal = Add<HCallRuntime>(isolate()->factory()->empty_string(),
4504 Runtime::FunctionForId(function_id), 4503 Runtime::FunctionForId(function_id),
4505 3); 4504 3);
4506 4505
4507 // De-opt if elements kind changed from boilerplate_elements_kind. 4506 // De-opt if elements kind changed from boilerplate_elements_kind.
4508 Handle<Map> map = Handle<Map>(boilerplate_object->map(), isolate()); 4507 Handle<Map> map = Handle<Map>(boilerplate_object->map(), isolate());
4509 literal = Add<HCheckMaps>(literal, map, top_info()); 4508 literal = Add<HCheckMaps>(literal, map, top_info());
4510 } 4509 }
4511 4510
4512 // The array is expected in the bailout environment during computation 4511 // The array is expected in the bailout environment during computation
(...skipping 5311 matching lines...) Expand 10 before | Expand all | Expand 10 after
9824 if (ShouldProduceTraceOutput()) { 9823 if (ShouldProduceTraceOutput()) {
9825 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9824 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9826 } 9825 }
9827 9826
9828 #ifdef DEBUG 9827 #ifdef DEBUG
9829 graph_->Verify(false); // No full verify. 9828 graph_->Verify(false); // No full verify.
9830 #endif 9829 #endif
9831 } 9830 }
9832 9831
9833 } } // namespace v8::internal 9832 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698