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

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

Issue 16337005: Deprecate FACTORY helper macro. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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/type-info.cc ('k') | src/x64/full-codegen-x64.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 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 3417 matching lines...) Expand 10 before | Expand all | Expand 10 after
3428 // Check for undefined. undefined OP undefined is false even though 3428 // Check for undefined. undefined OP undefined is false even though
3429 // undefined == undefined. 3429 // undefined == undefined.
3430 Label check_for_nan; 3430 Label check_for_nan;
3431 __ CompareRoot(rdx, Heap::kUndefinedValueRootIndex); 3431 __ CompareRoot(rdx, Heap::kUndefinedValueRootIndex);
3432 __ j(not_equal, &check_for_nan, Label::kNear); 3432 __ j(not_equal, &check_for_nan, Label::kNear);
3433 __ Set(rax, NegativeComparisonResult(cc)); 3433 __ Set(rax, NegativeComparisonResult(cc));
3434 __ ret(0); 3434 __ ret(0);
3435 __ bind(&check_for_nan); 3435 __ bind(&check_for_nan);
3436 } 3436 }
3437 3437
3438 // Test for NaN. Sadly, we can't just compare to FACTORY->nan_value(), 3438 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(),
3439 // so we do the second best thing - test it ourselves. 3439 // so we do the second best thing - test it ourselves.
3440 Label heap_number; 3440 Label heap_number;
3441 // If it's not a heap number, then return equal for (in)equality operator. 3441 // If it's not a heap number, then return equal for (in)equality operator.
3442 __ Cmp(FieldOperand(rdx, HeapObject::kMapOffset), 3442 __ Cmp(FieldOperand(rdx, HeapObject::kMapOffset),
3443 factory->heap_number_map()); 3443 factory->heap_number_map());
3444 __ j(equal, &heap_number, Label::kNear); 3444 __ j(equal, &heap_number, Label::kNear);
3445 if (cc != equal) { 3445 if (cc != equal) {
3446 // Call runtime on identical objects. Otherwise return equal. 3446 // Call runtime on identical objects. Otherwise return equal.
3447 __ CmpObjectType(rax, FIRST_SPEC_OBJECT_TYPE, rcx); 3447 __ CmpObjectType(rax, FIRST_SPEC_OBJECT_TYPE, rcx);
3448 __ j(above_equal, &not_identical, Label::kNear); 3448 __ j(above_equal, &not_identical, Label::kNear);
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
4384 // rsp[2] : function pointer 4384 // rsp[2] : function pointer
4385 // rsp[3] : value 4385 // rsp[3] : value
4386 // Returns a bitwise zero to indicate that the value 4386 // Returns a bitwise zero to indicate that the value
4387 // is and instance of the function and anything else to 4387 // is and instance of the function and anything else to
4388 // indicate that the value is not an instance. 4388 // indicate that the value is not an instance.
4389 4389
4390 static const int kOffsetToMapCheckValue = 2; 4390 static const int kOffsetToMapCheckValue = 2;
4391 static const int kOffsetToResultValue = 18; 4391 static const int kOffsetToResultValue = 18;
4392 // The last 4 bytes of the instruction sequence 4392 // The last 4 bytes of the instruction sequence
4393 // movq(rdi, FieldOperand(rax, HeapObject::kMapOffset)) 4393 // movq(rdi, FieldOperand(rax, HeapObject::kMapOffset))
4394 // Move(kScratchRegister, FACTORY->the_hole_value()) 4394 // Move(kScratchRegister, Factory::the_hole_value())
4395 // in front of the hole value address. 4395 // in front of the hole value address.
4396 static const unsigned int kWordBeforeMapCheckValue = 0xBA49FF78; 4396 static const unsigned int kWordBeforeMapCheckValue = 0xBA49FF78;
4397 // The last 4 bytes of the instruction sequence 4397 // The last 4 bytes of the instruction sequence
4398 // __ j(not_equal, &cache_miss); 4398 // __ j(not_equal, &cache_miss);
4399 // __ LoadRoot(ToRegister(instr->result()), Heap::kTheHoleValueRootIndex); 4399 // __ LoadRoot(ToRegister(instr->result()), Heap::kTheHoleValueRootIndex);
4400 // before the offset of the hole value in the root array. 4400 // before the offset of the hole value in the root array.
4401 static const unsigned int kWordBeforeResultValue = 0x458B4909; 4401 static const unsigned int kWordBeforeResultValue = 0x458B4909;
4402 // Only the inline check flag is supported on X64. 4402 // Only the inline check flag is supported on X64.
4403 ASSERT(flags_ == kNoFlags || HasCallSiteInlineCheck()); 4403 ASSERT(flags_ == kNoFlags || HasCallSiteInlineCheck());
4404 int extra_stack_space = HasCallSiteInlineCheck() ? kPointerSize : 0; 4404 int extra_stack_space = HasCallSiteInlineCheck() ? kPointerSize : 0;
(...skipping 2520 matching lines...) Expand 10 before | Expand all | Expand 10 after
6925 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); 6925 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
6926 } 6926 }
6927 } 6927 }
6928 6928
6929 6929
6930 #undef __ 6930 #undef __
6931 6931
6932 } } // namespace v8::internal 6932 } } // namespace v8::internal
6933 6933
6934 #endif // V8_TARGET_ARCH_X64 6934 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698