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

Side by Side Diff: src/ia32/fast-codegen-ia32.cc

Issue 340005: In the toplevel compiler, shift the responsibility of assigning a... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } else { 260 } else {
261 __ CallRuntime(Runtime::kCloneLiteralBoilerplate, 1); 261 __ CallRuntime(Runtime::kCloneLiteralBoilerplate, 1);
262 } 262 }
263 263
264 // If result_saved == true: the result is saved on top of the stack. 264 // If result_saved == true: the result is saved on top of the stack.
265 // If result_saved == false: the result not on the stack, just is in eax. 265 // If result_saved == false: the result not on the stack, just is in eax.
266 bool result_saved = false; 266 bool result_saved = false;
267 267
268 for (int i = 0; i < expr->properties()->length(); i++) { 268 for (int i = 0; i < expr->properties()->length(); i++) {
269 ObjectLiteral::Property* property = expr->properties()->at(i); 269 ObjectLiteral::Property* property = expr->properties()->at(i);
270 if (property->IsCompileTimeValue()) continue;
271
270 Literal* key = property->key(); 272 Literal* key = property->key();
271 Expression* value = property->value(); 273 Expression* value = property->value();
272 if (property->kind() == ObjectLiteral::Property::CONSTANT) continue;
273 if (property->kind() == ObjectLiteral::Property::MATERIALIZED_LITERAL &&
274 CompileTimeValue::IsCompileTimeValue(value)) {
275 continue;
276 }
277 if (!result_saved) { 274 if (!result_saved) {
278 __ push(eax); // Save result on the stack 275 __ push(eax); // Save result on the stack
279 result_saved = true; 276 result_saved = true;
280 } 277 }
281 switch (property->kind()) { 278 switch (property->kind()) {
282 case ObjectLiteral::Property::MATERIALIZED_LITERAL: // fall through 279 case ObjectLiteral::Property::MATERIALIZED_LITERAL: // fall through
283 ASSERT(!CompileTimeValue::IsCompileTimeValue(value)); 280 ASSERT(!CompileTimeValue::IsCompileTimeValue(value));
284 case ObjectLiteral::Property::COMPUTED: 281 case ObjectLiteral::Property::COMPUTED:
285 if (key->handle()->IsSymbol()) { 282 if (key->handle()->IsSymbol()) {
286 Visit(value); 283 Visit(value);
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 } else { 701 } else {
705 Visit(right); 702 Visit(right);
706 Move(destination, right->location()); 703 Move(destination, right->location());
707 } 704 }
708 705
709 __ bind(&done); 706 __ bind(&done);
710 } 707 }
711 708
712 709
713 } } // namespace v8::internal 710 } } // namespace v8::internal
OLDNEW
« src/compiler.cc ('K') | « src/compiler.cc ('k') | src/x64/fast-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698