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

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

Issue 8585001: Adapt source position recording and fix ScopeIterator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Statement positions for return sequences. Created 9 years, 1 month 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 952
953 void FullCodeGenerator::VisitWithStatement(WithStatement* stmt) { 953 void FullCodeGenerator::VisitWithStatement(WithStatement* stmt) {
954 Comment cmnt(masm_, "[ WithStatement"); 954 Comment cmnt(masm_, "[ WithStatement");
955 SetStatementPosition(stmt); 955 SetStatementPosition(stmt);
956 956
957 VisitForStackValue(stmt->expression()); 957 VisitForStackValue(stmt->expression());
958 PushFunctionArgumentForContextAllocation(); 958 PushFunctionArgumentForContextAllocation();
959 __ CallRuntime(Runtime::kPushWithContext, 2); 959 __ CallRuntime(Runtime::kPushWithContext, 2);
960 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); 960 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register());
961 961
962 Scope* saved_scope = scope();
962 { WithOrCatch body(this); 963 { WithOrCatch body(this);
963 Visit(stmt->statement()); 964 Visit(stmt->statement());
964 } 965 }
966 scope_ = saved_scope;
965 967
966 // Pop context. 968 // Pop context.
967 LoadContextField(context_register(), Context::PREVIOUS_INDEX); 969 LoadContextField(context_register(), Context::PREVIOUS_INDEX);
968 // Update local stack frame context field. 970 // Update local stack frame context field.
969 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); 971 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register());
970 } 972 }
971 973
972 974
973 void FullCodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) { 975 void FullCodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) {
974 Comment cmnt(masm_, "[ DoWhileStatement"); 976 Comment cmnt(masm_, "[ DoWhileStatement");
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 } 1303 }
1302 1304
1303 return false; 1305 return false;
1304 } 1306 }
1305 1307
1306 1308
1307 #undef __ 1309 #undef __
1308 1310
1309 1311
1310 } } // namespace v8::internal 1312 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698