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/ast.cc

Issue 8551006: Version 3.7.9. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 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/ast.h ('k') | src/code-stubs.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 receiver_types_.Reserve(kMaxKeyedPolymorphism); 703 receiver_types_.Reserve(kMaxKeyedPolymorphism);
704 oracle->CollectKeyedReceiverTypes(this->id(), &receiver_types_); 704 oracle->CollectKeyedReceiverTypes(this->id(), &receiver_types_);
705 } 705 }
706 } 706 }
707 707
708 708
709 void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 709 void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
710 TypeInfo info = oracle->SwitchType(this); 710 TypeInfo info = oracle->SwitchType(this);
711 if (info.IsSmi()) { 711 if (info.IsSmi()) {
712 compare_type_ = SMI_ONLY; 712 compare_type_ = SMI_ONLY;
713 } else if (info.IsSymbol()) {
714 compare_type_ = SYMBOL_ONLY;
715 } else if (info.IsNonSymbol()) {
716 compare_type_ = STRING_ONLY;
713 } else if (info.IsNonPrimitive()) { 717 } else if (info.IsNonPrimitive()) {
714 compare_type_ = OBJECT_ONLY; 718 compare_type_ = OBJECT_ONLY;
715 } else { 719 } else {
716 ASSERT(compare_type_ == NONE); 720 ASSERT(compare_type_ == NONE);
717 } 721 }
718 } 722 }
719 723
720 724
721 static bool CanCallWithoutIC(Handle<JSFunction> target, int arity) { 725 static bool CanCallWithoutIC(Handle<JSFunction> target, int arity) {
722 SharedFunctionInfo* info = target->shared(); 726 SharedFunctionInfo* info = target->shared();
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 #undef MAKE_TYPE_CASE 890 #undef MAKE_TYPE_CASE
887 891
888 #define MAKE_TYPE_CASE(Name) \ 892 #define MAKE_TYPE_CASE(Name) \
889 RegExp##Name* RegExp##Name::As##Name() { \ 893 RegExp##Name* RegExp##Name::As##Name() { \
890 return this; \ 894 return this; \
891 } \ 895 } \
892 bool RegExp##Name::Is##Name() { return true; } 896 bool RegExp##Name::Is##Name() { return true; }
893 FOR_EACH_REG_EXP_TREE_TYPE(MAKE_TYPE_CASE) 897 FOR_EACH_REG_EXP_TREE_TYPE(MAKE_TYPE_CASE)
894 #undef MAKE_TYPE_CASE 898 #undef MAKE_TYPE_CASE
895 899
896 RegExpEmpty RegExpEmpty::kInstance;
897
898 900
899 static Interval ListCaptureRegisters(ZoneList<RegExpTree*>* children) { 901 static Interval ListCaptureRegisters(ZoneList<RegExpTree*>* children) {
900 Interval result = Interval::Empty(); 902 Interval result = Interval::Empty();
901 for (int i = 0; i < children->length(); i++) 903 for (int i = 0; i < children->length(); i++)
902 result = result.Union(children->at(i)->CaptureRegisters()); 904 result = result.Union(children->at(i)->CaptureRegisters());
903 return result; 905 return result;
904 } 906 }
905 907
906 908
907 Interval RegExpAlternative::CaptureRegisters() { 909 Interval RegExpAlternative::CaptureRegisters() {
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 int pos) 1208 int pos)
1207 : label_(label), 1209 : label_(label),
1208 statements_(statements), 1210 statements_(statements),
1209 position_(pos), 1211 position_(pos),
1210 compare_type_(NONE), 1212 compare_type_(NONE),
1211 compare_id_(AstNode::GetNextId(isolate)), 1213 compare_id_(AstNode::GetNextId(isolate)),
1212 entry_id_(AstNode::GetNextId(isolate)) { 1214 entry_id_(AstNode::GetNextId(isolate)) {
1213 } 1215 }
1214 1216
1215 } } // namespace v8::internal 1217 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698