Chromium Code Reviews| Index: src/full-codegen.cc |
| diff --git a/src/full-codegen.cc b/src/full-codegen.cc |
| index 03abfbd85d59b358f1bb758070de41c484a55ea3..70db6114a288bcbb799ccb2d8c3941b265afc015 100644 |
| --- a/src/full-codegen.cc |
| +++ b/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; |
|
Mads Ager (chromium)
2011/06/30 12:08:32
Do you need this change? Don't you have a scope he
Kevin Millikin (Chromium)
2011/06/30 12:30:06
This definitely needs to be the function's scope (
Mads Ager (chromium)
2011/06/30 12:47:44
Should we create an accessor for that then: functi
|
| 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(); |
|
Mads Ager (chromium)
2011/06/30 12:08:32
Could use a comment? We could create a scope objec
Kevin Millikin (Chromium)
2011/06/30 12:30:06
It's only used here and I couldn't think of a comm
Mads Ager (chromium)
2011/06/30 12:47:44
Not sure anything is really needed. You are right
|
| + 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. |