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

Side by Side Diff: src/arm/stub-cache-arm.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/arm/code-stubs-arm.cc ('k') | src/code-stubs.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 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 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 if (!global.is_null()) { 1302 if (!global.is_null()) {
1303 GenerateCheckPropertyCell(masm(), global, name, scratch2(), &miss); 1303 GenerateCheckPropertyCell(masm(), global, name, scratch2(), &miss);
1304 } 1304 }
1305 1305
1306 HandlerFrontendFooter(success, &miss); 1306 HandlerFrontendFooter(success, &miss);
1307 } 1307 }
1308 1308
1309 1309
1310 void BaseLoadStubCompiler::GenerateLoadField(Register reg, 1310 void BaseLoadStubCompiler::GenerateLoadField(Register reg,
1311 Handle<JSObject> holder, 1311 Handle<JSObject> holder,
1312 PropertyIndex index) { 1312 PropertyIndex field) {
1313 GenerateFastPropertyLoad(masm(), r0, reg, holder, index); 1313 if (!reg.is(receiver())) __ mov(receiver(), reg);
1314 __ Ret(); 1314 if (kind() == Code::LOAD_IC) {
1315 LoadFieldStub stub(field.is_inobject(holder),
1316 field.translate(holder));
1317 GenerateTailCall(masm(), stub.GetCode(isolate()));
1318 } else {
1319 KeyedLoadFieldStub stub(field.is_inobject(holder),
1320 field.translate(holder));
1321 GenerateTailCall(masm(), stub.GetCode(isolate()));
1322 }
1315 } 1323 }
1316 1324
1317 1325
1318 void BaseLoadStubCompiler::GenerateLoadConstant(Handle<JSFunction> value) { 1326 void BaseLoadStubCompiler::GenerateLoadConstant(Handle<JSFunction> value) {
1319 // Return the constant value. 1327 // Return the constant value.
1320 __ LoadHeapObject(r0, value); 1328 __ LoadHeapObject(r0, value);
1321 __ Ret(); 1329 __ Ret();
1322 } 1330 }
1323 1331
1324 1332
(...skipping 2377 matching lines...) Expand 10 before | Expand all | Expand 10 after
3702 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); 3710 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow);
3703 } 3711 }
3704 } 3712 }
3705 3713
3706 3714
3707 #undef __ 3715 #undef __
3708 3716
3709 } } // namespace v8::internal 3717 } } // namespace v8::internal
3710 3718
3711 #endif // V8_TARGET_ARCH_ARM 3719 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698