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

Side by Side Diff: src/ast.cc

Issue 104793003: Fix polymorphic inlined calls with migrating prototypes (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fixed inefficient recursion Created 7 years 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/objects.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 Token::Value op, 130 Token::Value op,
131 Expression* target, 131 Expression* target,
132 Expression* value, 132 Expression* value,
133 int pos) 133 int pos)
134 : Expression(isolate, pos), 134 : Expression(isolate, pos),
135 op_(op), 135 op_(op),
136 target_(target), 136 target_(target),
137 value_(value), 137 value_(value),
138 binary_operation_(NULL), 138 binary_operation_(NULL),
139 assignment_id_(GetNextId(isolate)), 139 assignment_id_(GetNextId(isolate)),
140 is_monomorphic_(false),
141 is_uninitialized_(false), 140 is_uninitialized_(false),
142 is_pre_monomorphic_(false), 141 is_pre_monomorphic_(false),
143 store_mode_(STANDARD_STORE) { } 142 store_mode_(STANDARD_STORE) { }
144 143
145 144
146 Token::Value Assignment::binary_op() const { 145 Token::Value Assignment::binary_op() const {
147 switch (op_) { 146 switch (op_) {
148 case Token::ASSIGN_BIT_OR: return Token::BIT_OR; 147 case Token::ASSIGN_BIT_OR: return Token::BIT_OR;
149 case Token::ASSIGN_BIT_XOR: return Token::BIT_XOR; 148 case Token::ASSIGN_BIT_XOR: return Token::BIT_XOR;
150 case Token::ASSIGN_BIT_AND: return Token::BIT_AND; 149 case Token::ASSIGN_BIT_AND: return Token::BIT_AND;
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 if (value->IsAllocationSite()) { 734 if (value->IsAllocationSite()) {
736 AllocationSite* site = AllocationSite::cast(value); 735 AllocationSite* site = AllocationSite::cast(value);
737 elements_kind_ = site->GetElementsKind(); 736 elements_kind_ = site->GetElementsKind();
738 } 737 }
739 } 738 }
740 } 739 }
741 740
742 741
743 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 742 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
744 TypeFeedbackId id = key()->LiteralFeedbackId(); 743 TypeFeedbackId id = key()->LiteralFeedbackId();
745 receiver_type_ = oracle->ObjectLiteralStoreIsMonomorphic(id) 744 SmallMapList maps;
746 ? oracle->GetObjectLiteralStoreMap(id) : Handle<Map>::null(); 745 oracle->CollectReceiverTypes(id, &maps);
746 receiver_type_ = maps.length() == 1 ? maps.at(0)
747 : Handle<Map>::null();
747 } 748 }
748 749
749 750
750 // ---------------------------------------------------------------------------- 751 // ----------------------------------------------------------------------------
751 // Implementation of AstVisitor 752 // Implementation of AstVisitor
752 753
753 void AstVisitor::VisitDeclarations(ZoneList<Declaration*>* declarations) { 754 void AstVisitor::VisitDeclarations(ZoneList<Declaration*>* declarations) {
754 for (int i = 0; i < declarations->length(); i++) { 755 for (int i = 0; i < declarations->length(); i++) {
755 Visit(declarations->at(i)); 756 Visit(declarations->at(i));
756 } 757 }
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); 1245 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value());
1245 str = arr; 1246 str = arr;
1246 } else { 1247 } else {
1247 str = DoubleToCString(value_->Number(), buffer); 1248 str = DoubleToCString(value_->Number(), buffer);
1248 } 1249 }
1249 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); 1250 return isolate_->factory()->NewStringFromAscii(CStrVector(str));
1250 } 1251 }
1251 1252
1252 1253
1253 } } // namespace v8::internal 1254 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698