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

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 3146008: Change lazy compilation stub to a builtin.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 4 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/builtins-ia32.cc ('k') | src/objects-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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 name_reg, interceptor_holder); 1248 name_reg, interceptor_holder);
1249 __ push(scratch2); // restore old return address 1249 __ push(scratch2); // restore old return address
1250 1250
1251 ExternalReference ref = ExternalReference( 1251 ExternalReference ref = ExternalReference(
1252 IC_Utility(IC::kLoadPropertyWithInterceptorForLoad)); 1252 IC_Utility(IC::kLoadPropertyWithInterceptorForLoad));
1253 __ TailCallExternalReference(ref, 5, 1); 1253 __ TailCallExternalReference(ref, 5, 1);
1254 } 1254 }
1255 } 1255 }
1256 1256
1257 1257
1258 // TODO(1241006): Avoid having lazy compile stubs specialized by the
1259 // number of arguments. It is not needed anymore.
1260 Object* StubCompiler::CompileLazyCompile(Code::Flags flags) {
1261 // Enter an internal frame.
1262 __ EnterInternalFrame();
1263
1264 // Push a copy of the function onto the stack.
1265 __ push(edi);
1266
1267 __ push(edi); // function is also the parameter to the runtime call
1268 __ CallRuntime(Runtime::kLazyCompile, 1);
1269 __ pop(edi);
1270
1271 // Tear down temporary frame.
1272 __ LeaveInternalFrame();
1273
1274 // Do a tail-call of the compiled function.
1275 __ lea(ecx, FieldOperand(eax, Code::kHeaderSize));
1276 __ jmp(Operand(ecx));
1277
1278 return GetCodeWithFlags(flags, "LazyCompileStub");
1279 }
1280
1281
1282 void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) { 1258 void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) {
1283 if (kind_ == Code::KEYED_CALL_IC) { 1259 if (kind_ == Code::KEYED_CALL_IC) {
1284 __ cmp(Operand(ecx), Immediate(Handle<String>(name))); 1260 __ cmp(Operand(ecx), Immediate(Handle<String>(name)));
1285 __ j(not_equal, miss, not_taken); 1261 __ j(not_equal, miss, not_taken);
1286 } 1262 }
1287 } 1263 }
1288 1264
1289 1265
1290 Object* CallStubCompiler::GenerateMissBranch() { 1266 Object* CallStubCompiler::GenerateMissBranch() {
1291 Object* obj = StubCache::ComputeCallMiss(arguments().immediate(), kind_); 1267 Object* obj = StubCache::ComputeCallMiss(arguments().immediate(), kind_);
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
2747 // Return the generated code. 2723 // Return the generated code.
2748 return GetCode(); 2724 return GetCode();
2749 } 2725 }
2750 2726
2751 2727
2752 #undef __ 2728 #undef __
2753 2729
2754 } } // namespace v8::internal 2730 } } // namespace v8::internal
2755 2731
2756 #endif // V8_TARGET_ARCH_IA32 2732 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698