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

Side by Side Diff: src/compiler.cc

Issue 669270: Remove unneeded variable usage analysis. (Closed)
Patch Set: Created 10 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
« no previous file with comments | « src/ast.cc ('k') | src/flag-definitions.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 16 matching lines...) Expand all
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "bootstrapper.h" 30 #include "bootstrapper.h"
31 #include "codegen-inl.h" 31 #include "codegen-inl.h"
32 #include "compilation-cache.h" 32 #include "compilation-cache.h"
33 #include "compiler.h" 33 #include "compiler.h"
34 #include "debug.h" 34 #include "debug.h"
35 #include "fast-codegen.h" 35 #include "fast-codegen.h"
36 #include "full-codegen.h" 36 #include "full-codegen.h"
37 #include "liveedit.h"
37 #include "oprofile-agent.h" 38 #include "oprofile-agent.h"
38 #include "rewriter.h" 39 #include "rewriter.h"
39 #include "scopes.h" 40 #include "scopes.h"
40 #include "usage-analyzer.h"
41 #include "liveedit.h"
42 41
43 namespace v8 { 42 namespace v8 {
44 namespace internal { 43 namespace internal {
45 44
46 45
47 static Handle<Code> MakeCode(Handle<Context> context, CompilationInfo* info) { 46 static Handle<Code> MakeCode(Handle<Context> context, CompilationInfo* info) {
48 FunctionLiteral* function = info->function(); 47 FunctionLiteral* function = info->function();
49 ASSERT(function != NULL); 48 ASSERT(function != NULL);
50 // Rewrite the AST by introducing .result assignments where needed. 49 // Rewrite the AST by introducing .result assignments where needed.
51 if (!Rewriter::Process(function) || !AnalyzeVariableUsage(function)) { 50 if (!Rewriter::Process(function)) {
52 // Signal a stack overflow by returning a null handle. The stack 51 // Signal a stack overflow by returning a null handle. The stack
53 // overflow exception will be thrown by the caller. 52 // overflow exception will be thrown by the caller.
54 return Handle<Code>::null(); 53 return Handle<Code>::null();
55 } 54 }
56 55
57 { 56 {
58 // Compute top scope and allocate variables. For lazy compilation 57 // Compute top scope and allocate variables. For lazy compilation
59 // the top scope only contains the single lazily compiled function, 58 // the top scope only contains the single lazily compiled function,
60 // so this doesn't re-allocate variables repeatedly. 59 // so this doesn't re-allocate variables repeatedly.
61 HistogramTimerScope timer(&Counters::variable_allocation); 60 HistogramTimerScope timer(&Counters::variable_allocation);
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 LOG(CodeCreateEvent(tag, *code, *func_name)); 570 LOG(CodeCreateEvent(tag, *code, *func_name));
572 OProfileAgent::CreateNativeCodeRegion(*func_name, 571 OProfileAgent::CreateNativeCodeRegion(*func_name,
573 code->instruction_start(), 572 code->instruction_start(),
574 code->instruction_size()); 573 code->instruction_size());
575 } 574 }
576 } 575 }
577 } 576 }
578 #endif 577 #endif
579 578
580 } } // namespace v8::internal 579 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698