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

Side by Side Diff: src/ia32/codegen-ia32.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
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 4762 matching lines...) Expand 10 before | Expand all | Expand 10 after
4773 4773
4774 // Load the literals array of the function. 4774 // Load the literals array of the function.
4775 __ mov(literals.reg(), 4775 __ mov(literals.reg(),
4776 FieldOperand(literals.reg(), JSFunction::kLiteralsOffset)); 4776 FieldOperand(literals.reg(), JSFunction::kLiteralsOffset));
4777 // Literal array. 4777 // Literal array.
4778 frame_->Push(&literals); 4778 frame_->Push(&literals);
4779 // Literal index. 4779 // Literal index.
4780 frame_->Push(Smi::FromInt(node->literal_index())); 4780 frame_->Push(Smi::FromInt(node->literal_index()));
4781 // Constant properties. 4781 // Constant properties.
4782 frame_->Push(node->constant_properties()); 4782 frame_->Push(node->constant_properties());
4783 // Should the object literal have fast elements?
4784 frame_->Push(Smi::FromInt(node->fast_elements() ? 1 : 0));
4783 Result clone; 4785 Result clone;
4784 if (node->depth() > 1) { 4786 if (node->depth() > 1) {
4785 clone = frame_->CallRuntime(Runtime::kCreateObjectLiteral, 3); 4787 clone = frame_->CallRuntime(Runtime::kCreateObjectLiteral, 4);
4786 } else { 4788 } else {
4787 clone = frame_->CallRuntime(Runtime::kCreateObjectLiteralShallow, 3); 4789 clone = frame_->CallRuntime(Runtime::kCreateObjectLiteralShallow, 4);
4788 } 4790 }
4789 frame_->Push(&clone); 4791 frame_->Push(&clone);
4790 4792
4791 for (int i = 0; i < node->properties()->length(); i++) { 4793 for (int i = 0; i < node->properties()->length(); i++) {
4792 ObjectLiteral::Property* property = node->properties()->at(i); 4794 ObjectLiteral::Property* property = node->properties()->at(i);
4793 switch (property->kind()) { 4795 switch (property->kind()) {
4794 case ObjectLiteral::Property::CONSTANT: 4796 case ObjectLiteral::Property::CONSTANT:
4795 break; 4797 break;
4796 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 4798 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
4797 if (CompileTimeValue::IsCompileTimeValue(property->value())) break; 4799 if (CompileTimeValue::IsCompileTimeValue(property->value())) break;
(...skipping 7008 matching lines...) Expand 10 before | Expand all | Expand 10 after
11806 11808
11807 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) 11809 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater)
11808 // tagged as a small integer. 11810 // tagged as a small integer.
11809 __ bind(&runtime); 11811 __ bind(&runtime);
11810 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); 11812 __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
11811 } 11813 }
11812 11814
11813 #undef __ 11815 #undef __
11814 11816
11815 } } // namespace v8::internal 11817 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698