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

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

Issue 1980463002: Fix %FunctionGetName and %_ClassOf for bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix %_ClassOf instead 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
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_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.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 2214 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 Label* is_false, 2225 Label* is_false,
2226 Handle<String>class_name, 2226 Handle<String>class_name,
2227 Register input, 2227 Register input,
2228 Register temp, 2228 Register temp,
2229 Register temp2) { 2229 Register temp2) {
2230 DCHECK(!input.is(temp)); 2230 DCHECK(!input.is(temp));
2231 DCHECK(!input.is(temp2)); 2231 DCHECK(!input.is(temp2));
2232 DCHECK(!temp.is(temp2)); 2232 DCHECK(!temp.is(temp2));
2233 __ JumpIfSmi(input, is_false); 2233 __ JumpIfSmi(input, is_false);
2234 2234
2235 __ CmpObjectType(input, JS_FUNCTION_TYPE, temp); 2235 __ CmpObjectType(input, FIRST_FUNCTION_TYPE, temp);
2236 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE);
2236 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { 2237 if (String::Equals(isolate()->factory()->Function_string(), class_name)) {
2237 __ j(equal, is_true); 2238 __ j(above_equal, is_true);
2238 } else { 2239 } else {
2239 __ j(equal, is_false); 2240 __ j(above_equal, is_false);
2240 } 2241 }
2241 2242
2242 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. 2243 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range.
2243 // Check if the constructor in the map is a function. 2244 // Check if the constructor in the map is a function.
2244 __ GetMapConstructor(temp, temp, temp2); 2245 __ GetMapConstructor(temp, temp, temp2);
2245 // Objects with a non-function constructor have class 'Object'. 2246 // Objects with a non-function constructor have class 'Object'.
2246 __ CmpInstanceType(temp2, JS_FUNCTION_TYPE); 2247 __ CmpInstanceType(temp2, JS_FUNCTION_TYPE);
2247 if (String::Equals(class_name, isolate()->factory()->Object_string())) { 2248 if (String::Equals(class_name, isolate()->factory()->Object_string())) {
2248 __ j(not_equal, is_true); 2249 __ j(not_equal, is_true);
2249 } else { 2250 } else {
(...skipping 3078 matching lines...) Expand 10 before | Expand all | Expand 10 after
5328 __ bind(deferred->exit()); 5329 __ bind(deferred->exit());
5329 __ bind(&done); 5330 __ bind(&done);
5330 } 5331 }
5331 5332
5332 #undef __ 5333 #undef __
5333 5334
5334 } // namespace internal 5335 } // namespace internal
5335 } // namespace v8 5336 } // namespace v8
5336 5337
5337 #endif // V8_TARGET_ARCH_IA32 5338 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698