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

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

Issue 18143: Change the handling of catch blocks to use context extension objects... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 11 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/runtime.cc ('k') | test/cctest/test-debug.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 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void VisitFunctionLiteral(FunctionLiteral* node); 62 void VisitFunctionLiteral(FunctionLiteral* node);
63 void VisitFunctionBoilerplateLiteral(FunctionBoilerplateLiteral* node); 63 void VisitFunctionBoilerplateLiteral(FunctionBoilerplateLiteral* node);
64 void VisitConditional(Conditional* node); 64 void VisitConditional(Conditional* node);
65 void VisitSlot(Slot* node); 65 void VisitSlot(Slot* node);
66 void VisitVariable(Variable* node); 66 void VisitVariable(Variable* node);
67 void VisitVariableProxy(VariableProxy* node); 67 void VisitVariableProxy(VariableProxy* node);
68 void VisitLiteral(Literal* node); 68 void VisitLiteral(Literal* node);
69 void VisitRegExpLiteral(RegExpLiteral* node); 69 void VisitRegExpLiteral(RegExpLiteral* node);
70 void VisitObjectLiteral(ObjectLiteral* node); 70 void VisitObjectLiteral(ObjectLiteral* node);
71 void VisitArrayLiteral(ArrayLiteral* node); 71 void VisitArrayLiteral(ArrayLiteral* node);
72 void VisitCatchExtensionObject(CatchExtensionObject* node);
72 void VisitAssignment(Assignment* node); 73 void VisitAssignment(Assignment* node);
73 void VisitThrow(Throw* node); 74 void VisitThrow(Throw* node);
74 void VisitProperty(Property* node); 75 void VisitProperty(Property* node);
75 void VisitCall(Call* node); 76 void VisitCall(Call* node);
76 void VisitCallEval(CallEval* node); 77 void VisitCallEval(CallEval* node);
77 void VisitCallNew(CallNew* node); 78 void VisitCallNew(CallNew* node);
78 void VisitCallRuntime(CallRuntime* node); 79 void VisitCallRuntime(CallRuntime* node);
79 void VisitUnaryOperation(UnaryOperation* node); 80 void VisitUnaryOperation(UnaryOperation* node);
80 void VisitCountOperation(CountOperation* node); 81 void VisitCountOperation(CountOperation* node);
81 void VisitBinaryOperation(BinaryOperation* node); 82 void VisitBinaryOperation(BinaryOperation* node);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 void UsageComputer::VisitObjectLiteral(ObjectLiteral* node) { 282 void UsageComputer::VisitObjectLiteral(ObjectLiteral* node) {
282 ReadList(node->properties()); 283 ReadList(node->properties());
283 } 284 }
284 285
285 286
286 void UsageComputer::VisitArrayLiteral(ArrayLiteral* node) { 287 void UsageComputer::VisitArrayLiteral(ArrayLiteral* node) {
287 ReadList(node->values()); 288 ReadList(node->values());
288 } 289 }
289 290
290 291
292 void UsageComputer::VisitCatchExtensionObject(CatchExtensionObject* node) {
293 Read(node->value());
294 }
295
296
291 void UsageComputer::VisitAssignment(Assignment* node) { 297 void UsageComputer::VisitAssignment(Assignment* node) {
292 if (node->op() != Token::ASSIGN) 298 if (node->op() != Token::ASSIGN)
293 Read(node->target()); 299 Read(node->target());
294 Write(node->target()); 300 Write(node->target());
295 Read(node->value()); 301 Read(node->value());
296 } 302 }
297 303
298 304
299 void UsageComputer::VisitThrow(Throw* node) { 305 void UsageComputer::VisitThrow(Throw* node) {
300 Read(node->exception()); 306 Read(node->exception());
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 441
436 // ---------------------------------------------------------------------------- 442 // ----------------------------------------------------------------------------
437 // Interface to variable usage analysis 443 // Interface to variable usage analysis
438 444
439 bool AnalyzeVariableUsage(FunctionLiteral* lit) { 445 bool AnalyzeVariableUsage(FunctionLiteral* lit) {
440 if (!FLAG_usage_computation) return true; 446 if (!FLAG_usage_computation) return true;
441 return UsageComputer::Traverse(lit); 447 return UsageComputer::Traverse(lit);
442 } 448 }
443 449
444 } } // namespace v8::internal 450 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698