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

Side by Side Diff: src/typing.cc

Issue 1189743003: [destructuring] Implement parameter pattern matching. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 store_.Seq(stack_local_index(i), ObservedOnStack(frame->GetExpression(i))); 91 store_.Seq(stack_local_index(i), ObservedOnStack(frame->GetExpression(i)));
92 } 92 }
93 93
94 #ifdef OBJECT_PRINT 94 #ifdef OBJECT_PRINT
95 if (FLAG_trace_osr && FLAG_print_scopes) { 95 if (FLAG_trace_osr && FLAG_print_scopes) {
96 PrintObserved(scope->receiver(), 96 PrintObserved(scope->receiver(),
97 frame->receiver(), 97 frame->receiver(),
98 store_.LookupBounds(parameter_index(-1)).lower); 98 store_.LookupBounds(parameter_index(-1)).lower);
99 99
100 for (int i = 0; i < params; i++) { 100 for (int i = 0; i < params; i++) {
101 PrintObserved(scope->parameter(i), 101 PrintObserved(scope->parameter_var(i), frame->GetParameter(i),
102 frame->GetParameter(i),
103 store_.LookupBounds(parameter_index(i)).lower); 102 store_.LookupBounds(parameter_index(i)).lower);
104 } 103 }
105 104
106 ZoneList<Variable*> local_vars(locals, zone()); 105 ZoneList<Variable*> local_vars(locals, zone());
107 ZoneList<Variable*> context_vars(scope->ContextLocalCount(), zone()); 106 ZoneList<Variable*> context_vars(scope->ContextLocalCount(), zone());
108 scope->CollectStackAndContextLocals(&local_vars, &context_vars); 107 scope->CollectStackAndContextLocals(&local_vars, &context_vars);
109 for (int i = 0; i < locals; i++) { 108 for (int i = 0; i < locals; i++) {
110 PrintObserved(local_vars.at(i), 109 PrintObserved(local_vars.at(i),
111 frame->GetExpression(i), 110 frame->GetExpression(i),
112 store_.LookupBounds(stack_local_index(i)).lower); 111 store_.LookupBounds(stack_local_index(i)).lower);
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) { 786 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) {
788 } 787 }
789 788
790 789
791 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) { 790 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) {
792 } 791 }
793 792
794 793
795 } // namespace internal 794 } // namespace internal
796 } // namespace v8 795 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698