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

Side by Side Diff: src/typing.cc

Issue 1053143005: Collect type feedback on result of Math.[round|ceil|floor] (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: MIPS port Created 5 years, 7 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/type-info.cc ('k') | src/x64/code-stubs-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/typing.h" 5 #include "src/typing.h"
6 6
7 #include "src/frames.h" 7 #include "src/frames.h"
8 #include "src/frames-inl.h" 8 #include "src/frames-inl.h"
9 #include "src/ostreams.h" 9 #include "src/ostreams.h"
10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move 10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 } 533 }
534 534
535 535
536 void AstTyper::VisitCall(Call* expr) { 536 void AstTyper::VisitCall(Call* expr) {
537 // Collect type feedback. 537 // Collect type feedback.
538 RECURSE(Visit(expr->expression())); 538 RECURSE(Visit(expr->expression()));
539 bool is_uninitialized = true; 539 bool is_uninitialized = true;
540 if (expr->IsUsingCallFeedbackICSlot(isolate())) { 540 if (expr->IsUsingCallFeedbackICSlot(isolate())) {
541 FeedbackVectorICSlot slot = expr->CallFeedbackICSlot(); 541 FeedbackVectorICSlot slot = expr->CallFeedbackICSlot();
542 is_uninitialized = oracle()->CallIsUninitialized(slot); 542 is_uninitialized = oracle()->CallIsUninitialized(slot);
543 if (!expr->expression()->IsProperty() && 543 if (oracle()->CallIsMonomorphic(slot)) {
544 oracle()->CallIsMonomorphic(slot)) { 544 if (oracle()->CallIsBuiltinWithMinusZeroResult(slot)) {
545 expr->set_target(oracle()->GetCallTarget(slot)); 545 expr->MarkShouldHandleMinusZeroResult();
546 Handle<AllocationSite> site = oracle()->GetCallAllocationSite(slot); 546 }
547 expr->set_allocation_site(site); 547 if (!expr->expression()->IsProperty()) {
548 expr->set_target(oracle()->GetCallTarget(slot));
549 Handle<AllocationSite> site = oracle()->GetCallAllocationSite(slot);
550 expr->set_allocation_site(site);
551 }
548 } 552 }
549 } 553 }
550 554
551 expr->set_is_uninitialized(is_uninitialized); 555 expr->set_is_uninitialized(is_uninitialized);
552 556
553 ZoneList<Expression*>* args = expr->arguments(); 557 ZoneList<Expression*>* args = expr->arguments();
554 for (int i = 0; i < args->length(); ++i) { 558 for (int i = 0; i < args->length(); ++i) {
555 Expression* arg = args->at(i); 559 Expression* arg = args->at(i);
556 RECURSE(Visit(arg)); 560 RECURSE(Visit(arg));
557 } 561 }
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 void AstTyper::VisitModuleUrl(ModuleUrl* module) { 826 void AstTyper::VisitModuleUrl(ModuleUrl* module) {
823 } 827 }
824 828
825 829
826 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { 830 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) {
827 RECURSE(Visit(stmt->body())); 831 RECURSE(Visit(stmt->body()));
828 } 832 }
829 833
830 834
831 } } // namespace v8::internal 835 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698