| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/ast.h" | 7 #include "src/ast.h" |
| 8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 | 1229 |
| 1230 | 1230 |
| 1231 void FullCodeGenerator::VisitWithStatement(WithStatement* stmt) { | 1231 void FullCodeGenerator::VisitWithStatement(WithStatement* stmt) { |
| 1232 Comment cmnt(masm_, "[ WithStatement"); | 1232 Comment cmnt(masm_, "[ WithStatement"); |
| 1233 SetStatementPosition(stmt); | 1233 SetStatementPosition(stmt); |
| 1234 | 1234 |
| 1235 VisitForStackValue(stmt->expression()); | 1235 VisitForStackValue(stmt->expression()); |
| 1236 PushFunctionArgumentForContextAllocation(); | 1236 PushFunctionArgumentForContextAllocation(); |
| 1237 __ CallRuntime(Runtime::kPushWithContext, 2); | 1237 __ CallRuntime(Runtime::kPushWithContext, 2); |
| 1238 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); | 1238 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); |
| 1239 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); |
| 1239 | 1240 |
| 1240 Scope* saved_scope = scope(); | 1241 Scope* saved_scope = scope(); |
| 1241 scope_ = stmt->scope(); | 1242 scope_ = stmt->scope(); |
| 1242 { WithOrCatch body(this); | 1243 { WithOrCatch body(this); |
| 1243 Visit(stmt->statement()); | 1244 Visit(stmt->statement()); |
| 1244 } | 1245 } |
| 1245 scope_ = saved_scope; | 1246 scope_ = saved_scope; |
| 1246 | 1247 |
| 1247 // Pop context. | 1248 // Pop context. |
| 1248 LoadContextField(context_register(), Context::PREVIOUS_INDEX); | 1249 LoadContextField(context_register(), Context::PREVIOUS_INDEX); |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1825 } | 1826 } |
| 1826 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); | 1827 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); |
| 1827 codegen_->scope_ = saved_scope_; | 1828 codegen_->scope_ = saved_scope_; |
| 1828 } | 1829 } |
| 1829 | 1830 |
| 1830 | 1831 |
| 1831 #undef __ | 1832 #undef __ |
| 1832 | 1833 |
| 1833 | 1834 |
| 1834 } } // namespace v8::internal | 1835 } } // namespace v8::internal |
| OLD | NEW |