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

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

Issue 1679813002: [compiler] Remove the special case "prototype" load in class literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips. Created 4 years, 10 months 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 | « src/ast/ast.h ('k') | src/compiler/ast-graph-builder.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 // 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/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 kind_ = COMPUTED; 274 kind_ = COMPUTED;
275 } 275 }
276 } 276 }
277 277
278 278
279 void ClassLiteral::AssignFeedbackVectorSlots(Isolate* isolate, 279 void ClassLiteral::AssignFeedbackVectorSlots(Isolate* isolate,
280 FeedbackVectorSpec* spec, 280 FeedbackVectorSpec* spec,
281 FeedbackVectorSlotCache* cache) { 281 FeedbackVectorSlotCache* cache) {
282 // This logic that computes the number of slots needed for vector store 282 // This logic that computes the number of slots needed for vector store
283 // ICs must mirror FullCodeGenerator::VisitClassLiteral. 283 // ICs must mirror FullCodeGenerator::VisitClassLiteral.
284 prototype_slot_ = spec->AddLoadICSlot();
284 if (NeedsProxySlot()) { 285 if (NeedsProxySlot()) {
285 slot_ = spec->AddStoreICSlot(); 286 proxy_slot_ = spec->AddStoreICSlot();
286 } 287 }
287 288
288 for (int i = 0; i < properties()->length(); i++) { 289 for (int i = 0; i < properties()->length(); i++) {
289 ObjectLiteral::Property* property = properties()->at(i); 290 ObjectLiteral::Property* property = properties()->at(i);
290 Expression* value = property->value(); 291 Expression* value = property->value();
291 if (FunctionLiteral::NeedsHomeObject(value)) { 292 if (FunctionLiteral::NeedsHomeObject(value)) {
292 property->SetSlot(spec->AddStoreICSlot()); 293 property->SetSlot(spec->AddStoreICSlot());
293 } 294 }
294 } 295 }
295 } 296 }
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 bool Literal::Match(void* literal1, void* literal2) { 838 bool Literal::Match(void* literal1, void* literal2) {
838 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); 839 const AstValue* x = static_cast<Literal*>(literal1)->raw_value();
839 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); 840 const AstValue* y = static_cast<Literal*>(literal2)->raw_value();
840 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || 841 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) ||
841 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); 842 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber());
842 } 843 }
843 844
844 845
845 } // namespace internal 846 } // namespace internal
846 } // namespace v8 847 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698