Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: src/full-codegen.cc

Issue 480543002: Parse 'super' keyword. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch for landing (minor fix for tests in release mode) Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698