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

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

Issue 429803003: X87: Remove all compilation related interface from the StubCache (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: 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
« no previous file with comments | « no previous file | 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_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic-inl.h" 10 #include "src/ic-inl.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 __ mov(eax, scratch1); 257 __ mov(eax, scratch1);
258 __ ret(0); 258 __ ret(0);
259 } 259 }
260 260
261 261
262 static void PushInterceptorArguments(MacroAssembler* masm, 262 static void PushInterceptorArguments(MacroAssembler* masm,
263 Register receiver, 263 Register receiver,
264 Register holder, 264 Register holder,
265 Register name, 265 Register name,
266 Handle<JSObject> holder_obj) { 266 Handle<JSObject> holder_obj) {
267 STATIC_ASSERT(StubCache::kInterceptorArgsNameIndex == 0); 267 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0);
268 STATIC_ASSERT(StubCache::kInterceptorArgsInfoIndex == 1); 268 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1);
269 STATIC_ASSERT(StubCache::kInterceptorArgsThisIndex == 2); 269 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 2);
270 STATIC_ASSERT(StubCache::kInterceptorArgsHolderIndex == 3); 270 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 3);
271 STATIC_ASSERT(StubCache::kInterceptorArgsLength == 4); 271 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 4);
272 __ push(name); 272 __ push(name);
273 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); 273 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor());
274 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); 274 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor));
275 Register scratch = name; 275 Register scratch = name;
276 __ mov(scratch, Immediate(interceptor)); 276 __ mov(scratch, Immediate(interceptor));
277 __ push(scratch); 277 __ push(scratch);
278 __ push(receiver); 278 __ push(receiver);
279 __ push(holder); 279 __ push(holder);
280 } 280 }
281 281
282 282
283 static void CompileCallLoadPropertyWithInterceptor( 283 static void CompileCallLoadPropertyWithInterceptor(
284 MacroAssembler* masm, 284 MacroAssembler* masm,
285 Register receiver, 285 Register receiver,
286 Register holder, 286 Register holder,
287 Register name, 287 Register name,
288 Handle<JSObject> holder_obj, 288 Handle<JSObject> holder_obj,
289 IC::UtilityId id) { 289 IC::UtilityId id) {
290 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); 290 PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
291 __ CallExternalReference( 291 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()),
292 ExternalReference(IC_Utility(id), masm->isolate()), 292 NamedLoadHandlerCompiler::kInterceptorArgsLength);
293 StubCache::kInterceptorArgsLength);
294 } 293 }
295 294
296 295
297 // Generate call to api function. 296 // Generate call to api function.
298 // This function uses push() to generate smaller, faster code than 297 // This function uses push() to generate smaller, faster code than
299 // the version above. It is an optimization that should will be removed 298 // the version above. It is an optimization that should will be removed
300 // when api call ICs are generated in hydrogen. 299 // when api call ICs are generated in hydrogen.
301 void PropertyHandlerCompiler::GenerateFastApiCall( 300 void PropertyHandlerCompiler::GenerateFastApiCall(
302 MacroAssembler* masm, const CallOptimization& optimization, 301 MacroAssembler* masm, const CallOptimization& optimization,
303 Handle<Map> receiver_map, Register receiver, Register scratch_in, 302 Handle<Map> receiver_map, Register receiver, Register scratch_in,
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 // Call the runtime system to load the interceptor. 1027 // Call the runtime system to load the interceptor.
1029 // Check that the maps haven't changed. 1028 // Check that the maps haven't changed.
1030 __ pop(scratch2()); // save old return address 1029 __ pop(scratch2()); // save old return address
1031 PushInterceptorArguments(masm(), receiver(), holder_reg, 1030 PushInterceptorArguments(masm(), receiver(), holder_reg,
1032 this->name(), interceptor_holder); 1031 this->name(), interceptor_holder);
1033 __ push(scratch2()); // restore old return address 1032 __ push(scratch2()); // restore old return address
1034 1033
1035 ExternalReference ref = 1034 ExternalReference ref =
1036 ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptor), 1035 ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptor),
1037 isolate()); 1036 isolate());
1038 __ TailCallExternalReference(ref, StubCache::kInterceptorArgsLength, 1); 1037 __ TailCallExternalReference(
1038 ref, NamedLoadHandlerCompiler::kInterceptorArgsLength, 1);
1039 } 1039 }
1040 } 1040 }
1041 1041
1042 1042
1043 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( 1043 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
1044 Handle<JSObject> object, Handle<JSObject> holder, Handle<Name> name, 1044 Handle<JSObject> object, Handle<JSObject> holder, Handle<Name> name,
1045 Handle<ExecutableAccessorInfo> callback) { 1045 Handle<ExecutableAccessorInfo> callback) {
1046 Register holder_reg = 1046 Register holder_reg =
1047 Frontend(IC::CurrentTypeOf(object, isolate()), receiver(), holder, name); 1047 Frontend(IC::CurrentTypeOf(object, isolate()), receiver(), holder, name);
1048 1048
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 // ----------------------------------- 1387 // -----------------------------------
1388 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1388 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1389 } 1389 }
1390 1390
1391 1391
1392 #undef __ 1392 #undef __
1393 1393
1394 } } // namespace v8::internal 1394 } } // namespace v8::internal
1395 1395
1396 #endif // V8_TARGET_ARCH_X87 1396 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698