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

Side by Side Diff: src/arm/lithium-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 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 3699 matching lines...) Expand 10 before | Expand all | Expand 10 after
3710 __ str(r3, FieldMemOperand(r0, size - kPointerSize)); 3710 __ str(r3, FieldMemOperand(r0, size - kPointerSize));
3711 } 3711 }
3712 } 3712 }
3713 3713
3714 3714
3715 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { 3715 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
3716 // Use the fast case closure allocation code that allocates in new 3716 // Use the fast case closure allocation code that allocates in new
3717 // space for nested functions that don't need literals cloning. 3717 // space for nested functions that don't need literals cloning.
3718 Handle<SharedFunctionInfo> shared_info = instr->shared_info(); 3718 Handle<SharedFunctionInfo> shared_info = instr->shared_info();
3719 bool pretenure = instr->hydrogen()->pretenure(); 3719 bool pretenure = instr->hydrogen()->pretenure();
3720 if (!pretenure && shared_info->num_literals() == 0 && 3720 if (!pretenure && shared_info->num_literals() == 0) {
3721 !shared_info->strict_mode()) { // Strict mode functions use slow path. 3721 FastNewClosureStub stub(
3722 FastNewClosureStub stub; 3722 shared_info->strict_mode() ? kStrictMode : kNonStrictMode);
3723 __ mov(r1, Operand(shared_info)); 3723 __ mov(r1, Operand(shared_info));
3724 __ push(r1); 3724 __ push(r1);
3725 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3725 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3726 } else { 3726 } else {
3727 __ mov(r2, Operand(shared_info)); 3727 __ mov(r2, Operand(shared_info));
3728 __ mov(r1, Operand(pretenure 3728 __ mov(r1, Operand(pretenure
3729 ? Factory::true_value() 3729 ? Factory::true_value()
3730 : Factory::false_value())); 3730 : Factory::false_value()));
3731 __ Push(cp, r2, r1); 3731 __ Push(cp, r2, r1);
3732 CallRuntime(Runtime::kNewClosure, 3, instr); 3732 CallRuntime(Runtime::kNewClosure, 3, instr);
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
3948 ASSERT(!environment->HasBeenRegistered()); 3948 ASSERT(!environment->HasBeenRegistered());
3949 RegisterEnvironmentForDeoptimization(environment); 3949 RegisterEnvironmentForDeoptimization(environment);
3950 ASSERT(osr_pc_offset_ == -1); 3950 ASSERT(osr_pc_offset_ == -1);
3951 osr_pc_offset_ = masm()->pc_offset(); 3951 osr_pc_offset_ = masm()->pc_offset();
3952 } 3952 }
3953 3953
3954 3954
3955 #undef __ 3955 #undef __
3956 3956
3957 } } // namespace v8::internal 3957 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/bootstrapper.cc » ('j') | src/bootstrapper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698