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

Side by Side Diff: src/usage-analyzer.cc

Issue 245042: Remove CallEval as a subclass of the Call AST node type. We were not... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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/rewriter.cc ('k') | src/variables.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void VisitVariableProxy(VariableProxy* node); 68 void VisitVariableProxy(VariableProxy* node);
69 void VisitLiteral(Literal* node); 69 void VisitLiteral(Literal* node);
70 void VisitRegExpLiteral(RegExpLiteral* node); 70 void VisitRegExpLiteral(RegExpLiteral* node);
71 void VisitObjectLiteral(ObjectLiteral* node); 71 void VisitObjectLiteral(ObjectLiteral* node);
72 void VisitArrayLiteral(ArrayLiteral* node); 72 void VisitArrayLiteral(ArrayLiteral* node);
73 void VisitCatchExtensionObject(CatchExtensionObject* node); 73 void VisitCatchExtensionObject(CatchExtensionObject* node);
74 void VisitAssignment(Assignment* node); 74 void VisitAssignment(Assignment* node);
75 void VisitThrow(Throw* node); 75 void VisitThrow(Throw* node);
76 void VisitProperty(Property* node); 76 void VisitProperty(Property* node);
77 void VisitCall(Call* node); 77 void VisitCall(Call* node);
78 void VisitCallEval(CallEval* node);
79 void VisitCallNew(CallNew* node); 78 void VisitCallNew(CallNew* node);
80 void VisitCallRuntime(CallRuntime* node); 79 void VisitCallRuntime(CallRuntime* node);
81 void VisitUnaryOperation(UnaryOperation* node); 80 void VisitUnaryOperation(UnaryOperation* node);
82 void VisitCountOperation(CountOperation* node); 81 void VisitCountOperation(CountOperation* node);
83 void VisitBinaryOperation(BinaryOperation* node); 82 void VisitBinaryOperation(BinaryOperation* node);
84 void VisitCompareOperation(CompareOperation* node); 83 void VisitCompareOperation(CompareOperation* node);
85 void VisitThisFunction(ThisFunction* node); 84 void VisitThisFunction(ThisFunction* node);
86 85
87 private: 86 private:
88 int weight_; 87 int weight_;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 321 }
323 } 322 }
324 323
325 324
326 void UsageComputer::VisitCall(Call* node) { 325 void UsageComputer::VisitCall(Call* node) {
327 Read(node->expression()); 326 Read(node->expression());
328 ReadList(node->arguments()); 327 ReadList(node->arguments());
329 } 328 }
330 329
331 330
332 void UsageComputer::VisitCallEval(CallEval* node) {
333 VisitCall(node);
334 }
335
336
337 void UsageComputer::VisitCallNew(CallNew* node) { 331 void UsageComputer::VisitCallNew(CallNew* node) {
338 VisitCall(node); 332 VisitCall(node);
339 } 333 }
340 334
341 335
342 void UsageComputer::VisitCallRuntime(CallRuntime* node) { 336 void UsageComputer::VisitCallRuntime(CallRuntime* node) {
343 ReadList(node->arguments()); 337 ReadList(node->arguments());
344 } 338 }
345 339
346 340
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 // ---------------------------------------------------------------------------- 437 // ----------------------------------------------------------------------------
444 // Interface to variable usage analysis 438 // Interface to variable usage analysis
445 439
446 bool AnalyzeVariableUsage(FunctionLiteral* lit) { 440 bool AnalyzeVariableUsage(FunctionLiteral* lit) {
447 if (!FLAG_usage_computation) return true; 441 if (!FLAG_usage_computation) return true;
448 HistogramTimerScope timer(&Counters::usage_analysis); 442 HistogramTimerScope timer(&Counters::usage_analysis);
449 return UsageComputer::Traverse(lit); 443 return UsageComputer::Traverse(lit);
450 } 444 }
451 445
452 } } // namespace v8::internal 446 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/rewriter.cc ('k') | src/variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698