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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 9417009: Merged r10719 into 3.8 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.8
Patch Set: Created 8 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/x64/assembler-x64.cc ('k') | test/mjsunit/regress/regress-1945.js » ('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 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); 1787 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE);
1788 __ CmpObjectType(input, FIRST_SPEC_OBJECT_TYPE, temp); 1788 __ CmpObjectType(input, FIRST_SPEC_OBJECT_TYPE, temp);
1789 __ j(below, is_false); 1789 __ j(below, is_false);
1790 __ j(equal, is_true); 1790 __ j(equal, is_true);
1791 __ CmpInstanceType(temp, LAST_SPEC_OBJECT_TYPE); 1791 __ CmpInstanceType(temp, LAST_SPEC_OBJECT_TYPE);
1792 __ j(equal, is_true); 1792 __ j(equal, is_true);
1793 } else { 1793 } else {
1794 // Faster code path to avoid two compares: subtract lower bound from the 1794 // Faster code path to avoid two compares: subtract lower bound from the
1795 // actual type and do a signed compare with the width of the type range. 1795 // actual type and do a signed compare with the width of the type range.
1796 __ movq(temp, FieldOperand(input, HeapObject::kMapOffset)); 1796 __ movq(temp, FieldOperand(input, HeapObject::kMapOffset));
1797 __ movq(temp2, FieldOperand(temp, Map::kInstanceTypeOffset)); 1797 __ movzxbl(temp2, FieldOperand(temp, Map::kInstanceTypeOffset));
1798 __ subb(temp2, Immediate(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); 1798 __ subq(temp2, Immediate(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE));
1799 __ cmpb(temp2, 1799 __ cmpq(temp2, Immediate(LAST_NONCALLABLE_SPEC_OBJECT_TYPE -
1800 Immediate(static_cast<int8_t>(LAST_NONCALLABLE_SPEC_OBJECT_TYPE - 1800 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE));
1801 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)));
1802 __ j(above, is_false); 1801 __ j(above, is_false);
1803 } 1802 }
1804 1803
1805 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. 1804 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range.
1806 // Check if the constructor in the map is a function. 1805 // Check if the constructor in the map is a function.
1807 __ movq(temp, FieldOperand(temp, Map::kConstructorOffset)); 1806 __ movq(temp, FieldOperand(temp, Map::kConstructorOffset));
1808 1807
1809 // Objects with a non-function constructor have class 'Object'. 1808 // Objects with a non-function constructor have class 'Object'.
1810 __ CmpObjectType(temp, JS_FUNCTION_TYPE, kScratchRegister); 1809 __ CmpObjectType(temp, JS_FUNCTION_TYPE, kScratchRegister);
1811 if (class_name->IsEqualTo(CStrVector("Object"))) { 1810 if (class_name->IsEqualTo(CStrVector("Object"))) {
(...skipping 2593 matching lines...) Expand 10 before | Expand all | Expand 10 after
4405 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 4404 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4406 ASSERT(osr_pc_offset_ == -1); 4405 ASSERT(osr_pc_offset_ == -1);
4407 osr_pc_offset_ = masm()->pc_offset(); 4406 osr_pc_offset_ = masm()->pc_offset();
4408 } 4407 }
4409 4408
4410 #undef __ 4409 #undef __
4411 4410
4412 } } // namespace v8::internal 4411 } } // namespace v8::internal
4413 4412
4414 #endif // V8_TARGET_ARCH_X64 4413 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | test/mjsunit/regress/regress-1945.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698