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

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

Issue 1989153002: X87: 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/full-codegen/x87/full-codegen-x87.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 // 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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 Label* is_false, 2513 Label* is_false,
2514 Handle<String>class_name, 2514 Handle<String>class_name,
2515 Register input, 2515 Register input,
2516 Register temp, 2516 Register temp,
2517 Register temp2) { 2517 Register temp2) {
2518 DCHECK(!input.is(temp)); 2518 DCHECK(!input.is(temp));
2519 DCHECK(!input.is(temp2)); 2519 DCHECK(!input.is(temp2));
2520 DCHECK(!temp.is(temp2)); 2520 DCHECK(!temp.is(temp2));
2521 __ JumpIfSmi(input, is_false); 2521 __ JumpIfSmi(input, is_false);
2522 2522
2523 __ CmpObjectType(input, JS_FUNCTION_TYPE, temp); 2523 __ CmpObjectType(input, FIRST_FUNCTION_TYPE, temp);
2524 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE);
2524 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { 2525 if (String::Equals(isolate()->factory()->Function_string(), class_name)) {
2525 __ j(equal, is_true); 2526 __ j(above_equal, is_true);
2526 } else { 2527 } else {
2527 __ j(equal, is_false); 2528 __ j(above_equal, is_false);
2528 } 2529 }
2529 2530
2530 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. 2531 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range.
2531 // Check if the constructor in the map is a function. 2532 // Check if the constructor in the map is a function.
2532 __ GetMapConstructor(temp, temp, temp2); 2533 __ GetMapConstructor(temp, temp, temp2);
2533 // Objects with a non-function constructor have class 'Object'. 2534 // Objects with a non-function constructor have class 'Object'.
2534 __ CmpInstanceType(temp2, JS_FUNCTION_TYPE); 2535 __ CmpInstanceType(temp2, JS_FUNCTION_TYPE);
2535 if (String::Equals(class_name, isolate()->factory()->Object_string())) { 2536 if (String::Equals(class_name, isolate()->factory()->Object_string())) {
2536 __ j(not_equal, is_true); 2537 __ j(not_equal, is_true);
2537 } else { 2538 } else {
(...skipping 3333 matching lines...) Expand 10 before | Expand all | Expand 10 after
5871 __ bind(deferred->exit()); 5872 __ bind(deferred->exit());
5872 __ bind(&done); 5873 __ bind(&done);
5873 } 5874 }
5874 5875
5875 #undef __ 5876 #undef __
5876 5877
5877 } // namespace internal 5878 } // namespace internal
5878 } // namespace v8 5879 } // namespace v8
5879 5880
5880 #endif // V8_TARGET_ARCH_X87 5881 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698