Version 3.6.6
Added a GC pause visualization tool.
Added presubmit=no and werror=no flags to Makefile.
ES5/Test262 conformance improvements.
Fixed compilation issues with GCC 4.5.x (issue 1743).
Bug fixes and performance improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@9570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/full-codegen.cc b/src/full-codegen.cc
index e822588..b02c1df 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -820,9 +820,19 @@
if (stmt->block_scope() != NULL) {
{ Comment cmnt(masm_, "[ Extend block context");
scope_ = stmt->block_scope();
- __ Push(scope_->GetSerializedScopeInfo());
+ Handle<SerializedScopeInfo> scope_info = scope_->GetSerializedScopeInfo();
+ int heap_slots =
+ scope_info->NumberOfContextSlots() - Context::MIN_CONTEXT_SLOTS;
+ __ Push(scope_info);
PushFunctionArgumentForContextAllocation();
- __ CallRuntime(Runtime::kPushBlockContext, 2);
+ if (heap_slots <= FastNewBlockContextStub::kMaximumSlots) {
+ FastNewBlockContextStub stub(heap_slots);
+ __ CallStub(&stub);
+ } else {
+ __ CallRuntime(Runtime::kPushBlockContext, 2);
+ }
+
+ // Replace the context stored in the frame.
StoreToFrameField(StandardFrameConstants::kContextOffset,
context_register());
}