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

Side by Side Diff: src/hydrogen.cc

Issue 10392150: Remove %_SwapElements. This inlined runtime contained an optimization that was dangerous in the pr… (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 7 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/array.js ('k') | src/ia32/full-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 8117 matching lines...) Expand 10 before | Expand all | Expand 10 after
8128 ASSERT_EQ(1, call->arguments()->length()); 8128 ASSERT_EQ(1, call->arguments()->length());
8129 CHECK_ALIVE(VisitArgumentList(call->arguments())); 8129 CHECK_ALIVE(VisitArgumentList(call->arguments()));
8130 HValue* context = environment()->LookupContext(); 8130 HValue* context = environment()->LookupContext();
8131 HCallStub* result = 8131 HCallStub* result =
8132 new(zone()) HCallStub(context, CodeStub::NumberToString, 1); 8132 new(zone()) HCallStub(context, CodeStub::NumberToString, 1);
8133 Drop(1); 8133 Drop(1);
8134 return ast_context()->ReturnInstruction(result, call->id()); 8134 return ast_context()->ReturnInstruction(result, call->id());
8135 } 8135 }
8136 8136
8137 8137
8138 // Fast swapping of elements. Takes three expressions, the object and two
8139 // indices. This should only be used if the indices are known to be
8140 // non-negative and within bounds of the elements array at the call site.
8141 void HGraphBuilder::GenerateSwapElements(CallRuntime* call) {
8142 return Bailout("inlined runtime function: SwapElements");
8143 }
8144
8145
8146 // Fast call for custom callbacks. 8138 // Fast call for custom callbacks.
8147 void HGraphBuilder::GenerateCallFunction(CallRuntime* call) { 8139 void HGraphBuilder::GenerateCallFunction(CallRuntime* call) {
8148 // 1 ~ The function to call is not itself an argument to the call. 8140 // 1 ~ The function to call is not itself an argument to the call.
8149 int arg_count = call->arguments()->length() - 1; 8141 int arg_count = call->arguments()->length() - 1;
8150 ASSERT(arg_count >= 1); // There's always at least a receiver. 8142 ASSERT(arg_count >= 1); // There's always at least a receiver.
8151 8143
8152 for (int i = 0; i < arg_count; ++i) { 8144 for (int i = 0; i < arg_count; ++i) {
8153 CHECK_ALIVE(VisitArgument(call->arguments()->at(i))); 8145 CHECK_ALIVE(VisitArgument(call->arguments()->at(i)));
8154 } 8146 }
8155 CHECK_ALIVE(VisitForValue(call->arguments()->last())); 8147 CHECK_ALIVE(VisitForValue(call->arguments()->last()));
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
8860 } 8852 }
8861 } 8853 }
8862 8854
8863 #ifdef DEBUG 8855 #ifdef DEBUG
8864 if (graph_ != NULL) graph_->Verify(false); // No full verify. 8856 if (graph_ != NULL) graph_->Verify(false); // No full verify.
8865 if (allocator_ != NULL) allocator_->Verify(); 8857 if (allocator_ != NULL) allocator_->Verify();
8866 #endif 8858 #endif
8867 } 8859 }
8868 8860
8869 } } // namespace v8::internal 8861 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/array.js ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698