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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 6240012: Optimize calls to object literal properties that are initialized with a funct... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: rebased and fixed lintos 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
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/lithium-x64.h » ('j') | 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 3469 matching lines...) Expand 10 before | Expand all | Expand 10 after
3480 3480
3481 // Pick the right runtime function to call. 3481 // Pick the right runtime function to call.
3482 if (instr->hydrogen()->depth() > 1) { 3482 if (instr->hydrogen()->depth() > 1) {
3483 CallRuntime(Runtime::kCreateObjectLiteral, 4, instr); 3483 CallRuntime(Runtime::kCreateObjectLiteral, 4, instr);
3484 } else { 3484 } else {
3485 CallRuntime(Runtime::kCreateObjectLiteralShallow, 4, instr); 3485 CallRuntime(Runtime::kCreateObjectLiteralShallow, 4, instr);
3486 } 3486 }
3487 } 3487 }
3488 3488
3489 3489
3490 void LCodeGen::DoToFastProperties(LToFastProperties* instr) {
3491 ASSERT(ToRegister(instr->InputAt(0)).is(rax));
3492 __ push(rax);
3493 CallRuntime(Runtime::kToFastProperties, 1, instr);
3494 }
3495
3496
3490 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { 3497 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) {
3491 NearLabel materialized; 3498 NearLabel materialized;
3492 // Registers will be used as follows: 3499 // Registers will be used as follows:
3493 // rdi = JS function. 3500 // rdi = JS function.
3494 // rcx = literals array. 3501 // rcx = literals array.
3495 // rbx = regexp literal. 3502 // rbx = regexp literal.
3496 // rax = regexp literal clone. 3503 // rax = regexp literal clone.
3497 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 3504 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
3498 __ movq(rcx, FieldOperand(rdi, JSFunction::kLiteralsOffset)); 3505 __ movq(rcx, FieldOperand(rdi, JSFunction::kLiteralsOffset));
3499 int literal_offset = FixedArray::kHeaderSize + 3506 int literal_offset = FixedArray::kHeaderSize +
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
3812 RegisterEnvironmentForDeoptimization(environment); 3819 RegisterEnvironmentForDeoptimization(environment);
3813 ASSERT(osr_pc_offset_ == -1); 3820 ASSERT(osr_pc_offset_ == -1);
3814 osr_pc_offset_ = masm()->pc_offset(); 3821 osr_pc_offset_ = masm()->pc_offset();
3815 } 3822 }
3816 3823
3817 #undef __ 3824 #undef __
3818 3825
3819 } } // namespace v8::internal 3826 } } // namespace v8::internal
3820 3827
3821 #endif // V8_TARGET_ARCH_X64 3828 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698