OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 3094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3105 // Ignore the return value. | 3105 // Ignore the return value. |
3106 ASSERT(frame_->height() == original_height); | 3106 ASSERT(frame_->height() == original_height); |
3107 } | 3107 } |
3108 | 3108 |
3109 | 3109 |
3110 void CodeGenerator::InstantiateFunction( | 3110 void CodeGenerator::InstantiateFunction( |
3111 Handle<SharedFunctionInfo> function_info, | 3111 Handle<SharedFunctionInfo> function_info, |
3112 bool pretenure) { | 3112 bool pretenure) { |
3113 // Use the fast case closure allocation code that allocates in new | 3113 // Use the fast case closure allocation code that allocates in new |
3114 // space for nested functions that don't need literals cloning. | 3114 // space for nested functions that don't need literals cloning. |
3115 if (!pretenure && | 3115 if (scope()->is_function_scope() && |
3116 scope()->is_function_scope() && | |
3117 function_info->num_literals() == 0 && | 3116 function_info->num_literals() == 0 && |
3118 !function_info->strict_mode()) { // Strict mode functions use slow path. | 3117 !pretenure) { |
3119 FastNewClosureStub stub; | 3118 FastNewClosureStub stub; |
3120 frame_->EmitPush(Operand(function_info)); | 3119 frame_->EmitPush(Operand(function_info)); |
3121 frame_->SpillAll(); | 3120 frame_->SpillAll(); |
3122 frame_->CallStub(&stub, 1); | 3121 frame_->CallStub(&stub, 1); |
3123 frame_->EmitPush(r0); | 3122 frame_->EmitPush(r0); |
3124 } else { | 3123 } else { |
3125 // Create a new closure. | 3124 // Create a new closure. |
3126 frame_->EmitPush(cp); | 3125 frame_->EmitPush(cp); |
3127 frame_->EmitPush(Operand(function_info)); | 3126 frame_->EmitPush(Operand(function_info)); |
3128 frame_->EmitPush(Operand(pretenure | 3127 frame_->EmitPush(Operand(pretenure |
(...skipping 4277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7406 BinaryOpIC::GetName(runtime_operands_type_)); | 7405 BinaryOpIC::GetName(runtime_operands_type_)); |
7407 return name_; | 7406 return name_; |
7408 } | 7407 } |
7409 | 7408 |
7410 | 7409 |
7411 #undef __ | 7410 #undef __ |
7412 | 7411 |
7413 } } // namespace v8::internal | 7412 } } // namespace v8::internal |
7414 | 7413 |
7415 #endif // V8_TARGET_ARCH_ARM | 7414 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |