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

Unified Diff: src/x64/codegen-x64.cc

Issue 3561012: More refactoring of class Compiler's interface. (Closed)
Patch Set: Reindent some code, change some copyright dates. Created 10 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 side-by-side diff with in-line comments
Download patch
« src/compiler.h ('K') | « src/x64/codegen-x64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/codegen-x64.cc
diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc
index 28cc205c106f7f5d61cebe2b2acc59bc3c112f72..204fedcd78b0ce013cdc47c2514b09f490b75858 100644
--- a/src/x64/codegen-x64.cc
+++ b/src/x64/codegen-x64.cc
@@ -190,10 +190,8 @@ void CodeGenerator::Generate(CompilationInfo* info) {
}
#endif
- // New scope to get automatic timing calculation.
- { HistogramTimerScope codegen_timer(&Counters::code_generation);
+ {
CodeGenState state(this);
-
// Entry:
// Stack: receiver, arguments, return address.
// rbp: caller's frame pointer
@@ -367,7 +365,6 @@ void CodeGenerator::Generate(CompilationInfo* info) {
// Process any deferred code using the register allocator.
if (!HasStackOverflow()) {
- HistogramTimerScope deferred_timer(&Counters::deferred_code_generation);
JumpTarget::set_compiling_deferred_code(true);
ProcessDeferred();
JumpTarget::set_compiling_deferred_code(false);
@@ -4276,9 +4273,12 @@ void CodeGenerator::VisitFunctionLiteral(FunctionLiteral* node) {
// Build the function info and instantiate it.
Handle<SharedFunctionInfo> function_info =
- Compiler::BuildFunctionInfo(node, script(), this);
+ Compiler::BuildFunctionInfo(node, script());
// Check for stack-overflow exception.
- if (HasStackOverflow()) return;
+ if (function_info.is_null()) {
+ SetStackOverflow();
+ return;
+ }
InstantiateFunction(function_info);
}
« src/compiler.h ('K') | « src/x64/codegen-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698