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

Side by Side Diff: src/hydrogen.cc

Issue 8417035: Introduce extended mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 9 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 6669 matching lines...) Expand 10 before | Expand all | Expand 10 after
6680 HEnvironment* inner = 6680 HEnvironment* inner =
6681 new(zone) HEnvironment(outer, function->scope(), target); 6681 new(zone) HEnvironment(outer, function->scope(), target);
6682 // Get the argument values from the original environment. 6682 // Get the argument values from the original environment.
6683 for (int i = 0; i <= arity; ++i) { // Include receiver. 6683 for (int i = 0; i <= arity; ++i) { // Include receiver.
6684 HValue* push = ExpressionStackAt(arity - i); 6684 HValue* push = ExpressionStackAt(arity - i);
6685 inner->SetValueAt(i, push); 6685 inner->SetValueAt(i, push);
6686 } 6686 }
6687 // If the function we are inlining is a strict mode function or a 6687 // If the function we are inlining is a strict mode function or a
6688 // builtin function, pass undefined as the receiver for function 6688 // builtin function, pass undefined as the receiver for function
6689 // calls (instead of the global receiver). 6689 // calls (instead of the global receiver).
6690 if ((target->shared()->native() || function->strict_mode()) && 6690 if ((target->shared()->native() || !function->is_classic_mode()) &&
6691 call_kind == CALL_AS_FUNCTION) { 6691 call_kind == CALL_AS_FUNCTION) {
6692 inner->SetValueAt(0, undefined); 6692 inner->SetValueAt(0, undefined);
6693 } 6693 }
6694 inner->SetValueAt(arity + 1, outer->LookupContext()); 6694 inner->SetValueAt(arity + 1, outer->LookupContext());
6695 for (int i = arity + 2; i < inner->length(); ++i) { 6695 for (int i = arity + 2; i < inner->length(); ++i) {
6696 inner->SetValueAt(i, undefined); 6696 inner->SetValueAt(i, undefined);
6697 } 6697 }
6698 6698
6699 inner->set_ast_id(AstNode::kFunctionEntryId); 6699 inner->set_ast_id(AstNode::kFunctionEntryId);
6700 return inner; 6700 return inner;
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
7033 } 7033 }
7034 } 7034 }
7035 7035
7036 #ifdef DEBUG 7036 #ifdef DEBUG
7037 if (graph_ != NULL) graph_->Verify(false); // No full verify. 7037 if (graph_ != NULL) graph_->Verify(false); // No full verify.
7038 if (allocator_ != NULL) allocator_->Verify(); 7038 if (allocator_ != NULL) allocator_->Verify();
7039 #endif 7039 #endif
7040 } 7040 }
7041 7041
7042 } } // namespace v8::internal 7042 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.h ('k') | src/hydrogen-instructions.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698