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

Side by Side Diff: src/arm/stub-cache-arm.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/arm/builtins-arm.cc ('k') | src/builtins.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 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 PushInterceptorArguments(masm(), receiver, holder_reg, 1205 PushInterceptorArguments(masm(), receiver, holder_reg,
1206 name_reg, interceptor_holder); 1206 name_reg, interceptor_holder);
1207 1207
1208 ExternalReference ref = ExternalReference( 1208 ExternalReference ref = ExternalReference(
1209 IC_Utility(IC::kLoadPropertyWithInterceptorForLoad)); 1209 IC_Utility(IC::kLoadPropertyWithInterceptorForLoad));
1210 __ TailCallExternalReference(ref, 5, 1); 1210 __ TailCallExternalReference(ref, 5, 1);
1211 } 1211 }
1212 } 1212 }
1213 1213
1214 1214
1215 Object* StubCompiler::CompileLazyCompile(Code::Flags flags) {
1216 // ----------- S t a t e -------------
1217 // -- r1: function
1218 // -- lr: return address
1219 // -----------------------------------
1220
1221 // Enter an internal frame.
1222 __ EnterInternalFrame();
1223
1224 // Preserve the function.
1225 __ push(r1);
1226
1227 // Push the function on the stack as the argument to the runtime function.
1228 __ push(r1);
1229 __ CallRuntime(Runtime::kLazyCompile, 1);
1230
1231 // Calculate the entry point.
1232 __ add(r2, r0, Operand(Code::kHeaderSize - kHeapObjectTag));
1233
1234 // Restore saved function.
1235 __ pop(r1);
1236
1237 // Tear down temporary frame.
1238 __ LeaveInternalFrame();
1239
1240 // Do a tail-call of the compiled function.
1241 __ Jump(r2);
1242
1243 return GetCodeWithFlags(flags, "LazyCompileStub");
1244 }
1245
1246
1247 void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) { 1215 void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) {
1248 if (kind_ == Code::KEYED_CALL_IC) { 1216 if (kind_ == Code::KEYED_CALL_IC) {
1249 __ cmp(r2, Operand(Handle<String>(name))); 1217 __ cmp(r2, Operand(Handle<String>(name)));
1250 __ b(ne, miss); 1218 __ b(ne, miss);
1251 } 1219 }
1252 } 1220 }
1253 1221
1254 1222
1255 Object* CallStubCompiler::GenerateMissBranch() { 1223 Object* CallStubCompiler::GenerateMissBranch() {
1256 Object* obj = StubCache::ComputeCallMiss(arguments().immediate(), kind_); 1224 Object* obj = StubCache::ComputeCallMiss(arguments().immediate(), kind_);
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2386 // Return the generated code. 2354 // Return the generated code.
2387 return GetCode(); 2355 return GetCode();
2388 } 2356 }
2389 2357
2390 2358
2391 #undef __ 2359 #undef __
2392 2360
2393 } } // namespace v8::internal 2361 } } // namespace v8::internal
2394 2362
2395 #endif // V8_TARGET_ARCH_ARM 2363 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698