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 3297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::CompileLoadFunctionPrototype( | |
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_function_prototype(), 1); | |
3329 | |
3330 // Check that the name has not changed. | |
3331 __ cmp(ecx, Immediate(name)); | |
3332 __ j(not_equal, &miss); | |
3333 | |
3334 GenerateLoadFunctionPrototype(masm(), edx, eax, ebx, &miss); | |
3335 __ bind(&miss); | |
3336 __ DecrementCounter(counters->keyed_load_function_prototype(), 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::CompileLoadElement( | 3318 Handle<Code> KeyedLoadStubCompiler::CompileLoadElement( |
3345 Handle<Map> receiver_map) { | 3319 Handle<Map> receiver_map) { |
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 | 3325 |
3352 ElementsKind elements_kind = receiver_map->elements_kind(); | 3326 ElementsKind elements_kind = receiver_map->elements_kind(); |
3353 if (receiver_map->has_fast_elements() || | 3327 if (receiver_map->has_fast_elements() || |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4112 __ jmp(ic_slow, RelocInfo::CODE_TARGET); | 4086 __ jmp(ic_slow, RelocInfo::CODE_TARGET); |
4113 } | 4087 } |
4114 } | 4088 } |
4115 | 4089 |
4116 | 4090 |
4117 #undef __ | 4091 #undef __ |
4118 | 4092 |
4119 } } // namespace v8::internal | 4093 } } // namespace v8::internal |
4120 | 4094 |
4121 #endif // V8_TARGET_ARCH_IA32 | 4095 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |