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

Side by Side Diff: src/arm/codegen-arm.cc

Issue 6677036: Fast path for strict closure creation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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
OLDNEW
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 3096 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 (!pretenure &&
3116 scope()->is_function_scope() && 3116 scope()->is_function_scope() &&
3117 function_info->num_literals() == 0 && 3117 function_info->num_literals() == 0) {
3118 !function_info->strict_mode()) { // Strict mode functions use slow path. 3118 FastNewClosureStub stub(
3119 FastNewClosureStub stub; 3119 function_info->strict_mode() ? kStrictMode : kNonStrictMode);
3120 frame_->EmitPush(Operand(function_info)); 3120 frame_->EmitPush(Operand(function_info));
3121 frame_->SpillAll(); 3121 frame_->SpillAll();
3122 frame_->CallStub(&stub, 1); 3122 frame_->CallStub(&stub, 1);
3123 frame_->EmitPush(r0); 3123 frame_->EmitPush(r0);
3124 } else { 3124 } else {
3125 // Create a new closure. 3125 // Create a new closure.
3126 frame_->EmitPush(cp); 3126 frame_->EmitPush(cp);
3127 frame_->EmitPush(Operand(function_info)); 3127 frame_->EmitPush(Operand(function_info));
3128 frame_->EmitPush(Operand(pretenure 3128 frame_->EmitPush(Operand(pretenure
3129 ? Factory::true_value() 3129 ? Factory::true_value()
(...skipping 4274 matching lines...) Expand 10 before | Expand all | Expand 10 after
7404 BinaryOpIC::GetName(runtime_operands_type_)); 7404 BinaryOpIC::GetName(runtime_operands_type_));
7405 return name_; 7405 return name_;
7406 } 7406 }
7407 7407
7408 7408
7409 #undef __ 7409 #undef __
7410 7410
7411 } } // namespace v8::internal 7411 } } // namespace v8::internal
7412 7412
7413 #endif // V8_TARGET_ARCH_ARM 7413 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/full-codegen-arm.cc » ('j') | src/bootstrapper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698