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

Unified Diff: src/ia32/codegen-ia32.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
Index: src/ia32/codegen-ia32.cc
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc
index b3ca0c41de47969f414963e62514ef150d6a1462..8caffbc46203457343d60d562913649da1c4e9be 100644
--- a/src/ia32/codegen-ia32.cc
+++ b/src/ia32/codegen-ia32.cc
@@ -191,10 +191,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.
// ebp: caller's frame pointer
@@ -369,7 +367,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);
@@ -4925,9 +4922,12 @@ void CodeGenerator::VisitFunctionLiteral(FunctionLiteral* node) {
ASSERT(!in_safe_int32_mode());
// 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;
+ }
Result result = InstantiateFunction(function_info);
frame()->Push(&result);
}
« src/compiler.h ('K') | « src/ia32/codegen-ia32.h ('k') | src/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698