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

Side by Side Diff: src/hydrogen.cc

Issue 11931012: Fix arguments materialization for inlined apply(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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 | « no previous file | src/hydrogen-instructions.h » ('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 7530 matching lines...) Expand 10 before | Expand all | Expand 10 after
7541 HInstruction* result = 7541 HInstruction* result =
7542 new(zone()) HApplyArguments(function, 7542 new(zone()) HApplyArguments(function,
7543 wrapped_receiver, 7543 wrapped_receiver,
7544 length, 7544 length,
7545 elements); 7545 elements);
7546 result->set_position(expr->position()); 7546 result->set_position(expr->position());
7547 ast_context()->ReturnInstruction(result, expr->id()); 7547 ast_context()->ReturnInstruction(result, expr->id());
7548 return true; 7548 return true;
7549 } else { 7549 } else {
7550 // We are inside inlined function and we know exactly what is inside 7550 // We are inside inlined function and we know exactly what is inside
7551 // arguments object. 7551 // arguments object. But we need to be able to materialize at deopt.
7552 // TODO(mstarzinger): For now we just ensure arguments are pushed
7553 // right after HEnterInlined, but we could be smarter about this.
7554 EnsureArgumentsArePushedForAccess();
7552 HValue* context = environment()->LookupContext(); 7555 HValue* context = environment()->LookupContext();
7553 7556
7554 HValue* wrapped_receiver = 7557 HValue* wrapped_receiver =
7555 AddInstruction(new(zone()) HWrapReceiver(receiver, function)); 7558 AddInstruction(new(zone()) HWrapReceiver(receiver, function));
7556 PushAndAdd(new(zone()) HPushArgument(wrapped_receiver)); 7559 PushAndAdd(new(zone()) HPushArgument(wrapped_receiver));
7557 7560
7558 HEnvironment* arguments_env = environment()->arguments_environment(); 7561 HEnvironment* arguments_env = environment()->arguments_environment();
7559 7562
7560 int parameter_count = arguments_env->parameter_count(); 7563 int parameter_count = arguments_env->parameter_count();
7561 for (int i = 1; i < arguments_env->parameter_count(); i++) { 7564 for (int i = 1; i < arguments_env->parameter_count(); i++) {
(...skipping 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after
10200 } 10203 }
10201 } 10204 }
10202 10205
10203 #ifdef DEBUG 10206 #ifdef DEBUG
10204 if (graph_ != NULL) graph_->Verify(false); // No full verify. 10207 if (graph_ != NULL) graph_->Verify(false); // No full verify.
10205 if (allocator_ != NULL) allocator_->Verify(); 10208 if (allocator_ != NULL) allocator_->Verify();
10206 #endif 10209 #endif
10207 } 10210 }
10208 10211
10209 } } // namespace v8::internal 10212 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698