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

Side by Side Diff: src/arm/fast-codegen-arm.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
« no previous file with comments | « no previous file | src/ast.h » ('j') | src/compiler.cc » ('J')
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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 } else { 265 } else {
266 __ CallRuntime(Runtime::kCloneShallowLiteralBoilerplate, 1); 266 __ CallRuntime(Runtime::kCloneShallowLiteralBoilerplate, 1);
267 } 267 }
268 268
269 // If result_saved == true: the result is saved on top of the stack. 269 // If result_saved == true: the result is saved on top of the stack.
270 // If result_saved == false: the result is in eax. 270 // If result_saved == false: the result is in eax.
271 bool result_saved = false; 271 bool result_saved = false;
272 272
273 for (int i = 0; i < expr->properties()->length(); i++) { 273 for (int i = 0; i < expr->properties()->length(); i++) {
274 ObjectLiteral::Property* property = expr->properties()->at(i); 274 ObjectLiteral::Property* property = expr->properties()->at(i);
275 if (property->IsCompileTimeValue()) continue;
276
275 Literal* key = property->key(); 277 Literal* key = property->key();
276 Expression* value = property->value(); 278 Expression* value = property->value();
277 if (property->kind() == ObjectLiteral::Property::CONSTANT) continue;
278 if (property->kind() == ObjectLiteral::Property::MATERIALIZED_LITERAL &&
279 CompileTimeValue::IsCompileTimeValue(value)) {
280 continue;
281 }
282 if (!result_saved) { 279 if (!result_saved) {
283 __ push(r0); // Save result on stack 280 __ push(r0); // Save result on stack
284 result_saved = true; 281 result_saved = true;
285 } 282 }
286 switch (property->kind()) { 283 switch (property->kind()) {
287 case ObjectLiteral::Property::MATERIALIZED_LITERAL: // fall through 284 case ObjectLiteral::Property::MATERIALIZED_LITERAL: // fall through
288 ASSERT(!CompileTimeValue::IsCompileTimeValue(property->value())); 285 ASSERT(!CompileTimeValue::IsCompileTimeValue(property->value()));
289 case ObjectLiteral::Property::COMPUTED: // fall through 286 case ObjectLiteral::Property::COMPUTED: // fall through
290 case ObjectLiteral::Property::PROTOTYPE: 287 case ObjectLiteral::Property::PROTOTYPE:
291 __ push(r0); 288 __ push(r0);
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 Move(destination, right->AsLiteral()); 675 Move(destination, right->AsLiteral());
679 } else { 676 } else {
680 Visit(right); 677 Visit(right);
681 Move(destination, right->location()); 678 Move(destination, right->location());
682 } 679 }
683 680
684 __ bind(&done); 681 __ bind(&done);
685 } 682 }
686 683
687 } } // namespace v8::internal 684 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ast.h » ('j') | src/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698