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

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

Issue 422853003: Remove all compilation related interface from the StubCache (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Make the PropertyICCompiler constructor private Created 6 years, 4 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/stub-cache.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 if (!result.is(rax)) __ movp(rax, result); 225 if (!result.is(rax)) __ movp(rax, result);
226 __ ret(0); 226 __ ret(0);
227 } 227 }
228 228
229 229
230 static void PushInterceptorArguments(MacroAssembler* masm, 230 static void PushInterceptorArguments(MacroAssembler* masm,
231 Register receiver, 231 Register receiver,
232 Register holder, 232 Register holder,
233 Register name, 233 Register name,
234 Handle<JSObject> holder_obj) { 234 Handle<JSObject> holder_obj) {
235 STATIC_ASSERT(StubCache::kInterceptorArgsNameIndex == 0); 235 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0);
236 STATIC_ASSERT(StubCache::kInterceptorArgsInfoIndex == 1); 236 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1);
237 STATIC_ASSERT(StubCache::kInterceptorArgsThisIndex == 2); 237 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 2);
238 STATIC_ASSERT(StubCache::kInterceptorArgsHolderIndex == 3); 238 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 3);
239 STATIC_ASSERT(StubCache::kInterceptorArgsLength == 4); 239 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 4);
240 __ Push(name); 240 __ Push(name);
241 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); 241 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor());
242 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); 242 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor));
243 __ Move(kScratchRegister, interceptor); 243 __ Move(kScratchRegister, interceptor);
244 __ Push(kScratchRegister); 244 __ Push(kScratchRegister);
245 __ Push(receiver); 245 __ Push(receiver);
246 __ Push(holder); 246 __ Push(holder);
247 } 247 }
248 248
249 249
250 static void CompileCallLoadPropertyWithInterceptor( 250 static void CompileCallLoadPropertyWithInterceptor(
251 MacroAssembler* masm, 251 MacroAssembler* masm,
252 Register receiver, 252 Register receiver,
253 Register holder, 253 Register holder,
254 Register name, 254 Register name,
255 Handle<JSObject> holder_obj, 255 Handle<JSObject> holder_obj,
256 IC::UtilityId id) { 256 IC::UtilityId id) {
257 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); 257 PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
258 __ CallExternalReference( 258 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()),
259 ExternalReference(IC_Utility(id), masm->isolate()), 259 NamedLoadHandlerCompiler::kInterceptorArgsLength);
260 StubCache::kInterceptorArgsLength);
261 } 260 }
262 261
263 262
264 // Generate call to api function. 263 // Generate call to api function.
265 void PropertyHandlerCompiler::GenerateFastApiCall( 264 void PropertyHandlerCompiler::GenerateFastApiCall(
266 MacroAssembler* masm, const CallOptimization& optimization, 265 MacroAssembler* masm, const CallOptimization& optimization,
267 Handle<Map> receiver_map, Register receiver, Register scratch_in, 266 Handle<Map> receiver_map, Register receiver, Register scratch_in,
268 bool is_store, int argc, Register* values) { 267 bool is_store, int argc, Register* values) {
269 ASSERT(optimization.is_simple_api_call()); 268 ASSERT(optimization.is_simple_api_call());
270 269
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 } else { // !compile_followup_inline 951 } else { // !compile_followup_inline
953 // Call the runtime system to load the interceptor. 952 // Call the runtime system to load the interceptor.
954 // Check that the maps haven't changed. 953 // Check that the maps haven't changed.
955 __ PopReturnAddressTo(scratch2()); 954 __ PopReturnAddressTo(scratch2());
956 PushInterceptorArguments(masm(), receiver(), holder_reg, 955 PushInterceptorArguments(masm(), receiver(), holder_reg,
957 this->name(), interceptor_holder); 956 this->name(), interceptor_holder);
958 __ PushReturnAddressFrom(scratch2()); 957 __ PushReturnAddressFrom(scratch2());
959 958
960 ExternalReference ref = ExternalReference( 959 ExternalReference ref = ExternalReference(
961 IC_Utility(IC::kLoadPropertyWithInterceptor), isolate()); 960 IC_Utility(IC::kLoadPropertyWithInterceptor), isolate());
962 __ TailCallExternalReference(ref, StubCache::kInterceptorArgsLength, 1); 961 __ TailCallExternalReference(
962 ref, NamedLoadHandlerCompiler::kInterceptorArgsLength, 1);
963 } 963 }
964 } 964 }
965 965
966 966
967 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( 967 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
968 Handle<JSObject> object, Handle<JSObject> holder, Handle<Name> name, 968 Handle<JSObject> object, Handle<JSObject> holder, Handle<Name> name,
969 Handle<ExecutableAccessorInfo> callback) { 969 Handle<ExecutableAccessorInfo> callback) {
970 Register holder_reg = 970 Register holder_reg =
971 Frontend(IC::CurrentTypeOf(object, isolate()), receiver(), holder, name); 971 Frontend(IC::CurrentTypeOf(object, isolate()), receiver(), holder, name);
972 972
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 // ----------------------------------- 1321 // -----------------------------------
1322 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1322 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1323 } 1323 }
1324 1324
1325 1325
1326 #undef __ 1326 #undef __
1327 1327
1328 } } // namespace v8::internal 1328 } } // namespace v8::internal
1329 1329
1330 #endif // V8_TARGET_ARCH_X64 1330 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/stub-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698