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

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

Issue 552184: Add counters for the different code generators. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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/codegen.cc ('k') | src/v8-counters.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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 481
482 #undef BAILOUT 482 #undef BAILOUT
483 #undef CHECK_BAILOUT 483 #undef CHECK_BAILOUT
484 484
485 485
486 #define __ ACCESS_MASM(masm()) 486 #define __ ACCESS_MASM(masm())
487 487
488 Handle<Code> FullCodeGenerator::MakeCode(FunctionLiteral* fun, 488 Handle<Code> FullCodeGenerator::MakeCode(FunctionLiteral* fun,
489 Handle<Script> script, 489 Handle<Script> script,
490 bool is_eval) { 490 bool is_eval) {
491 if (!script->IsUndefined() && !script->source()->IsUndefined()) {
492 int len = String::cast(script->source())->length();
493 Counters::total_full_codegen_source_size.Increment(len);
494 }
491 CodeGenerator::MakeCodePrologue(fun); 495 CodeGenerator::MakeCodePrologue(fun);
492 const int kInitialBufferSize = 4 * KB; 496 const int kInitialBufferSize = 4 * KB;
493 MacroAssembler masm(NULL, kInitialBufferSize); 497 MacroAssembler masm(NULL, kInitialBufferSize);
494 FullCodeGenerator cgen(&masm, script, is_eval); 498 FullCodeGenerator cgen(&masm, script, is_eval);
495 cgen.Generate(fun); 499 cgen.Generate(fun);
496 if (cgen.HasStackOverflow()) { 500 if (cgen.HasStackOverflow()) {
497 ASSERT(!Top::has_pending_exception()); 501 ASSERT(!Top::has_pending_exception());
498 return Handle<Code>::null(); 502 return Handle<Code>::null();
499 } 503 }
500 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP); 504 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP);
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 __ Drop(stack_depth); 1190 __ Drop(stack_depth);
1187 __ PopTryHandler(); 1191 __ PopTryHandler();
1188 return 0; 1192 return 0;
1189 } 1193 }
1190 1194
1191 1195
1192 #undef __ 1196 #undef __
1193 1197
1194 1198
1195 } } // namespace v8::internal 1199 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698