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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.cc

Issue 1986343002: PPC/S390: Fix %FunctionGetName and %_ClassOf for bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | src/crankshaft/s390/lithium-codegen-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/crankshaft/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 2475 matching lines...) Expand 10 before | Expand all | Expand 10 after
2486 // the temp registers, but not the input. 2486 // the temp registers, but not the input.
2487 void LCodeGen::EmitClassOfTest(Label* is_true, Label* is_false, 2487 void LCodeGen::EmitClassOfTest(Label* is_true, Label* is_false,
2488 Handle<String> class_name, Register input, 2488 Handle<String> class_name, Register input,
2489 Register temp, Register temp2) { 2489 Register temp, Register temp2) {
2490 DCHECK(!input.is(temp)); 2490 DCHECK(!input.is(temp));
2491 DCHECK(!input.is(temp2)); 2491 DCHECK(!input.is(temp2));
2492 DCHECK(!temp.is(temp2)); 2492 DCHECK(!temp.is(temp2));
2493 2493
2494 __ JumpIfSmi(input, is_false); 2494 __ JumpIfSmi(input, is_false);
2495 2495
2496 __ CompareObjectType(input, temp, temp2, JS_FUNCTION_TYPE); 2496 __ CompareObjectType(input, temp, temp2, FIRST_FUNCTION_TYPE);
2497 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE);
2497 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { 2498 if (String::Equals(isolate()->factory()->Function_string(), class_name)) {
2498 __ beq(is_true); 2499 __ bge(is_true);
2499 } else { 2500 } else {
2500 __ beq(is_false); 2501 __ bge(is_false);
2501 } 2502 }
2502 2503
2503 // Check if the constructor in the map is a function. 2504 // Check if the constructor in the map is a function.
2504 Register instance_type = ip; 2505 Register instance_type = ip;
2505 __ GetMapConstructor(temp, temp, temp2, instance_type); 2506 __ GetMapConstructor(temp, temp, temp2, instance_type);
2506 2507
2507 // Objects with a non-function constructor have class 'Object'. 2508 // Objects with a non-function constructor have class 'Object'.
2508 __ cmpi(instance_type, Operand(JS_FUNCTION_TYPE)); 2509 __ cmpi(instance_type, Operand(JS_FUNCTION_TYPE));
2509 if (String::Equals(isolate()->factory()->Object_string(), class_name)) { 2510 if (String::Equals(isolate()->factory()->Object_string(), class_name)) {
2510 __ bne(is_true); 2511 __ bne(is_true);
(...skipping 3322 matching lines...) Expand 10 before | Expand all | Expand 10 after
5833 __ LoadP(result, 5834 __ LoadP(result,
5834 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5835 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5835 __ bind(deferred->exit()); 5836 __ bind(deferred->exit());
5836 __ bind(&done); 5837 __ bind(&done);
5837 } 5838 }
5838 5839
5839 #undef __ 5840 #undef __
5840 5841
5841 } // namespace internal 5842 } // namespace internal
5842 } // namespace v8 5843 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/crankshaft/s390/lithium-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698