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

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

Issue 8341009: Make the GC aware of JSReceiver pointers in LookupResults. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Inlined LookupResult constructor and destructor. Created 9 years, 2 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/lithium-codegen-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after
2365 // -- ... 2365 // -- ...
2366 // -- esp[(argc + 1) * 4] : receiver 2366 // -- esp[(argc + 1) * 4] : receiver
2367 // ----------------------------------- 2367 // -----------------------------------
2368 Label miss; 2368 Label miss;
2369 2369
2370 GenerateNameCheck(name, &miss); 2370 GenerateNameCheck(name, &miss);
2371 2371
2372 // Get the number of arguments. 2372 // Get the number of arguments.
2373 const int argc = arguments().immediate(); 2373 const int argc = arguments().immediate();
2374 2374
2375 LookupResult lookup; 2375 LookupResult lookup(isolate());
2376 LookupPostInterceptor(holder, name, &lookup); 2376 LookupPostInterceptor(holder, name, &lookup);
2377 2377
2378 // Get the receiver from the stack. 2378 // Get the receiver from the stack.
2379 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); 2379 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
2380 2380
2381 CallInterceptorCompiler compiler(this, arguments(), ecx, extra_ic_state_); 2381 CallInterceptorCompiler compiler(this, arguments(), ecx, extra_ic_state_);
2382 MaybeObject* result = compiler.Compile(masm(), 2382 MaybeObject* result = compiler.Compile(masm(),
2383 object, 2383 object,
2384 holder, 2384 holder,
2385 name, 2385 name,
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
2907 MaybeObject* LoadStubCompiler::CompileLoadInterceptor(JSObject* receiver, 2907 MaybeObject* LoadStubCompiler::CompileLoadInterceptor(JSObject* receiver,
2908 JSObject* holder, 2908 JSObject* holder,
2909 String* name) { 2909 String* name) {
2910 // ----------- S t a t e ------------- 2910 // ----------- S t a t e -------------
2911 // -- eax : receiver 2911 // -- eax : receiver
2912 // -- ecx : name 2912 // -- ecx : name
2913 // -- esp[0] : return address 2913 // -- esp[0] : return address
2914 // ----------------------------------- 2914 // -----------------------------------
2915 Label miss; 2915 Label miss;
2916 2916
2917 LookupResult lookup; 2917 LookupResult lookup(isolate());
2918 LookupPostInterceptor(holder, name, &lookup); 2918 LookupPostInterceptor(holder, name, &lookup);
2919 2919
2920 // TODO(368): Compile in the whole chain: all the interceptors in 2920 // TODO(368): Compile in the whole chain: all the interceptors in
2921 // prototypes and ultimate answer. 2921 // prototypes and ultimate answer.
2922 GenerateLoadInterceptor(receiver, 2922 GenerateLoadInterceptor(receiver,
2923 holder, 2923 holder,
2924 &lookup, 2924 &lookup,
2925 eax, 2925 eax,
2926 ecx, 2926 ecx,
2927 edx, 2927 edx,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
3095 // ----------------------------------- 3095 // -----------------------------------
3096 Label miss; 3096 Label miss;
3097 3097
3098 Counters* counters = isolate()->counters(); 3098 Counters* counters = isolate()->counters();
3099 __ IncrementCounter(counters->keyed_load_interceptor(), 1); 3099 __ IncrementCounter(counters->keyed_load_interceptor(), 1);
3100 3100
3101 // Check that the name has not changed. 3101 // Check that the name has not changed.
3102 __ cmp(eax, Immediate(Handle<String>(name))); 3102 __ cmp(eax, Immediate(Handle<String>(name)));
3103 __ j(not_equal, &miss); 3103 __ j(not_equal, &miss);
3104 3104
3105 LookupResult lookup; 3105 LookupResult lookup(isolate());
3106 LookupPostInterceptor(holder, name, &lookup); 3106 LookupPostInterceptor(holder, name, &lookup);
3107 GenerateLoadInterceptor(receiver, 3107 GenerateLoadInterceptor(receiver,
3108 holder, 3108 holder,
3109 &lookup, 3109 &lookup,
3110 edx, 3110 edx,
3111 eax, 3111 eax,
3112 ecx, 3112 ecx,
3113 ebx, 3113 ebx,
3114 edi, 3114 edi,
3115 name, 3115 name,
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
4026 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); 4026 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss();
4027 __ jmp(ic_miss, RelocInfo::CODE_TARGET); 4027 __ jmp(ic_miss, RelocInfo::CODE_TARGET);
4028 } 4028 }
4029 4029
4030 4030
4031 #undef __ 4031 #undef __
4032 4032
4033 } } // namespace v8::internal 4033 } } // namespace v8::internal
4034 4034
4035 #endif // V8_TARGET_ARCH_IA32 4035 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698