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

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

Issue 9752002: This patch is an effort to simplify cascading jumps to return label in such case: Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 9 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/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.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 // 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 2252 matching lines...) Expand 10 before | Expand all | Expand 10 after
2263 // Push the start position of the scope the calls resides in. 2263 // Push the start position of the scope the calls resides in.
2264 __ li(a1, Operand(Smi::FromInt(scope()->start_position()))); 2264 __ li(a1, Operand(Smi::FromInt(scope()->start_position())));
2265 __ push(a1); 2265 __ push(a1);
2266 2266
2267 // Do the runtime call. 2267 // Do the runtime call.
2268 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5); 2268 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5);
2269 } 2269 }
2270 2270
2271 2271
2272 void FullCodeGenerator::VisitCall(Call* expr) { 2272 void FullCodeGenerator::VisitCall(Call* expr) {
2273 ImmediateReturnDisabled disable(this);
2273 #ifdef DEBUG 2274 #ifdef DEBUG
2274 // We want to verify that RecordJSReturnSite gets called on all paths 2275 // We want to verify that RecordJSReturnSite gets called on all paths
2275 // through this function. Avoid early returns. 2276 // through this function. Avoid early returns.
2276 expr->return_is_recorded_ = false; 2277 expr->return_is_recorded_ = false;
2277 #endif 2278 #endif
2278 2279
2279 Comment cmnt(masm_, "[ Call"); 2280 Comment cmnt(masm_, "[ Call");
2280 Expression* callee = expr->expression(); 2281 Expression* callee = expr->expression();
2281 VariableProxy* proxy = callee->AsVariableProxy(); 2282 VariableProxy* proxy = callee->AsVariableProxy();
2282 Property* property = callee->AsProperty(); 2283 Property* property = callee->AsProperty();
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2388 } 2389 }
2389 2390
2390 #ifdef DEBUG 2391 #ifdef DEBUG
2391 // RecordJSReturnSite should have been called. 2392 // RecordJSReturnSite should have been called.
2392 ASSERT(expr->return_is_recorded_); 2393 ASSERT(expr->return_is_recorded_);
2393 #endif 2394 #endif
2394 } 2395 }
2395 2396
2396 2397
2397 void FullCodeGenerator::VisitCallNew(CallNew* expr) { 2398 void FullCodeGenerator::VisitCallNew(CallNew* expr) {
2399 ImmediateReturnDisabled disable(this);
2398 Comment cmnt(masm_, "[ CallNew"); 2400 Comment cmnt(masm_, "[ CallNew");
2399 // According to ECMA-262, section 11.2.2, page 44, the function 2401 // According to ECMA-262, section 11.2.2, page 44, the function
2400 // expression in new calls must be evaluated before the 2402 // expression in new calls must be evaluated before the
2401 // arguments. 2403 // arguments.
2402 2404
2403 // Push constructor on the stack. If it's not a function it's used as 2405 // Push constructor on the stack. If it's not a function it's used as
2404 // receiver for CALL_NON_FUNCTION, otherwise the value on the stack is 2406 // receiver for CALL_NON_FUNCTION, otherwise the value on the stack is
2405 // ignored. 2407 // ignored.
2406 VisitForStackValue(expr->expression()); 2408 VisitForStackValue(expr->expression());
2407 2409
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
3792 __ Branch(&done); 3794 __ Branch(&done);
3793 3795
3794 __ bind(&bailout); 3796 __ bind(&bailout);
3795 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); 3797 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
3796 __ bind(&done); 3798 __ bind(&done);
3797 context()->Plug(v0); 3799 context()->Plug(v0);
3798 } 3800 }
3799 3801
3800 3802
3801 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { 3803 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
3804 ImmediateReturnDisabled disable(this);
3802 Handle<String> name = expr->name(); 3805 Handle<String> name = expr->name();
3803 if (name->length() > 0 && name->Get(0) == '_') { 3806 if (name->length() > 0 && name->Get(0) == '_') {
3804 Comment cmnt(masm_, "[ InlineRuntimeCall"); 3807 Comment cmnt(masm_, "[ InlineRuntimeCall");
3805 EmitInlineRuntimeCall(expr); 3808 EmitInlineRuntimeCall(expr);
3806 return; 3809 return;
3807 } 3810 }
3808 3811
3809 Comment cmnt(masm_, "[ CallRuntime"); 3812 Comment cmnt(masm_, "[ CallRuntime");
3810 ZoneList<Expression*>* args = expr->arguments(); 3813 ZoneList<Expression*>* args = expr->arguments();
3811 3814
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
4503 *context_length = 0; 4506 *context_length = 0;
4504 return previous_; 4507 return previous_;
4505 } 4508 }
4506 4509
4507 4510
4508 #undef __ 4511 #undef __
4509 4512
4510 } } // namespace v8::internal 4513 } } // namespace v8::internal
4511 4514
4512 #endif // V8_TARGET_ARCH_MIPS 4515 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698