Revision: 22547
Author: [email protected]
Date: Wed Jul 23 09:35:06 2014 UTC
Log: Propagate serialization flag to inner functions.
[email protected]
Review URL: https://codereview.chromium.org/407383003
http://code.google.com/p/v8/source/detail?r=22547
Modified:
/branches/bleeding_edge/src/arm/full-codegen-arm.cc
/branches/bleeding_edge/src/arm64/full-codegen-arm64.cc
/branches/bleeding_edge/src/compiler.cc
/branches/bleeding_edge/src/compiler.h
/branches/bleeding_edge/src/full-codegen.cc
/branches/bleeding_edge/src/hydrogen.cc
/branches/bleeding_edge/src/ia32/full-codegen-ia32.cc
/branches/bleeding_edge/src/mips/full-codegen-mips.cc
/branches/bleeding_edge/src/mips64/full-codegen-mips64.cc
/branches/bleeding_edge/src/x64/full-codegen-x64.cc
/branches/bleeding_edge/src/x87/full-codegen-x87.cc
=======================================
--- /branches/bleeding_edge/src/arm/full-codegen-arm.cc Mon Jul 21 11:19:56
2014 UTC
+++ /branches/bleeding_edge/src/arm/full-codegen-arm.cc Wed Jul 23 09:35:06
2014 UTC
@@ -870,7 +870,7 @@
case Variable::UNALLOCATED: {
globals_->Add(variable->name(), zone());
Handle<SharedFunctionInfo> function =
- Compiler::BuildFunctionInfo(declaration->fun(), script());
+ Compiler::BuildFunctionInfo(declaration->fun(), script(), info_);
// Check for stack-overflow exception.
if (function.is_null()) return SetStackOverflow();
globals_->Add(function, zone());
=======================================
--- /branches/bleeding_edge/src/arm64/full-codegen-arm64.cc Mon Jul 21
11:19:56 2014 UTC
+++ /branches/bleeding_edge/src/arm64/full-codegen-arm64.cc Wed Jul 23
09:35:06 2014 UTC
@@ -874,7 +874,7 @@
case Variable::UNALLOCATED: {
globals_->Add(variable->name(), zone());
Handle<SharedFunctionInfo> function =
- Compiler::BuildFunctionInfo(declaration->fun(), script());
+ Compiler::BuildFunctionInfo(declaration->fun(), script(), info_);
// Check for stack overflow exception.
if (function.is_null()) return SetStackOverflow();
globals_->Add(function, zone());
=======================================
--- /branches/bleeding_edge/src/compiler.cc Wed Jul 23 08:27:04 2014 UTC
+++ /branches/bleeding_edge/src/compiler.cc Wed Jul 23 09:35:06 2014 UTC
@@ -1025,13 +1025,15 @@
}
-Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral*
literal,
- Handle<Script>
script) {
+Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(
+ FunctionLiteral* literal, Handle<Script> script,
+ CompilationInfo* outer_info) {
// Precondition: code has been parsed and scopes have been analyzed.
CompilationInfoWithZone info(script);
info.SetFunction(literal);
info.PrepareForCompilation(literal->scope());
info.SetStrictMode(literal->scope()->strict_mode());
+ if (outer_info->will_serialize()) info.PrepareForSerializing();
Isolate* isolate = info.isolate();
Factory* factory = isolate->factory();
=======================================
--- /branches/bleeding_edge/src/compiler.h Wed Jul 16 12:18:33 2014 UTC
+++ /branches/bleeding_edge/src/compiler.h Wed Jul 23 09:35:06 2014 UTC
@@ -693,8 +693,9 @@
NativesFlag is_natives_code);
// Create a shared function info object (the code may be lazily
compiled).
- static Handle<SharedFunctionInfo> BuildFunctionInfo(FunctionLiteral*
node,
- Handle<Script>
script);
+ static Handle<SharedFunctionInfo> BuildFunctionInfo(
+ FunctionLiteral* node, Handle<Script> script,
+ CompilationInfo* outer = NULL);
enum ConcurrencyMode { NOT_CONCURRENT, CONCURRENT };
=======================================
--- /branches/bleeding_edge/src/full-codegen.cc Mon Jul 21 09:58:01 2014 UTC
+++ /branches/bleeding_edge/src/full-codegen.cc Wed Jul 23 09:35:06 2014 UTC
@@ -1512,7 +1512,7 @@
// Build the function boilerplate and instantiate it.
Handle<SharedFunctionInfo> function_info =
- Compiler::BuildFunctionInfo(expr, script());
+ Compiler::BuildFunctionInfo(expr, script(), info_);
if (function_info.is_null()) {
SetStackOverflow();
return;
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Tue Jul 22 14:27:53 2014 UTC
+++ /branches/bleeding_edge/src/hydrogen.cc Wed Jul 23 09:35:06 2014 UTC
@@ -5226,7 +5226,8 @@
ASSERT(current_block()->HasPredecessor());
Handle<SharedFunctionInfo> shared_info = expr->shared_info();
if (shared_info.is_null()) {
- shared_info = Compiler::BuildFunctionInfo(expr,
current_info()->script());
+ shared_info =
+ Compiler::BuildFunctionInfo(expr, current_info()->script(),
top_info());
}
// We also have a stack overflow if the recursive compilation did.
if (HasStackOverflow()) return;
@@ -11239,7 +11240,7 @@
case Variable::UNALLOCATED: {
globals_.Add(variable->name(), zone());
Handle<SharedFunctionInfo> function = Compiler::BuildFunctionInfo(
- declaration->fun(), current_info()->script());
+ declaration->fun(), current_info()->script(), top_info());
// Check for stack-overflow exception.
if (function.is_null()) return SetStackOverflow();
globals_.Add(function, zone());
=======================================
--- /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Mon Jul 21
11:19:56 2014 UTC
+++ /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Wed Jul 23
09:35:06 2014 UTC
@@ -817,7 +817,7 @@
case Variable::UNALLOCATED: {
globals_->Add(variable->name(), zone());
Handle<SharedFunctionInfo> function =
- Compiler::BuildFunctionInfo(declaration->fun(), script());
+ Compiler::BuildFunctionInfo(declaration->fun(), script(), info_);
// Check for stack-overflow exception.
if (function.is_null()) return SetStackOverflow();
globals_->Add(function, zone());
=======================================
--- /branches/bleeding_edge/src/mips/full-codegen-mips.cc Mon Jul 21
19:09:56 2014 UTC
+++ /branches/bleeding_edge/src/mips/full-codegen-mips.cc Wed Jul 23
09:35:06 2014 UTC
@@ -871,7 +871,7 @@
case Variable::UNALLOCATED: {
globals_->Add(variable->name(), zone());
Handle<SharedFunctionInfo> function =
- Compiler::BuildFunctionInfo(declaration->fun(), script());
+ Compiler::BuildFunctionInfo(declaration->fun(), script(), info_);
// Check for stack-overflow exception.
if (function.is_null()) return SetStackOverflow();
globals_->Add(function, zone());
=======================================
--- /branches/bleeding_edge/src/mips64/full-codegen-mips64.cc Mon Jul 21
19:09:56 2014 UTC
+++ /branches/bleeding_edge/src/mips64/full-codegen-mips64.cc Wed Jul 23
09:35:06 2014 UTC
@@ -867,7 +867,7 @@
case Variable::UNALLOCATED: {
globals_->Add(variable->name(), zone());
Handle<SharedFunctionInfo> function =
- Compiler::BuildFunctionInfo(declaration->fun(), script());
+ Compiler::BuildFunctionInfo(declaration->fun(), script(), info_);
// Check for stack-overflow exception.
if (function.is_null()) return SetStackOverflow();
globals_->Add(function, zone());
=======================================
--- /branches/bleeding_edge/src/x64/full-codegen-x64.cc Mon Jul 21 11:19:56
2014 UTC
+++ /branches/bleeding_edge/src/x64/full-codegen-x64.cc Wed Jul 23 09:35:06
2014 UTC
@@ -839,7 +839,7 @@
case Variable::UNALLOCATED: {
globals_->Add(variable->name(), zone());
Handle<SharedFunctionInfo> function =
- Compiler::BuildFunctionInfo(declaration->fun(), script());
+ Compiler::BuildFunctionInfo(declaration->fun(), script(), info_);
// Check for stack-overflow exception.
if (function.is_null()) return SetStackOverflow();
globals_->Add(function, zone());
=======================================
--- /branches/bleeding_edge/src/x87/full-codegen-x87.cc Wed Jul 23 07:48:19
2014 UTC
+++ /branches/bleeding_edge/src/x87/full-codegen-x87.cc Wed Jul 23 09:35:06
2014 UTC
@@ -816,7 +816,7 @@
case Variable::UNALLOCATED: {
globals_->Add(variable->name(), zone());
Handle<SharedFunctionInfo> function =
- Compiler::BuildFunctionInfo(declaration->fun(), script());
+ Compiler::BuildFunctionInfo(declaration->fun(), script(), info_);
// Check for stack-overflow exception.
if (function.is_null()) return SetStackOverflow();
globals_->Add(function, zone());
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.