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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 12700006: Replace ICStub for array.length with hydrogen stub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: New patch Created 7 years, 9 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
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 3268 matching lines...) Expand 10 before | Expand all | Expand 10 after
3279 __ movdbl(double_result, Operand(esp, 0)); 3279 __ movdbl(double_result, Operand(esp, 0));
3280 __ add(esp, Immediate(kDoubleSize)); 3280 __ add(esp, Immediate(kDoubleSize));
3281 3281
3282 __ bind(&done); 3282 __ bind(&done);
3283 __ IncrementCounter(counters->math_pow(), 1); 3283 __ IncrementCounter(counters->math_pow(), 1);
3284 __ ret(0); 3284 __ ret(0);
3285 } 3285 }
3286 } 3286 }
3287 3287
3288 3288
3289 void ArrayLengthStub::Generate(MacroAssembler* masm) {
3290 // ----------- S t a t e -------------
3291 // -- ecx : name
3292 // -- edx : receiver
3293 // -- esp[0] : return address
3294 // -----------------------------------
3295 Label miss;
3296
3297 if (kind() == Code::KEYED_LOAD_IC) {
3298 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string()));
3299 __ j(not_equal, &miss);
3300 }
3301
3302 StubCompiler::GenerateLoadArrayLength(masm, edx, eax, &miss);
3303 __ bind(&miss);
3304 StubCompiler::GenerateLoadMiss(masm, kind());
3305 }
3306
3307
3308 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 3289 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
3309 // ----------- S t a t e ------------- 3290 // ----------- S t a t e -------------
3310 // -- ecx : name 3291 // -- ecx : name
3311 // -- edx : receiver 3292 // -- edx : receiver
3312 // -- esp[0] : return address 3293 // -- esp[0] : return address
3313 // ----------------------------------- 3294 // -----------------------------------
3314 Label miss; 3295 Label miss;
3315 3296
3316 if (kind() == Code::KEYED_LOAD_IC) { 3297 if (kind() == Code::KEYED_LOAD_IC) {
3317 __ cmp(ecx, Immediate(masm->isolate()->factory()->prototype_string())); 3298 __ cmp(ecx, Immediate(masm->isolate()->factory()->prototype_string()));
(...skipping 4553 matching lines...) Expand 10 before | Expand all | Expand 10 after
7871 // Restore ecx. 7852 // Restore ecx.
7872 __ pop(ecx); 7853 __ pop(ecx);
7873 __ ret(0); 7854 __ ret(0);
7874 } 7855 }
7875 7856
7876 #undef __ 7857 #undef __
7877 7858
7878 } } // namespace v8::internal 7859 } } // namespace v8::internal
7879 7860
7880 #endif // V8_TARGET_ARCH_IA32 7861 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698