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

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

Issue 11938013: Migrate ArrayLength (Keyed|Named)LoadIC to CodeStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 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/ia32/ic-ia32.cc ('k') | src/ic.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 3297 matching lines...) Expand 10 before | Expand all | Expand 10 after
3308 name, &miss); 3308 name, &miss);
3309 __ bind(&miss); 3309 __ bind(&miss);
3310 __ DecrementCounter(counters->keyed_load_interceptor(), 1); 3310 __ DecrementCounter(counters->keyed_load_interceptor(), 1);
3311 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 3311 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3312 3312
3313 // Return the generated code. 3313 // Return the generated code.
3314 return GetCode(Code::INTERCEPTOR, name); 3314 return GetCode(Code::INTERCEPTOR, name);
3315 } 3315 }
3316 3316
3317 3317
3318 Handle<Code> KeyedLoadStubCompiler::CompileLoadArrayLength(
3319 Handle<String> name) {
3320 // ----------- S t a t e -------------
3321 // -- ecx : key
3322 // -- edx : receiver
3323 // -- esp[0] : return address
3324 // -----------------------------------
3325 Label miss;
3326
3327 Counters* counters = isolate()->counters();
3328 __ IncrementCounter(counters->keyed_load_array_length(), 1);
3329
3330 // Check that the name has not changed.
3331 __ cmp(ecx, Immediate(name));
3332 __ j(not_equal, &miss);
3333
3334 GenerateLoadArrayLength(masm(), edx, eax, &miss);
3335 __ bind(&miss);
3336 __ DecrementCounter(counters->keyed_load_array_length(), 1);
3337 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3338
3339 // Return the generated code.
3340 return GetCode(Code::CALLBACKS, name);
3341 }
3342
3343
3344 Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype( 3318 Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype(
3345 Handle<String> name) { 3319 Handle<String> name) {
3346 // ----------- S t a t e ------------- 3320 // ----------- S t a t e -------------
3347 // -- ecx : key 3321 // -- ecx : key
3348 // -- edx : receiver 3322 // -- edx : receiver
3349 // -- esp[0] : return address 3323 // -- esp[0] : return address
3350 // ----------------------------------- 3324 // -----------------------------------
3351 Label miss; 3325 Label miss;
3352 3326
3353 Counters* counters = isolate()->counters(); 3327 Counters* counters = isolate()->counters();
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
4138 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 4112 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
4139 } 4113 }
4140 } 4114 }
4141 4115
4142 4116
4143 #undef __ 4117 #undef __
4144 4118
4145 } } // namespace v8::internal 4119 } } // namespace v8::internal
4146 4120
4147 #endif // V8_TARGET_ARCH_IA32 4121 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698