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

Unified Diff: src/crankshaft/arm64/lithium-codegen-arm64.cc

Issue 1535523003: [runtime] Drop FIRST/LAST_NONCALLABLE_SPEC_OBJECT instance type range. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/arm64/lithium-codegen-arm64.cc
diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc
index d656acedda2cf9c8f2305607051bf2d7bfa69759..bd6a7075186dc8b40d41c1ddc437c16f57441fe4 100644
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc
@@ -2259,24 +2259,13 @@ void LCodeGen::DoClassOfTestAndBranch(LClassOfTestAndBranch* instr) {
__ JumpIfSmi(input, false_label);
Register map = scratch2;
+ __ CompareObjectType(input, map, scratch1, JS_FUNCTION_TYPE);
if (String::Equals(isolate()->factory()->Function_string(), class_name)) {
- // Assuming the following assertions, we can use the same compares to test
- // for both being a function type and being in the object type range.
- STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2);
- STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE ==
- LAST_JS_RECEIVER_TYPE - 1);
- STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
-
- // We expect CompareObjectType to load the object instance type in scratch1.
- __ CompareObjectType(input, map, scratch1, FIRST_JS_RECEIVER_TYPE);
- __ B(lt, false_label);
- __ Cmp(scratch1, LAST_JS_RECEIVER_TYPE);
__ B(eq, true_label);
} else {
- __ IsObjectJSObjectType(input, map, scratch1, false_label);
+ __ B(eq, false_label);
}
- // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range.
// Check if the constructor in the map is a function.
{
UseScratchRegisterScope temps(masm());
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698