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

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

Issue 2815003: ARM: Change code generation for function return... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 6 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/arm/virtual-frame-arm.h ('k') | src/virtual-frame-light-inl.h » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 3260 matching lines...) Expand 10 before | Expand all | Expand 10 after
3271 set_in_spilled_code(false); 3271 set_in_spilled_code(false);
3272 Visit(statement); 3272 Visit(statement);
3273 if (frame_ != NULL) { 3273 if (frame_ != NULL) {
3274 frame_->SpillAll(); 3274 frame_->SpillAll();
3275 } 3275 }
3276 set_in_spilled_code(true); 3276 set_in_spilled_code(true);
3277 } 3277 }
3278 3278
3279 3279
3280 void CodeGenerator::VisitStatementsAndSpill(ZoneList<Statement*>* statements) { 3280 void CodeGenerator::VisitStatementsAndSpill(ZoneList<Statement*>* statements) {
3281 #ifdef DEBUG
3282 int original_height = frame_->height();
3283 #endif
3281 ASSERT(in_spilled_code()); 3284 ASSERT(in_spilled_code());
3282 set_in_spilled_code(false); 3285 set_in_spilled_code(false);
3283 VisitStatements(statements); 3286 VisitStatements(statements);
3284 if (frame_ != NULL) { 3287 if (frame_ != NULL) {
3285 frame_->SpillAll(); 3288 frame_->SpillAll();
3286 } 3289 }
3287 set_in_spilled_code(true); 3290 set_in_spilled_code(true);
3291
3292 ASSERT(!has_valid_frame() || frame_->height() == original_height);
3288 } 3293 }
3289 3294
3290 3295
3291 void CodeGenerator::VisitStatements(ZoneList<Statement*>* statements) { 3296 void CodeGenerator::VisitStatements(ZoneList<Statement*>* statements) {
3297 #ifdef DEBUG
3298 int original_height = frame_->height();
3299 #endif
3292 ASSERT(!in_spilled_code()); 3300 ASSERT(!in_spilled_code());
3293 for (int i = 0; has_valid_frame() && i < statements->length(); i++) { 3301 for (int i = 0; has_valid_frame() && i < statements->length(); i++) {
3294 Visit(statements->at(i)); 3302 Visit(statements->at(i));
3295 } 3303 }
3304 ASSERT(!has_valid_frame() || frame_->height() == original_height);
3296 } 3305 }
3297 3306
3298 3307
3299 void CodeGenerator::VisitBlock(Block* node) { 3308 void CodeGenerator::VisitBlock(Block* node) {
3300 ASSERT(!in_spilled_code()); 3309 ASSERT(!in_spilled_code());
3301 Comment cmnt(masm_, "[ Block"); 3310 Comment cmnt(masm_, "[ Block");
3302 CodeForStatementPosition(node); 3311 CodeForStatementPosition(node);
3303 node->break_target()->set_direction(JumpTarget::FORWARD_ONLY); 3312 node->break_target()->set_direction(JumpTarget::FORWARD_ONLY);
3304 VisitStatements(node->statements()); 3313 VisitStatements(node->statements());
3305 if (node->break_target()->is_linked()) { 3314 if (node->break_target()->is_linked()) {
(...skipping 10394 matching lines...) Expand 10 before | Expand all | Expand 10 after
13700 masm.GetCode(&desc); 13709 masm.GetCode(&desc);
13701 // Call the function from C++. 13710 // Call the function from C++.
13702 return FUNCTION_CAST<MemCopyFunction>(buffer); 13711 return FUNCTION_CAST<MemCopyFunction>(buffer);
13703 } 13712 }
13704 13713
13705 #undef __ 13714 #undef __
13706 13715
13707 } } // namespace v8::internal 13716 } } // namespace v8::internal
13708 13717
13709 #endif // V8_TARGET_ARCH_IA32 13718 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/virtual-frame-arm.h ('k') | src/virtual-frame-light-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698