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

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

Issue 34753004: Make macro-assembler-x64 deal with handles to objects in new space by default. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/x64/macro-assembler-x64.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 // 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 // ----------------------------------- 457 // -----------------------------------
458 typedef FunctionCallbackArguments FCA; 458 typedef FunctionCallbackArguments FCA;
459 StackArgumentsAccessor args(rsp, argc + kFastApiCallArguments); 459 StackArgumentsAccessor args(rsp, argc + kFastApiCallArguments);
460 460
461 // Save calling context. 461 // Save calling context.
462 int offset = argc + kFastApiCallArguments; 462 int offset = argc + kFastApiCallArguments;
463 __ movq(args.GetArgumentOperand(offset - FCA::kContextSaveIndex), rsi); 463 __ movq(args.GetArgumentOperand(offset - FCA::kContextSaveIndex), rsi);
464 464
465 // Get the function and setup the context. 465 // Get the function and setup the context.
466 Handle<JSFunction> function = optimization.constant_function(); 466 Handle<JSFunction> function = optimization.constant_function();
467 __ LoadHeapObject(rdi, function); 467 __ Move(rdi, function);
468 __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); 468 __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
469 // Construct the FunctionCallbackInfo on the stack. 469 // Construct the FunctionCallbackInfo on the stack.
470 __ movq(args.GetArgumentOperand(offset - FCA::kCalleeIndex), rdi); 470 __ movq(args.GetArgumentOperand(offset - FCA::kCalleeIndex), rdi);
471 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 471 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
472 Handle<Object> call_data(api_call_info->data(), masm->isolate()); 472 Handle<Object> call_data(api_call_info->data(), masm->isolate());
473 if (masm->isolate()->heap()->InNewSpace(*call_data)) { 473 if (masm->isolate()->heap()->InNewSpace(*call_data)) {
474 __ Move(rcx, api_call_info); 474 __ Move(rcx, api_call_info);
475 __ movq(rbx, FieldOperand(rcx, CallHandlerInfo::kDataOffset)); 475 __ movq(rbx, FieldOperand(rcx, CallHandlerInfo::kDataOffset));
476 __ movq(args.GetArgumentOperand(offset - FCA::kDataIndex), rbx); 476 __ movq(args.GetArgumentOperand(offset - FCA::kDataIndex), rbx);
477 } else { 477 } else {
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 Label* miss_label, 827 Label* miss_label,
828 Label* slow) { 828 Label* slow) {
829 int descriptor = transition->LastAdded(); 829 int descriptor = transition->LastAdded();
830 DescriptorArray* descriptors = transition->instance_descriptors(); 830 DescriptorArray* descriptors = transition->instance_descriptors();
831 PropertyDetails details = descriptors->GetDetails(descriptor); 831 PropertyDetails details = descriptors->GetDetails(descriptor);
832 Representation representation = details.representation(); 832 Representation representation = details.representation();
833 ASSERT(!representation.IsNone()); 833 ASSERT(!representation.IsNone());
834 834
835 if (details.type() == CONSTANT) { 835 if (details.type() == CONSTANT) {
836 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); 836 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate());
837 __ CmpObject(value_reg, constant); 837 __ Cmp(value_reg, constant);
838 __ j(not_equal, miss_label); 838 __ j(not_equal, miss_label);
839 } else if (FLAG_track_fields && representation.IsSmi()) { 839 } else if (FLAG_track_fields && representation.IsSmi()) {
840 __ JumpIfNotSmi(value_reg, miss_label); 840 __ JumpIfNotSmi(value_reg, miss_label);
841 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { 841 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
842 __ JumpIfSmi(value_reg, miss_label); 842 __ JumpIfSmi(value_reg, miss_label);
843 } else if (FLAG_track_double_fields && representation.IsDouble()) { 843 } else if (FLAG_track_double_fields && representation.IsDouble()) {
844 Label do_store, heap_number; 844 Label do_store, heap_number;
845 __ AllocateHeapNumber(storage_reg, scratch1, slow); 845 __ AllocateHeapNumber(storage_reg, scratch1, slow);
846 846
847 __ JumpIfNotSmi(value_reg, &heap_number); 847 __ JumpIfNotSmi(value_reg, &heap_number);
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 thunk_address, 1404 thunk_address,
1405 getter_arg, 1405 getter_arg,
1406 kStackSpace, 1406 kStackSpace,
1407 return_value_operand, 1407 return_value_operand,
1408 NULL); 1408 NULL);
1409 } 1409 }
1410 1410
1411 1411
1412 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { 1412 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) {
1413 // Return the constant value. 1413 // Return the constant value.
1414 __ LoadObject(rax, value); 1414 __ Move(rax, value);
1415 __ ret(0); 1415 __ ret(0);
1416 } 1416 }
1417 1417
1418 1418
1419 void LoadStubCompiler::GenerateLoadInterceptor( 1419 void LoadStubCompiler::GenerateLoadInterceptor(
1420 Register holder_reg, 1420 Register holder_reg,
1421 Handle<JSObject> object, 1421 Handle<JSObject> object,
1422 Handle<JSObject> interceptor_holder, 1422 Handle<JSObject> interceptor_holder,
1423 LookupResult* lookup, 1423 LookupResult* lookup,
1424 Handle<Name> name) { 1424 Handle<Name> name) {
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after
3179 // ----------------------------------- 3179 // -----------------------------------
3180 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3180 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3181 } 3181 }
3182 3182
3183 3183
3184 #undef __ 3184 #undef __
3185 3185
3186 } } // namespace v8::internal 3186 } } // namespace v8::internal
3187 3187
3188 #endif // V8_TARGET_ARCH_X64 3188 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698