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

Side by Side Diff: src/x64/fast-codegen-x64.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
« src/compiler.cc ('K') | « src/ia32/fast-codegen-ia32.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 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } else { 271 } else {
272 __ CallRuntime(Runtime::kCloneLiteralBoilerplate, 1); 272 __ CallRuntime(Runtime::kCloneLiteralBoilerplate, 1);
273 } 273 }
274 274
275 // If result_saved == true: the result is saved on top of the stack. 275 // If result_saved == true: the result is saved on top of the stack.
276 // If result_saved == false: the result is not on the stack, just in rax. 276 // If result_saved == false: the result is not on the stack, just in rax.
277 bool result_saved = false; 277 bool result_saved = false;
278 278
279 for (int i = 0; i < expr->properties()->length(); i++) { 279 for (int i = 0; i < expr->properties()->length(); i++) {
280 ObjectLiteral::Property* property = expr->properties()->at(i); 280 ObjectLiteral::Property* property = expr->properties()->at(i);
281 if (property->IsCompileTimeValue()) continue;
282
281 Literal* key = property->key(); 283 Literal* key = property->key();
282 Expression* value = property->value(); 284 Expression* value = property->value();
283 if (property->kind() == ObjectLiteral::Property::CONSTANT) continue;
284 if (property->kind() == ObjectLiteral::Property::MATERIALIZED_LITERAL &&
285 CompileTimeValue::IsCompileTimeValue(value)) {
286 continue;
287 }
288 if (!result_saved) { 285 if (!result_saved) {
289 __ push(rax); // Save result on the stack 286 __ push(rax); // Save result on the stack
290 result_saved = true; 287 result_saved = true;
291 } 288 }
292 switch (property->kind()) { 289 switch (property->kind()) {
293 case ObjectLiteral::Property::MATERIALIZED_LITERAL: // fall through 290 case ObjectLiteral::Property::MATERIALIZED_LITERAL: // fall through
294 ASSERT(!CompileTimeValue::IsCompileTimeValue(value)); 291 ASSERT(!CompileTimeValue::IsCompileTimeValue(value));
295 case ObjectLiteral::Property::COMPUTED: 292 case ObjectLiteral::Property::COMPUTED:
296 if (key->handle()->IsSymbol()) { 293 if (key->handle()->IsSymbol()) {
297 Visit(value); 294 Visit(value);
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } else { 716 } else {
720 Visit(right); 717 Visit(right);
721 Move(destination, right->location()); 718 Move(destination, right->location());
722 } 719 }
723 720
724 __ bind(&done); 721 __ bind(&done);
725 } 722 }
726 723
727 724
728 } } // namespace v8::internal 725 } } // namespace v8::internal
OLDNEW
« src/compiler.cc ('K') | « src/ia32/fast-codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698