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

Side by Side Diff: src/x64/lithium-codegen-x64.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
« src/ia32/code-stubs-ia32.cc ('K') | « src/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3478 matching lines...) Expand 10 before | Expand all | Expand 10 after
3489 __ movq(FieldOperand(rax, size - kPointerSize), rdx); 3489 __ movq(FieldOperand(rax, size - kPointerSize), rdx);
3490 } 3490 }
3491 } 3491 }
3492 3492
3493 3493
3494 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { 3494 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
3495 // Use the fast case closure allocation code that allocates in new 3495 // Use the fast case closure allocation code that allocates in new
3496 // space for nested functions that don't need literals cloning. 3496 // space for nested functions that don't need literals cloning.
3497 Handle<SharedFunctionInfo> shared_info = instr->shared_info(); 3497 Handle<SharedFunctionInfo> shared_info = instr->shared_info();
3498 bool pretenure = instr->hydrogen()->pretenure(); 3498 bool pretenure = instr->hydrogen()->pretenure();
3499 if (!pretenure && shared_info->num_literals() == 0 && 3499 if (!pretenure && shared_info->num_literals() == 0) {
3500 !shared_info->strict_mode()) { 3500 FastNewClosureStub stub(
3501 FastNewClosureStub stub; 3501 shared_info->strict_mode() ? kStrictMode : kNonStrictMode);
3502 __ Push(shared_info); 3502 __ Push(shared_info);
3503 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3503 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3504 } else { 3504 } else {
3505 __ push(rsi); 3505 __ push(rsi);
3506 __ Push(shared_info); 3506 __ Push(shared_info);
3507 __ PushRoot(pretenure ? 3507 __ PushRoot(pretenure ?
3508 Heap::kTrueValueRootIndex : 3508 Heap::kTrueValueRootIndex :
3509 Heap::kFalseValueRootIndex); 3509 Heap::kFalseValueRootIndex);
3510 CallRuntime(Runtime::kNewClosure, 3, instr); 3510 CallRuntime(Runtime::kNewClosure, 3, instr);
3511 } 3511 }
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
3764 RegisterEnvironmentForDeoptimization(environment); 3764 RegisterEnvironmentForDeoptimization(environment);
3765 ASSERT(osr_pc_offset_ == -1); 3765 ASSERT(osr_pc_offset_ == -1);
3766 osr_pc_offset_ = masm()->pc_offset(); 3766 osr_pc_offset_ = masm()->pc_offset();
3767 } 3767 }
3768 3768
3769 #undef __ 3769 #undef __
3770 3770
3771 } } // namespace v8::internal 3771 } } // namespace v8::internal
3772 3772
3773 #endif // V8_TARGET_ARCH_X64 3773 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/ia32/code-stubs-ia32.cc ('K') | « src/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698