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

Side by Side Diff: src/ast/ast.cc

Issue 2515233002: [ic] Remove names table from type feedback metadata. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | src/heap/object-stats.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/ast/ast.h" 5 #include "src/ast/ast.h"
6 6
7 #include <cmath> // For isfinite. 7 #include <cmath> // For isfinite.
8 8
9 #include "src/ast/compile-time-value.h" 9 #include "src/ast/compile-time-value.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if (UsesVariableFeedbackSlot()) { 204 if (UsesVariableFeedbackSlot()) {
205 // VariableProxies that point to the same Variable within a function can 205 // VariableProxies that point to the same Variable within a function can
206 // make their loads from the same IC slot. 206 // make their loads from the same IC slot.
207 if (var()->IsUnallocated() || var()->mode() == DYNAMIC_GLOBAL) { 207 if (var()->IsUnallocated() || var()->mode() == DYNAMIC_GLOBAL) {
208 ZoneHashMap::Entry* entry = cache->Get(var()); 208 ZoneHashMap::Entry* entry = cache->Get(var());
209 if (entry != NULL) { 209 if (entry != NULL) {
210 variable_feedback_slot_ = FeedbackVectorSlot( 210 variable_feedback_slot_ = FeedbackVectorSlot(
211 static_cast<int>(reinterpret_cast<intptr_t>(entry->value))); 211 static_cast<int>(reinterpret_cast<intptr_t>(entry->value)));
212 return; 212 return;
213 } 213 }
214 variable_feedback_slot_ = spec->AddLoadGlobalICSlot(var()->name()); 214 variable_feedback_slot_ = spec->AddLoadGlobalICSlot();
215 cache->Put(var(), variable_feedback_slot_); 215 cache->Put(var(), variable_feedback_slot_);
216 } else { 216 } else {
217 variable_feedback_slot_ = spec->AddLoadICSlot(); 217 variable_feedback_slot_ = spec->AddLoadICSlot();
218 } 218 }
219 } 219 }
220 } 220 }
221 221
222 222
223 static void AssignVectorSlots(Expression* expr, FeedbackVectorSpec* spec, 223 static void AssignVectorSlots(Expression* expr, FeedbackVectorSpec* spec,
224 FeedbackVectorSlot* out_slot) { 224 FeedbackVectorSlot* out_slot) {
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 // static 947 // static
948 bool Literal::Match(void* literal1, void* literal2) { 948 bool Literal::Match(void* literal1, void* literal2) {
949 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); 949 const AstValue* x = static_cast<Literal*>(literal1)->raw_value();
950 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); 950 const AstValue* y = static_cast<Literal*>(literal2)->raw_value();
951 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || 951 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) ||
952 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); 952 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber());
953 } 953 }
954 954
955 } // namespace internal 955 } // namespace internal
956 } // namespace v8 956 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/heap/object-stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698