| OLD | NEW |
| 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 7675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7686 // Get the argument values from the original environment. | 7686 // Get the argument values from the original environment. |
| 7687 for (int i = 0; i <= arity; ++i) { // Include receiver. | 7687 for (int i = 0; i <= arity; ++i) { // Include receiver. |
| 7688 HValue* push = (i <= arguments) ? | 7688 HValue* push = (i <= arguments) ? |
| 7689 ExpressionStackAt(arguments - i) : undefined; | 7689 ExpressionStackAt(arguments - i) : undefined; |
| 7690 inner->SetValueAt(i, push); | 7690 inner->SetValueAt(i, push); |
| 7691 } | 7691 } |
| 7692 // If the function we are inlining is a strict mode function or a | 7692 // If the function we are inlining is a strict mode function or a |
| 7693 // builtin function, pass undefined as the receiver for function | 7693 // builtin function, pass undefined as the receiver for function |
| 7694 // calls (instead of the global receiver). | 7694 // calls (instead of the global receiver). |
| 7695 if ((target->shared()->native() || !function->is_classic_mode()) && | 7695 if ((target->shared()->native() || !function->is_classic_mode()) && |
| 7696 call_kind == CALL_AS_FUNCTION) { | 7696 call_kind == CALL_AS_FUNCTION && !is_construct) { |
| 7697 inner->SetValueAt(0, undefined); | 7697 inner->SetValueAt(0, undefined); |
| 7698 } | 7698 } |
| 7699 inner->SetValueAt(arity + 1, LookupContext()); | 7699 inner->SetValueAt(arity + 1, LookupContext()); |
| 7700 for (int i = arity + 2; i < inner->length(); ++i) { | 7700 for (int i = arity + 2; i < inner->length(); ++i) { |
| 7701 inner->SetValueAt(i, undefined); | 7701 inner->SetValueAt(i, undefined); |
| 7702 } | 7702 } |
| 7703 | 7703 |
| 7704 inner->set_ast_id(AstNode::kFunctionEntryId); | 7704 inner->set_ast_id(AstNode::kFunctionEntryId); |
| 7705 return inner; | 7705 return inner; |
| 7706 } | 7706 } |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8047 } | 8047 } |
| 8048 } | 8048 } |
| 8049 | 8049 |
| 8050 #ifdef DEBUG | 8050 #ifdef DEBUG |
| 8051 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 8051 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 8052 if (allocator_ != NULL) allocator_->Verify(); | 8052 if (allocator_ != NULL) allocator_->Verify(); |
| 8053 #endif | 8053 #endif |
| 8054 } | 8054 } |
| 8055 | 8055 |
| 8056 } } // namespace v8::internal | 8056 } } // namespace v8::internal |
| OLD | NEW |