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

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

Issue 14847004: Turn the load field code stub into a hydrogen code stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 7 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/code-stubs-ia32.cc ('k') | src/stub-cache.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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 if (!global.is_null()) { 1229 if (!global.is_null()) {
1230 GenerateCheckPropertyCell(masm(), global, name, scratch2(), &miss); 1230 GenerateCheckPropertyCell(masm(), global, name, scratch2(), &miss);
1231 } 1231 }
1232 1232
1233 HandlerFrontendFooter(success, &miss); 1233 HandlerFrontendFooter(success, &miss);
1234 } 1234 }
1235 1235
1236 1236
1237 void BaseLoadStubCompiler::GenerateLoadField(Register reg, 1237 void BaseLoadStubCompiler::GenerateLoadField(Register reg,
1238 Handle<JSObject> holder, 1238 Handle<JSObject> holder,
1239 PropertyIndex index) { 1239 PropertyIndex field) {
1240 // Get the value from the properties. 1240 if (!reg.is(receiver())) __ mov(receiver(), reg);
1241 GenerateFastPropertyLoad(masm(), eax, reg, holder, index); 1241 if (kind() == Code::LOAD_IC) {
1242 __ ret(0); 1242 LoadFieldStub stub(field.is_inobject(holder),
1243 field.translate(holder));
1244 GenerateTailCall(masm(), stub.GetCode(isolate()));
1245 } else {
1246 KeyedLoadFieldStub stub(field.is_inobject(holder),
1247 field.translate(holder));
1248 GenerateTailCall(masm(), stub.GetCode(isolate()));
1249 }
1243 } 1250 }
1244 1251
1245 1252
1246 void BaseLoadStubCompiler::GenerateLoadCallback( 1253 void BaseLoadStubCompiler::GenerateLoadCallback(
1247 Register reg, 1254 Register reg,
1248 Handle<ExecutableAccessorInfo> callback) { 1255 Handle<ExecutableAccessorInfo> callback) {
1249 // Insert additional parameters into the stack frame above return address. 1256 // Insert additional parameters into the stack frame above return address.
1250 ASSERT(!scratch3().is(reg)); 1257 ASSERT(!scratch3().is(reg));
1251 __ pop(scratch3()); // Get return address to place it below. 1258 __ pop(scratch3()); // Get return address to place it below.
1252 1259
(...skipping 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after
3743 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); 3750 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow);
3744 } 3751 }
3745 } 3752 }
3746 3753
3747 3754
3748 #undef __ 3755 #undef __
3749 3756
3750 } } // namespace v8::internal 3757 } } // namespace v8::internal
3751 3758
3752 #endif // V8_TARGET_ARCH_IA32 3759 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698