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

Side by Side Diff: src/compiler.cc

Issue 316009: Support for object literals in fast compiler.... (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 | « src/arm/fast-codegen-arm.cc ('k') | src/fast-codegen.cc » ('j') | 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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 expr->set_location(Location::Constant()); 632 expr->set_location(Location::Constant());
633 } 633 }
634 634
635 635
636 void CodeGenSelector::VisitRegExpLiteral(RegExpLiteral* expr) { 636 void CodeGenSelector::VisitRegExpLiteral(RegExpLiteral* expr) {
637 // RegexpLiterals are supported. 637 // RegexpLiterals are supported.
638 } 638 }
639 639
640 640
641 void CodeGenSelector::VisitObjectLiteral(ObjectLiteral* expr) { 641 void CodeGenSelector::VisitObjectLiteral(ObjectLiteral* expr) {
642 BAILOUT("ObjectLiteral"); 642 for (int i = 0; i < expr->properties()->length(); i++) {
643 ObjectLiteral::Property* property = expr->properties()->at(i);
644 Visit(property->key());
645 CHECK_BAILOUT;
646 Visit(property->value());
647 CHECK_BAILOUT;
648 }
643 } 649 }
644 650
645 651
646 void CodeGenSelector::VisitArrayLiteral(ArrayLiteral* expr) { 652 void CodeGenSelector::VisitArrayLiteral(ArrayLiteral* expr) {
647 ZoneList<Expression*>* subexprs = expr->values(); 653 ZoneList<Expression*>* subexprs = expr->values();
648 for (int i = 0, len = subexprs->length(); i < len; i++) { 654 for (int i = 0, len = subexprs->length(); i < len; i++) {
649 Expression* subexpr = subexprs->at(i); 655 Expression* subexpr = subexprs->at(i);
650 if (subexpr->AsLiteral() != NULL) continue; 656 if (subexpr->AsLiteral() != NULL) continue;
651 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; 657 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
652 Visit(subexpr); 658 Visit(subexpr);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 767
762 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { 768 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) {
763 BAILOUT("ThisFunction"); 769 BAILOUT("ThisFunction");
764 } 770 }
765 771
766 #undef BAILOUT 772 #undef BAILOUT
767 #undef CHECK_BAILOUT 773 #undef CHECK_BAILOUT
768 774
769 775
770 } } // namespace v8::internal 776 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/fast-codegen-arm.cc ('k') | src/fast-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698