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

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

Issue 169713002: Revert "Add a premonomorphic state to the call target cache." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/runtime.cc ('k') | test/cctest/test-heap.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after
2194 __ j(not_equal, &miss); 2194 __ j(not_equal, &miss);
2195 2195
2196 // Make sure the function is the Array() function 2196 // Make sure the function is the Array() function
2197 __ LoadArrayFunction(rcx); 2197 __ LoadArrayFunction(rcx);
2198 __ cmpq(rdi, rcx); 2198 __ cmpq(rdi, rcx);
2199 __ j(not_equal, &megamorphic); 2199 __ j(not_equal, &megamorphic);
2200 __ jmp(&done); 2200 __ jmp(&done);
2201 2201
2202 __ bind(&miss); 2202 __ bind(&miss);
2203 2203
2204 // A monomorphic miss (i.e, here the cache is not uninitialized or 2204 // A monomorphic miss (i.e, here the cache is not uninitialized) goes
2205 // pre-monomorphic) goes megamorphic. 2205 // megamorphic.
2206 Label not_uninitialized;
2207 __ Cmp(rcx, TypeFeedbackInfo::UninitializedSentinel(isolate)); 2206 __ Cmp(rcx, TypeFeedbackInfo::UninitializedSentinel(isolate));
2208 __ j(not_equal, &not_uninitialized);
2209
2210 // PremonomorphicSentinel is an immortal immovable object (null) so no
2211 // write-barrier is needed.
2212 __ Move(FieldOperand(rbx, rdx, times_pointer_size, FixedArray::kHeaderSize),
2213 TypeFeedbackInfo::PremonomorphicSentinel(isolate));
2214 __ jmp(&done);
2215
2216 // If the cache isn't uninitialized, it is either premonomorphic or
2217 // monomorphic. If it is premonomorphic, we initialize it thus making
2218 // it monomorphic. Otherwise, we go megamorphic.
2219 __ bind(&not_uninitialized);
2220 __ Cmp(rcx, TypeFeedbackInfo::PremonomorphicSentinel(isolate));
2221 __ j(equal, &initialize); 2207 __ j(equal, &initialize);
2222
2223 // MegamorphicSentinel is an immortal immovable object (undefined) so no 2208 // MegamorphicSentinel is an immortal immovable object (undefined) so no
2224 // write-barrier is needed. 2209 // write-barrier is needed.
2225 __ bind(&megamorphic); 2210 __ bind(&megamorphic);
2226 __ Move(FieldOperand(rbx, rdx, times_pointer_size, FixedArray::kHeaderSize), 2211 __ Move(FieldOperand(rbx, rdx, times_pointer_size, FixedArray::kHeaderSize),
2227 TypeFeedbackInfo::MegamorphicSentinel(isolate)); 2212 TypeFeedbackInfo::MegamorphicSentinel(isolate));
2228 __ jmp(&done); 2213 __ jmp(&done);
2229 2214
2230 // An uninitialized cache is patched with the function or sentinel to 2215 // An uninitialized cache is patched with the function or sentinel to
2231 // indicate the ElementsKind if function is the Array constructor. 2216 // indicate the ElementsKind if function is the Array constructor.
2232 __ bind(&initialize); 2217 __ bind(&initialize);
(...skipping 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after
5344 return_value_operand, 5329 return_value_operand,
5345 NULL); 5330 NULL);
5346 } 5331 }
5347 5332
5348 5333
5349 #undef __ 5334 #undef __
5350 5335
5351 } } // namespace v8::internal 5336 } } // namespace v8::internal
5352 5337
5353 #endif // V8_TARGET_ARCH_X64 5338 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698