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

Side by Side Diff: src/crankshaft/s390/lithium-codegen-s390.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 | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.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 // 2 //
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" 6 #include "src/crankshaft/s390/lithium-codegen-s390.h"
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2464 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 // the temp registers, but not the input. 2475 // the temp registers, but not the input.
2476 void LCodeGen::EmitClassOfTest(Label* is_true, Label* is_false, 2476 void LCodeGen::EmitClassOfTest(Label* is_true, Label* is_false,
2477 Handle<String> class_name, Register input, 2477 Handle<String> class_name, Register input,
2478 Register temp, Register temp2) { 2478 Register temp, Register temp2) {
2479 DCHECK(!input.is(temp)); 2479 DCHECK(!input.is(temp));
2480 DCHECK(!input.is(temp2)); 2480 DCHECK(!input.is(temp2));
2481 DCHECK(!temp.is(temp2)); 2481 DCHECK(!temp.is(temp2));
2482 2482
2483 __ JumpIfSmi(input, is_false); 2483 __ JumpIfSmi(input, is_false);
2484 2484
2485 __ CompareObjectType(input, temp, temp2, JS_FUNCTION_TYPE); 2485 __ CompareObjectType(input, temp, temp2, FIRST_FUNCTION_TYPE);
2486 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE);
2486 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { 2487 if (String::Equals(isolate()->factory()->Function_string(), class_name)) {
2487 __ beq(is_true); 2488 __ bge(is_true);
2488 } else { 2489 } else {
2489 __ beq(is_false); 2490 __ bge(is_false);
2490 } 2491 }
2491 2492
2492 // Check if the constructor in the map is a function. 2493 // Check if the constructor in the map is a function.
2493 Register instance_type = ip; 2494 Register instance_type = ip;
2494 __ GetMapConstructor(temp, temp, temp2, instance_type); 2495 __ GetMapConstructor(temp, temp, temp2, instance_type);
2495 2496
2496 // Objects with a non-function constructor have class 'Object'. 2497 // Objects with a non-function constructor have class 'Object'.
2497 __ CmpP(instance_type, Operand(JS_FUNCTION_TYPE)); 2498 __ CmpP(instance_type, Operand(JS_FUNCTION_TYPE));
2498 if (String::Equals(isolate()->factory()->Object_string(), class_name)) { 2499 if (String::Equals(isolate()->factory()->Object_string(), class_name)) {
2499 __ bne(is_true); 2500 __ bne(is_true);
(...skipping 3212 matching lines...) Expand 10 before | Expand all | Expand 10 after
5712 __ LoadP(result, 5713 __ LoadP(result,
5713 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5714 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5714 __ bind(deferred->exit()); 5715 __ bind(deferred->exit());
5715 __ bind(&done); 5716 __ bind(&done);
5716 } 5717 }
5717 5718
5718 #undef __ 5719 #undef __
5719 5720
5720 } // namespace internal 5721 } // namespace internal
5721 } // namespace v8 5722 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698