Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 330 } | 330 } |
| 331 __ Drop(stack_depth); | 331 __ Drop(stack_depth); |
| 332 | 332 |
| 333 EmitReturnSequence(stmt->statement_pos()); | 333 EmitReturnSequence(stmt->statement_pos()); |
| 334 } | 334 } |
| 335 | 335 |
| 336 | 336 |
| 337 | 337 |
| 338 | 338 |
| 339 void FastCodeGenerator::VisitWithEnterStatement(WithEnterStatement* stmt) { | 339 void FastCodeGenerator::VisitWithEnterStatement(WithEnterStatement* stmt) { |
| 340 UNREACHABLE(); | 340 Comment cmnt(masm_, "[ WithEnterStatement"); |
| 341 if (FLAG_debug_info) { | |
|
Kevin Millikin (Chromium)
2009/12/14 16:35:47
SetStatementPosition(stmt)?
Lasse Reichstein
2009/12/16 13:40:31
Should have known it would be in the fast codegen
| |
| 342 CodeGenerator::RecordPositions(masm(), stmt->statement_pos()); | |
| 343 } | |
| 344 | |
| 345 Visit(stmt->expression()); | |
| 346 if (stmt->is_catch_block()) { | |
| 347 __ CallRuntime(Runtime::kPushCatchContext, 1); | |
| 348 } else { | |
| 349 __ CallRuntime(Runtime::kPushContext, 1); | |
| 350 } | |
| 351 // Both runtime calls return the new context in both the context and the | |
| 352 // result registers. | |
| 353 | |
| 354 // Update local stack frame context field. | |
| 355 StoreFrameField(StandardFrameConstants::kContextOffset, context_register()); | |
| 341 } | 356 } |
| 342 | 357 |
| 343 | 358 |
| 344 void FastCodeGenerator::VisitWithExitStatement(WithExitStatement* stmt) { | 359 void FastCodeGenerator::VisitWithExitStatement(WithExitStatement* stmt) { |
| 345 UNREACHABLE(); | 360 Comment cmnt(masm_, "[ WithExitStatement"); |
| 361 if (FLAG_debug_info) { | |
|
Kevin Millikin (Chromium)
2009/12/14 16:35:47
Same.
Lasse Reichstein
2009/12/16 13:40:31
Fixed.
| |
| 362 CodeGenerator::RecordPositions(masm(), stmt->statement_pos()); | |
| 363 } | |
| 364 // Pop context. | |
| 365 LoadContextField(context_register(), Context::PREVIOUS_INDEX); | |
| 366 // Update local stack frame context field. | |
| 367 StoreFrameField(StandardFrameConstants::kContextOffset, context_register()); | |
| 346 } | 368 } |
| 347 | 369 |
| 348 | 370 |
| 349 void FastCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { | 371 void FastCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { |
| 350 UNREACHABLE(); | 372 UNREACHABLE(); |
| 351 } | 373 } |
| 352 | 374 |
| 353 | 375 |
| 354 void FastCodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) { | 376 void FastCodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) { |
| 355 Comment cmnt(masm_, "[ DoWhileStatement"); | 377 Comment cmnt(masm_, "[ DoWhileStatement"); |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 669 __ Drop(stack_depth); | 691 __ Drop(stack_depth); |
| 670 __ PopTryHandler(); | 692 __ PopTryHandler(); |
| 671 return 0; | 693 return 0; |
| 672 } | 694 } |
| 673 | 695 |
| 674 | 696 |
| 675 #undef __ | 697 #undef __ |
| 676 | 698 |
| 677 | 699 |
| 678 } } // namespace v8::internal | 700 } } // namespace v8::internal |
| OLD | NEW |