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

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

Issue 549158: Refactor the selection of code generator (toplevel or optimizing) and... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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/objects.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 __ mov(ecx, CodeGenerator::GlobalObject()); 1262 __ mov(ecx, CodeGenerator::GlobalObject());
1263 __ push(FieldOperand(ecx, GlobalObject::kGlobalReceiverOffset)); 1263 __ push(FieldOperand(ecx, GlobalObject::kGlobalReceiverOffset));
1264 } else { 1264 } else {
1265 __ push(ebx); 1265 __ push(ebx);
1266 } 1266 }
1267 EmitCallWithStub(expr); 1267 EmitCallWithStub(expr);
1268 } 1268 }
1269 } else { 1269 } else {
1270 // Call to some other expression. If the expression is an anonymous 1270 // Call to some other expression. If the expression is an anonymous
1271 // function literal not called in a loop, mark it as one that should 1271 // function literal not called in a loop, mark it as one that should
1272 // also use the fast code generator. 1272 // also use the full code generator.
1273 FunctionLiteral* lit = fun->AsFunctionLiteral(); 1273 FunctionLiteral* lit = fun->AsFunctionLiteral();
1274 if (lit != NULL && 1274 if (lit != NULL &&
1275 lit->name()->Equals(Heap::empty_string()) && 1275 lit->name()->Equals(Heap::empty_string()) &&
1276 loop_depth() == 0) { 1276 loop_depth() == 0) {
1277 lit->set_try_fast_codegen(true); 1277 lit->set_try_full_codegen(true);
1278 } 1278 }
1279 VisitForValue(fun, kStack); 1279 VisitForValue(fun, kStack);
1280 // Load global receiver object. 1280 // Load global receiver object.
1281 __ mov(ebx, CodeGenerator::GlobalObject()); 1281 __ mov(ebx, CodeGenerator::GlobalObject());
1282 __ push(FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); 1282 __ push(FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset));
1283 // Emit function call. 1283 // Emit function call.
1284 EmitCallWithStub(expr); 1284 EmitCallWithStub(expr);
1285 } 1285 }
1286 } 1286 }
1287 1287
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1832 __ add(Operand(edx), Immediate(masm_->CodeObject())); 1832 __ add(Operand(edx), Immediate(masm_->CodeObject()));
1833 __ mov(Operand(esp, 0), edx); 1833 __ mov(Operand(esp, 0), edx);
1834 // And return. 1834 // And return.
1835 __ ret(0); 1835 __ ret(0);
1836 } 1836 }
1837 1837
1838 1838
1839 #undef __ 1839 #undef __
1840 1840
1841 } } // namespace v8::internal 1841 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698