From f7060e27768c550ace7ec48ad8c093466db52dfa Mon Sep 17 00:00:00 2001 From: Leon Clarke Date: Thu, 3 Jun 2010 12:02:55 +0100 Subject: Update V8 to r4730 as required by WebKit r60469 --- src/full-codegen.cc | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'src/full-codegen.cc') diff --git a/src/full-codegen.cc b/src/full-codegen.cc index 699a1e97..2ccbca87 100644 --- a/src/full-codegen.cc +++ b/src/full-codegen.cc @@ -760,11 +760,6 @@ void FullCodeGenerator::VisitWithExitStatement(WithExitStatement* stmt) { } -void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { - UNREACHABLE(); -} - - void FullCodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) { Comment cmnt(masm_, "[ DoWhileStatement"); SetStatementPosition(stmt); @@ -810,6 +805,7 @@ void FullCodeGenerator::VisitWhileStatement(WhileStatement* stmt) { Visit(stmt->body()); __ bind(loop_statement.continue_target()); + // Check stack before looping. __ StackLimitCheck(&stack_limit_hit); __ bind(&stack_check_success); @@ -872,11 +868,6 @@ void FullCodeGenerator::VisitForStatement(ForStatement* stmt) { } -void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { - UNREACHABLE(); -} - - void FullCodeGenerator::VisitTryCatchStatement(TryCatchStatement* stmt) { Comment cmnt(masm_, "[ TryCatchStatement"); SetStatementPosition(stmt); @@ -995,12 +986,6 @@ void FullCodeGenerator::VisitDebuggerStatement(DebuggerStatement* stmt) { } -void FullCodeGenerator::VisitSharedFunctionInfoLiteral( - SharedFunctionInfoLiteral* expr) { - UNREACHABLE(); -} - - void FullCodeGenerator::VisitConditional(Conditional* expr) { Comment cmnt(masm_, "[ Conditional"); Label true_case, false_case, done; @@ -1034,6 +1019,24 @@ void FullCodeGenerator::VisitLiteral(Literal* expr) { } +void FullCodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) { + Comment cmnt(masm_, "[ FunctionLiteral"); + + // Build the function boilerplate and instantiate it. + Handle function_info = + Compiler::BuildFunctionInfo(expr, script(), this); + if (HasStackOverflow()) return; + EmitNewClosure(function_info); +} + + +void FullCodeGenerator::VisitSharedFunctionInfoLiteral( + SharedFunctionInfoLiteral* expr) { + Comment cmnt(masm_, "[ SharedFunctionInfoLiteral"); + EmitNewClosure(expr->shared_function_info()); +} + + void FullCodeGenerator::VisitCatchExtensionObject(CatchExtensionObject* expr) { // Call runtime routine to allocate the catch extension object and // assign the exception value to the catch variable. -- cgit v1.2.3