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

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

Issue 805004: Do not waste space for the fast-case elements backing storage for ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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/runtime.cc ('K') | « src/x64/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 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 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 Apply(context_, rax); 896 Apply(context_, rax);
897 } 897 }
898 898
899 899
900 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { 900 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
901 Comment cmnt(masm_, "[ ObjectLiteral"); 901 Comment cmnt(masm_, "[ ObjectLiteral");
902 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 902 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
903 __ push(FieldOperand(rdi, JSFunction::kLiteralsOffset)); 903 __ push(FieldOperand(rdi, JSFunction::kLiteralsOffset));
904 __ Push(Smi::FromInt(expr->literal_index())); 904 __ Push(Smi::FromInt(expr->literal_index()));
905 __ Push(expr->constant_properties()); 905 __ Push(expr->constant_properties());
906 __ Push(Smi::FromInt(expr->fast_elements() ? 1 : 0));
906 if (expr->depth() > 1) { 907 if (expr->depth() > 1) {
907 __ CallRuntime(Runtime::kCreateObjectLiteral, 3); 908 __ CallRuntime(Runtime::kCreateObjectLiteral, 4);
908 } else { 909 } else {
909 __ CallRuntime(Runtime::kCreateObjectLiteralShallow, 3); 910 __ CallRuntime(Runtime::kCreateObjectLiteralShallow, 4);
910 } 911 }
911 912
912 // If result_saved is true the result is on top of the stack. If 913 // If result_saved is true the result is on top of the stack. If
913 // result_saved is false the result is in rax. 914 // result_saved is false the result is in rax.
914 bool result_saved = false; 915 bool result_saved = false;
915 916
916 for (int i = 0; i < expr->properties()->length(); i++) { 917 for (int i = 0; i < expr->properties()->length(); i++) {
917 ObjectLiteral::Property* property = expr->properties()->at(i); 918 ObjectLiteral::Property* property = expr->properties()->at(i);
918 if (property->IsCompileTimeValue()) continue; 919 if (property->IsCompileTimeValue()) continue;
919 920
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1984 __ movq(Operand(rsp, 0), rdx); 1985 __ movq(Operand(rsp, 0), rdx);
1985 // And return. 1986 // And return.
1986 __ ret(0); 1987 __ ret(0);
1987 } 1988 }
1988 1989
1989 1990
1990 #undef __ 1991 #undef __
1991 1992
1992 1993
1993 } } // namespace v8::internal 1994 } } // namespace v8::internal
OLDNEW
« src/runtime.cc ('K') | « src/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698