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

Side by Side Diff: src/ia32/full-codegen-ia32.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/full-codegen.cc ('k') | src/mips/full-codegen-mips.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 2223 matching lines...) Expand 10 before | Expand all | Expand 10 after
2234 2234
2235 // Push the start position of the scope the calls resides in. 2235 // Push the start position of the scope the calls resides in.
2236 __ push(Immediate(Smi::FromInt(scope()->start_position()))); 2236 __ push(Immediate(Smi::FromInt(scope()->start_position())));
2237 2237
2238 // Do the runtime call. 2238 // Do the runtime call.
2239 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5); 2239 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5);
2240 } 2240 }
2241 2241
2242 2242
2243 void FullCodeGenerator::VisitCall(Call* expr) { 2243 void FullCodeGenerator::VisitCall(Call* expr) {
2244 ImmediateReturnDisabled disable(this);
2244 #ifdef DEBUG 2245 #ifdef DEBUG
2245 // We want to verify that RecordJSReturnSite gets called on all paths 2246 // We want to verify that RecordJSReturnSite gets called on all paths
2246 // through this function. Avoid early returns. 2247 // through this function. Avoid early returns.
2247 expr->return_is_recorded_ = false; 2248 expr->return_is_recorded_ = false;
2248 #endif 2249 #endif
2249 2250
2250 Comment cmnt(masm_, "[ Call"); 2251 Comment cmnt(masm_, "[ Call");
2251 Expression* callee = expr->expression(); 2252 Expression* callee = expr->expression();
2252 VariableProxy* proxy = callee->AsVariableProxy(); 2253 VariableProxy* proxy = callee->AsVariableProxy();
2253 Property* property = callee->AsProperty(); 2254 Property* property = callee->AsProperty();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 } 2354 }
2354 2355
2355 #ifdef DEBUG 2356 #ifdef DEBUG
2356 // RecordJSReturnSite should have been called. 2357 // RecordJSReturnSite should have been called.
2357 ASSERT(expr->return_is_recorded_); 2358 ASSERT(expr->return_is_recorded_);
2358 #endif 2359 #endif
2359 } 2360 }
2360 2361
2361 2362
2362 void FullCodeGenerator::VisitCallNew(CallNew* expr) { 2363 void FullCodeGenerator::VisitCallNew(CallNew* expr) {
2364 ImmediateReturnDisabled disable(this);
2363 Comment cmnt(masm_, "[ CallNew"); 2365 Comment cmnt(masm_, "[ CallNew");
2364 // According to ECMA-262, section 11.2.2, page 44, the function 2366 // According to ECMA-262, section 11.2.2, page 44, the function
2365 // expression in new calls must be evaluated before the 2367 // expression in new calls must be evaluated before the
2366 // arguments. 2368 // arguments.
2367 2369
2368 // Push constructor on the stack. If it's not a function it's used as 2370 // Push constructor on the stack. If it's not a function it's used as
2369 // receiver for CALL_NON_FUNCTION, otherwise the value on the stack is 2371 // receiver for CALL_NON_FUNCTION, otherwise the value on the stack is
2370 // ignored. 2372 // ignored.
2371 VisitForStackValue(expr->expression()); 2373 VisitForStackValue(expr->expression());
2372 2374
(...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after
3772 __ mov(eax, result_operand); 3774 __ mov(eax, result_operand);
3773 // Drop temp values from the stack, and restore context register. 3775 // Drop temp values from the stack, and restore context register.
3774 __ add(esp, Immediate(3 * kPointerSize)); 3776 __ add(esp, Immediate(3 * kPointerSize));
3775 3777
3776 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 3778 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
3777 context()->Plug(eax); 3779 context()->Plug(eax);
3778 } 3780 }
3779 3781
3780 3782
3781 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { 3783 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
3784 ImmediateReturnDisabled disable(this);
3782 Handle<String> name = expr->name(); 3785 Handle<String> name = expr->name();
3783 if (name->length() > 0 && name->Get(0) == '_') { 3786 if (name->length() > 0 && name->Get(0) == '_') {
3784 Comment cmnt(masm_, "[ InlineRuntimeCall"); 3787 Comment cmnt(masm_, "[ InlineRuntimeCall");
3785 EmitInlineRuntimeCall(expr); 3788 EmitInlineRuntimeCall(expr);
3786 return; 3789 return;
3787 } 3790 }
3788 3791
3789 Comment cmnt(masm_, "[ CallRuntime"); 3792 Comment cmnt(masm_, "[ CallRuntime");
3790 ZoneList<Expression*>* args = expr->arguments(); 3793 ZoneList<Expression*>* args = expr->arguments();
3791 3794
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
4496 *context_length = 0; 4499 *context_length = 0;
4497 return previous_; 4500 return previous_;
4498 } 4501 }
4499 4502
4500 4503
4501 #undef __ 4504 #undef __
4502 4505
4503 } } // namespace v8::internal 4506 } } // namespace v8::internal
4504 4507
4505 #endif // V8_TARGET_ARCH_IA32 4508 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698