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

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: Removed debug print 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 3267 matching lines...) Expand 10 before | Expand all | Expand 10 after
3278 __ movdbl(double_result, Operand(esp, 0)); 3278 __ movdbl(double_result, Operand(esp, 0));
3279 __ add(esp, Immediate(kDoubleSize)); 3279 __ add(esp, Immediate(kDoubleSize));
3280 3280
3281 __ bind(&done); 3281 __ bind(&done);
3282 __ IncrementCounter(counters->math_pow(), 1); 3282 __ IncrementCounter(counters->math_pow(), 1);
3283 __ ret(0); 3283 __ ret(0);
3284 } 3284 }
3285 } 3285 }
3286 3286
3287 3287
3288 void ArrayLengthStub::Generate(MacroAssembler* masm) {
3289 // ----------- S t a t e -------------
3290 // -- ecx : name
3291 // -- edx : receiver
3292 // -- esp[0] : return address
3293 // -----------------------------------
3294 Label miss;
3295
3296 if (kind() == Code::KEYED_LOAD_IC) {
3297 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string()));
3298 __ j(not_equal, &miss);
3299 }
3300
3301 StubCompiler::GenerateLoadArrayLength(masm, edx, eax, &miss);
3302 __ bind(&miss);
3303 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind()));
3304 }
3305
3306
3307 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 3288 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
3308 // ----------- S t a t e ------------- 3289 // ----------- S t a t e -------------
3309 // -- ecx : name 3290 // -- ecx : name
3310 // -- edx : receiver 3291 // -- edx : receiver
3311 // -- esp[0] : return address 3292 // -- esp[0] : return address
3312 // ----------------------------------- 3293 // -----------------------------------
3313 Label miss; 3294 Label miss;
3314 3295
3315 if (kind() == Code::KEYED_LOAD_IC) { 3296 if (kind() == Code::KEYED_LOAD_IC) {
3316 __ cmp(ecx, Immediate(masm->isolate()->factory()->prototype_string())); 3297 __ cmp(ecx, Immediate(masm->isolate()->factory()->prototype_string()));
(...skipping 4543 matching lines...) Expand 10 before | Expand all | Expand 10 after
7860 // Restore ecx. 7841 // Restore ecx.
7861 __ pop(ecx); 7842 __ pop(ecx);
7862 __ ret(0); 7843 __ ret(0);
7863 } 7844 }
7864 7845
7865 #undef __ 7846 #undef __
7866 7847
7867 } } // namespace v8::internal 7848 } } // namespace v8::internal
7868 7849
7869 #endif // V8_TARGET_ARCH_IA32 7850 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698