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/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/debug.h" | 9 #include "src/debug.h" |
10 #include "src/full-codegen.h" | 10 #include "src/full-codegen.h" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 void BreakableStatementChecker::VisitCompareOperation(CompareOperation* expr) { | 278 void BreakableStatementChecker::VisitCompareOperation(CompareOperation* expr) { |
279 Visit(expr->left()); | 279 Visit(expr->left()); |
280 Visit(expr->right()); | 280 Visit(expr->right()); |
281 } | 281 } |
282 | 282 |
283 | 283 |
284 void BreakableStatementChecker::VisitThisFunction(ThisFunction* expr) { | 284 void BreakableStatementChecker::VisitThisFunction(ThisFunction* expr) { |
285 } | 285 } |
286 | 286 |
287 | 287 |
| 288 void BreakableStatementChecker::VisitSuperReference(SuperReference* expr) {} |
| 289 |
| 290 |
288 #define __ ACCESS_MASM(masm()) | 291 #define __ ACCESS_MASM(masm()) |
289 | 292 |
290 bool FullCodeGenerator::MakeCode(CompilationInfo* info) { | 293 bool FullCodeGenerator::MakeCode(CompilationInfo* info) { |
291 Isolate* isolate = info->isolate(); | 294 Isolate* isolate = info->isolate(); |
292 | 295 |
293 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); | 296 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); |
294 | 297 |
295 Handle<Script> script = info->script(); | 298 Handle<Script> script = info->script(); |
296 if (!script->IsUndefined() && !script->source()->IsUndefined()) { | 299 if (!script->IsUndefined() && !script->source()->IsUndefined()) { |
297 int len = String::cast(script->source())->length(); | 300 int len = String::cast(script->source())->length(); |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 masm_, stmt->position(), !checker.is_breakable()); | 815 masm_, stmt->position(), !checker.is_breakable()); |
813 // If the position recording did record a new position generate a debug | 816 // If the position recording did record a new position generate a debug |
814 // break slot to make the statement breakable. | 817 // break slot to make the statement breakable. |
815 if (position_recorded) { | 818 if (position_recorded) { |
816 DebugCodegen::GenerateSlot(masm_); | 819 DebugCodegen::GenerateSlot(masm_); |
817 } | 820 } |
818 } | 821 } |
819 } | 822 } |
820 | 823 |
821 | 824 |
| 825 void FullCodeGenerator::VisitSuperReference(SuperReference* super) { |
| 826 DCHECK(FLAG_harmony_classes); |
| 827 UNIMPLEMENTED(); |
| 828 } |
| 829 |
| 830 |
822 void FullCodeGenerator::SetExpressionPosition(Expression* expr) { | 831 void FullCodeGenerator::SetExpressionPosition(Expression* expr) { |
823 if (!info_->is_debug()) { | 832 if (!info_->is_debug()) { |
824 CodeGenerator::RecordPositions(masm_, expr->position()); | 833 CodeGenerator::RecordPositions(masm_, expr->position()); |
825 } else { | 834 } else { |
826 // Check if the expression will be breakable without adding a debug break | 835 // Check if the expression will be breakable without adding a debug break |
827 // slot. | 836 // slot. |
828 BreakableStatementChecker checker(zone()); | 837 BreakableStatementChecker checker(zone()); |
829 checker.Check(expr); | 838 checker.Check(expr); |
830 // Record a statement position right here if the expression is not | 839 // Record a statement position right here if the expression is not |
831 // breakable. For breakable expressions the actual recording of the | 840 // breakable. For breakable expressions the actual recording of the |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1682 } | 1691 } |
1683 return true; | 1692 return true; |
1684 } | 1693 } |
1685 #endif // DEBUG | 1694 #endif // DEBUG |
1686 | 1695 |
1687 | 1696 |
1688 #undef __ | 1697 #undef __ |
1689 | 1698 |
1690 | 1699 |
1691 } } // namespace v8::internal | 1700 } } // namespace v8::internal |
OLD | NEW |