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

Side by Side Diff: src/full-codegen.cc

Issue 660083005: AstNumberingVisitor does the work of AstConstructionVisitor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 void BreakableStatementChecker::VisitSuperReference(SuperReference* expr) {} 301 void BreakableStatementChecker::VisitSuperReference(SuperReference* expr) {}
302 302
303 303
304 #define __ ACCESS_MASM(masm()) 304 #define __ ACCESS_MASM(masm())
305 305
306 bool FullCodeGenerator::MakeCode(CompilationInfo* info) { 306 bool FullCodeGenerator::MakeCode(CompilationInfo* info) {
307 Isolate* isolate = info->isolate(); 307 Isolate* isolate = info->isolate();
308 308
309 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); 309 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate());
310 310
311 if (!AstNumbering::Renumber(info->function(), info->zone())) { 311 if (!AstNumbering::Renumber(info->function(), info->shared_info(),
312 info->zone())) {
312 DCHECK(!isolate->has_pending_exception()); 313 DCHECK(!isolate->has_pending_exception());
313 return false; 314 return false;
314 } 315 }
315 316
317 // Now that we know how many feedback slots are needed, ensure that the
318 // feedback vector is large enough.
319 info->EnsureFeedbackVector();
320
316 Handle<Script> script = info->script(); 321 Handle<Script> script = info->script();
317 if (!script->IsUndefined() && !script->source()->IsUndefined()) { 322 if (!script->IsUndefined() && !script->source()->IsUndefined()) {
318 int len = String::cast(script->source())->length(); 323 int len = String::cast(script->source())->length();
319 isolate->counters()->total_full_codegen_source_size()->Increment(len); 324 isolate->counters()->total_full_codegen_source_size()->Increment(len);
320 } 325 }
321 CodeGenerator::MakeCodePrologue(info, "full"); 326 CodeGenerator::MakeCodePrologue(info, "full");
322 const int kInitialBufferSize = 4 * KB; 327 const int kInitialBufferSize = 4 * KB;
323 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize); 328 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize);
324 if (info->will_serialize()) masm.enable_serializer(); 329 if (info->will_serialize()) masm.enable_serializer();
325 330
(...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 } 1756 }
1752 return true; 1757 return true;
1753 } 1758 }
1754 #endif // DEBUG 1759 #endif // DEBUG
1755 1760
1756 1761
1757 #undef __ 1762 #undef __
1758 1763
1759 1764
1760 } } // namespace v8::internal 1765 } } // namespace v8::internal
OLDNEW
« src/ast-numbering.cc ('K') | « src/compiler/js-inlining.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698