summaryrefslogtreecommitdiff
path: root/deps/v8/src/full-codegen.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-07-05 11:42:20 -0700
committerRyan Dahl <ry@tinyclouds.org>2011-07-05 11:42:20 -0700
commit32a0752d4932705b652996be30f8e94ad3c12f45 (patch)
tree912b0af1863529fb72627d188025f306ca73445d /deps/v8/src/full-codegen.cc
parent9c771691122d88918f1458f85c37d5294c26900b (diff)
parent6054dcc1302d1a1ef51e215dcf1ad16fb967f1ba (diff)
downloadnode-new-32a0752d4932705b652996be30f8e94ad3c12f45.tar.gz
Merge branch 'V8-3.4'
Diffstat (limited to 'deps/v8/src/full-codegen.cc')
-rw-r--r--deps/v8/src/full-codegen.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/deps/v8/src/full-codegen.cc b/deps/v8/src/full-codegen.cc
index 03abfbd85d..70db6114a2 100644
--- a/deps/v8/src/full-codegen.cc
+++ b/deps/v8/src/full-codegen.cc
@@ -401,7 +401,7 @@ int FullCodeGenerator::SlotOffset(Slot* slot) {
// Adjust by a (parameter or local) base offset.
switch (slot->type()) {
case Slot::PARAMETER:
- offset += (scope()->num_parameters() + 1) * kPointerSize;
+ offset += (info_->scope()->num_parameters() + 1) * kPointerSize;
break;
case Slot::LOCAL:
offset += JavaScriptFrameConstants::kLocal0Offset;
@@ -1106,7 +1106,7 @@ void FullCodeGenerator::VisitTryCatchStatement(TryCatchStatement* stmt) {
// Extend the context before executing the catch block.
{ Comment cmnt(masm_, "[ Extend catch context");
- __ Push(stmt->name());
+ __ Push(stmt->variable()->name());
__ push(result_register());
PushFunctionArgumentForContextAllocation();
__ CallRuntime(Runtime::kPushCatchContext, 3);
@@ -1114,7 +1114,11 @@ void FullCodeGenerator::VisitTryCatchStatement(TryCatchStatement* stmt) {
context_register());
}
+ Scope* saved_scope = scope();
+ scope_ = stmt->scope();
+ ASSERT(scope_->declarations()->is_empty());
Visit(stmt->catch_block());
+ scope_ = saved_scope;
__ jmp(&done);
// Try block code. Sets up the exception handler chain.