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

Side by Side Diff: src/typing.cc

Issue 196133017: Experimental parser: merge r19949 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/types.cc ('k') | src/unique.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 22 matching lines...) Expand all
33 #include "scopes.h" 33 #include "scopes.h"
34 34
35 namespace v8 { 35 namespace v8 {
36 namespace internal { 36 namespace internal {
37 37
38 38
39 AstTyper::AstTyper(CompilationInfo* info) 39 AstTyper::AstTyper(CompilationInfo* info)
40 : info_(info), 40 : info_(info),
41 oracle_( 41 oracle_(
42 Handle<Code>(info->closure()->shared()->code()), 42 Handle<Code>(info->closure()->shared()->code()),
43 Handle<FixedArray>(info->closure()->shared()->feedback_vector()),
43 Handle<Context>(info->closure()->context()->native_context()), 44 Handle<Context>(info->closure()->context()->native_context()),
44 info->zone()), 45 info->zone()),
45 store_(info->zone()) { 46 store_(info->zone()) {
46 InitializeAstVisitor(info->zone()); 47 InitializeAstVisitor(info->zone());
47 } 48 }
48 49
49 50
50 #define RECURSE(call) \ 51 #define RECURSE(call) \
51 do { \ 52 do { \
52 ASSERT(!visitor->HasStackOverflow()); \ 53 ASSERT(!visitor->HasStackOverflow()); \
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 // Collect type feedback. 555 // Collect type feedback.
555 expr->RecordTypeFeedback(oracle()); 556 expr->RecordTypeFeedback(oracle());
556 557
557 RECURSE(Visit(expr->expression())); 558 RECURSE(Visit(expr->expression()));
558 ZoneList<Expression*>* args = expr->arguments(); 559 ZoneList<Expression*>* args = expr->arguments();
559 for (int i = 0; i < args->length(); ++i) { 560 for (int i = 0; i < args->length(); ++i) {
560 Expression* arg = args->at(i); 561 Expression* arg = args->at(i);
561 RECURSE(Visit(arg)); 562 RECURSE(Visit(arg));
562 } 563 }
563 564
564 // We don't know anything about the result type. 565 NarrowType(expr, Bounds(Type::None(zone()), Type::Receiver(zone())));
565 } 566 }
566 567
567 568
568 void AstTyper::VisitCallRuntime(CallRuntime* expr) { 569 void AstTyper::VisitCallRuntime(CallRuntime* expr) {
569 ZoneList<Expression*>* args = expr->arguments(); 570 ZoneList<Expression*>* args = expr->arguments();
570 for (int i = 0; i < args->length(); ++i) { 571 for (int i = 0; i < args->length(); ++i) {
571 Expression* arg = args->at(i); 572 Expression* arg = args->at(i);
572 RECURSE(Visit(arg)); 573 RECURSE(Visit(arg));
573 } 574 }
574 575
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 void AstTyper::VisitModuleUrl(ModuleUrl* module) { 792 void AstTyper::VisitModuleUrl(ModuleUrl* module) {
792 } 793 }
793 794
794 795
795 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { 796 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) {
796 RECURSE(Visit(stmt->body())); 797 RECURSE(Visit(stmt->body()));
797 } 798 }
798 799
799 800
800 } } // namespace v8::internal 801 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/types.cc ('k') | src/unique.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698