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

Side by Side Diff: src/hydrogen.cc

Issue 201563004: Merged r18548 into 3.23 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.23
Patch Set: Created 6 years, 9 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/version.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 7535 matching lines...) Expand 10 before | Expand all | Expand 10 after
7546 VariableProxy* arg_two = args->at(1)->AsVariableProxy(); 7546 VariableProxy* arg_two = args->at(1)->AsVariableProxy();
7547 if (arg_two == NULL || !arg_two->var()->IsStackAllocated()) return false; 7547 if (arg_two == NULL || !arg_two->var()->IsStackAllocated()) return false;
7548 HValue* arg_two_value = LookupAndMakeLive(arg_two->var()); 7548 HValue* arg_two_value = LookupAndMakeLive(arg_two->var());
7549 if (!arg_two_value->CheckFlag(HValue::kIsArguments)) return false; 7549 if (!arg_two_value->CheckFlag(HValue::kIsArguments)) return false;
7550 7550
7551 // Found pattern f.apply(receiver, arguments). 7551 // Found pattern f.apply(receiver, arguments).
7552 CHECK_ALIVE_OR_RETURN(VisitForValue(prop->obj()), true); 7552 CHECK_ALIVE_OR_RETURN(VisitForValue(prop->obj()), true);
7553 HValue* function = Top(); 7553 HValue* function = Top();
7554 7554
7555 AddCheckConstantFunction(expr->holder(), function, function_map); 7555 AddCheckConstantFunction(expr->holder(), function, function_map);
7556 Drop(1);
7557 7556
7558 CHECK_ALIVE_OR_RETURN(VisitForValue(args->at(0)), true); 7557 CHECK_ALIVE_OR_RETURN(VisitForValue(args->at(0)), true);
7559 HValue* receiver = Pop(); 7558 HValue* receiver = Pop();
7560 7559
7560 Drop(1); // Pop the function.
7561
7561 if (function_state()->outer() == NULL) { 7562 if (function_state()->outer() == NULL) {
7562 HInstruction* elements = Add<HArgumentsElements>(false); 7563 HInstruction* elements = Add<HArgumentsElements>(false);
7563 HInstruction* length = Add<HArgumentsLength>(elements); 7564 HInstruction* length = Add<HArgumentsLength>(elements);
7564 HValue* wrapped_receiver = BuildWrapReceiver(receiver, function); 7565 HValue* wrapped_receiver = BuildWrapReceiver(receiver, function);
7565 HInstruction* result = New<HApplyArguments>(function, 7566 HInstruction* result = New<HApplyArguments>(function,
7566 wrapped_receiver, 7567 wrapped_receiver,
7567 length, 7568 length,
7568 elements); 7569 elements);
7569 ast_context()->ReturnInstruction(result, expr->id()); 7570 ast_context()->ReturnInstruction(result, expr->id());
7570 return true; 7571 return true;
(...skipping 3248 matching lines...) Expand 10 before | Expand all | Expand 10 after
10819 if (ShouldProduceTraceOutput()) { 10820 if (ShouldProduceTraceOutput()) {
10820 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 10821 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
10821 } 10822 }
10822 10823
10823 #ifdef DEBUG 10824 #ifdef DEBUG
10824 graph_->Verify(false); // No full verify. 10825 graph_->Verify(false); // No full verify.
10825 #endif 10826 #endif
10826 } 10827 }
10827 10828
10828 } } // namespace v8::internal 10829 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698