| OLD | NEW |
| 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 3283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3294 // ----------------------------------- | 3294 // ----------------------------------- |
| 3295 Label miss; | 3295 Label miss; |
| 3296 | 3296 |
| 3297 if (kind() == Code::KEYED_LOAD_IC) { | 3297 if (kind() == Code::KEYED_LOAD_IC) { |
| 3298 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string())); | 3298 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string())); |
| 3299 __ j(not_equal, &miss); | 3299 __ j(not_equal, &miss); |
| 3300 } | 3300 } |
| 3301 | 3301 |
| 3302 StubCompiler::GenerateLoadArrayLength(masm, edx, eax, &miss); | 3302 StubCompiler::GenerateLoadArrayLength(masm, edx, eax, &miss); |
| 3303 __ bind(&miss); | 3303 __ bind(&miss); |
| 3304 StubCompiler::GenerateLoadMiss(masm, kind()); | 3304 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); |
| 3305 } | 3305 } |
| 3306 | 3306 |
| 3307 | 3307 |
| 3308 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 3308 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
| 3309 // ----------- S t a t e ------------- | 3309 // ----------- S t a t e ------------- |
| 3310 // -- ecx : name | 3310 // -- ecx : name |
| 3311 // -- edx : receiver | 3311 // -- edx : receiver |
| 3312 // -- esp[0] : return address | 3312 // -- esp[0] : return address |
| 3313 // ----------------------------------- | 3313 // ----------------------------------- |
| 3314 Label miss; | 3314 Label miss; |
| 3315 | 3315 |
| 3316 if (kind() == Code::KEYED_LOAD_IC) { | 3316 if (kind() == Code::KEYED_LOAD_IC) { |
| 3317 __ cmp(ecx, Immediate(masm->isolate()->factory()->prototype_string())); | 3317 __ cmp(ecx, Immediate(masm->isolate()->factory()->prototype_string())); |
| 3318 __ j(not_equal, &miss); | 3318 __ j(not_equal, &miss); |
| 3319 } | 3319 } |
| 3320 | 3320 |
| 3321 StubCompiler::GenerateLoadFunctionPrototype(masm, edx, eax, ebx, &miss); | 3321 StubCompiler::GenerateLoadFunctionPrototype(masm, edx, eax, ebx, &miss); |
| 3322 __ bind(&miss); | 3322 __ bind(&miss); |
| 3323 StubCompiler::GenerateLoadMiss(masm, kind()); | 3323 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); |
| 3324 } | 3324 } |
| 3325 | 3325 |
| 3326 | 3326 |
| 3327 void StringLengthStub::Generate(MacroAssembler* masm) { | 3327 void StringLengthStub::Generate(MacroAssembler* masm) { |
| 3328 // ----------- S t a t e ------------- | 3328 // ----------- S t a t e ------------- |
| 3329 // -- ecx : name | 3329 // -- ecx : name |
| 3330 // -- edx : receiver | 3330 // -- edx : receiver |
| 3331 // -- esp[0] : return address | 3331 // -- esp[0] : return address |
| 3332 // ----------------------------------- | 3332 // ----------------------------------- |
| 3333 Label miss; | 3333 Label miss; |
| 3334 | 3334 |
| 3335 if (kind() == Code::KEYED_LOAD_IC) { | 3335 if (kind() == Code::KEYED_LOAD_IC) { |
| 3336 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string())); | 3336 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string())); |
| 3337 __ j(not_equal, &miss); | 3337 __ j(not_equal, &miss); |
| 3338 } | 3338 } |
| 3339 | 3339 |
| 3340 StubCompiler::GenerateLoadStringLength(masm, edx, eax, ebx, &miss, | 3340 StubCompiler::GenerateLoadStringLength(masm, edx, eax, ebx, &miss, |
| 3341 support_wrapper_); | 3341 support_wrapper_); |
| 3342 __ bind(&miss); | 3342 __ bind(&miss); |
| 3343 StubCompiler::GenerateLoadMiss(masm, kind()); | 3343 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); |
| 3344 } | 3344 } |
| 3345 | 3345 |
| 3346 | 3346 |
| 3347 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { | 3347 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { |
| 3348 // ----------- S t a t e ------------- | 3348 // ----------- S t a t e ------------- |
| 3349 // -- eax : value | 3349 // -- eax : value |
| 3350 // -- ecx : name | 3350 // -- ecx : name |
| 3351 // -- edx : receiver | 3351 // -- edx : receiver |
| 3352 // -- esp[0] : return address | 3352 // -- esp[0] : return address |
| 3353 // ----------------------------------- | 3353 // ----------------------------------- |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3397 __ push(receiver); | 3397 __ push(receiver); |
| 3398 __ push(value); | 3398 __ push(value); |
| 3399 __ push(scratch); // return address | 3399 __ push(scratch); // return address |
| 3400 | 3400 |
| 3401 ExternalReference ref = | 3401 ExternalReference ref = |
| 3402 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate()); | 3402 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate()); |
| 3403 __ TailCallExternalReference(ref, 2, 1); | 3403 __ TailCallExternalReference(ref, 2, 1); |
| 3404 | 3404 |
| 3405 __ bind(&miss); | 3405 __ bind(&miss); |
| 3406 | 3406 |
| 3407 StubCompiler::GenerateStoreMiss(masm, kind()); | 3407 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); |
| 3408 } | 3408 } |
| 3409 | 3409 |
| 3410 | 3410 |
| 3411 void LoadFieldStub::Generate(MacroAssembler* masm) { | 3411 void LoadFieldStub::Generate(MacroAssembler* masm) { |
| 3412 StubCompiler::DoGenerateFastPropertyLoad(masm, eax, reg_, inobject_, index_); | 3412 StubCompiler::DoGenerateFastPropertyLoad(masm, eax, reg_, inobject_, index_); |
| 3413 __ ret(0); | 3413 __ ret(0); |
| 3414 } | 3414 } |
| 3415 | 3415 |
| 3416 | 3416 |
| 3417 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { | 3417 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
| (...skipping 4453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7871 // Restore ecx. | 7871 // Restore ecx. |
| 7872 __ pop(ecx); | 7872 __ pop(ecx); |
| 7873 __ ret(0); | 7873 __ ret(0); |
| 7874 } | 7874 } |
| 7875 | 7875 |
| 7876 #undef __ | 7876 #undef __ |
| 7877 | 7877 |
| 7878 } } // namespace v8::internal | 7878 } } // namespace v8::internal |
| 7879 | 7879 |
| 7880 #endif // V8_TARGET_ARCH_IA32 | 7880 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |