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

Side by Side Diff: src/crankshaft/arm64/lithium-codegen-arm64.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
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
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 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after
2243 Handle<String> class_name = instr->hydrogen()->class_name(); 2243 Handle<String> class_name = instr->hydrogen()->class_name();
2244 Label* true_label = instr->TrueLabel(chunk_); 2244 Label* true_label = instr->TrueLabel(chunk_);
2245 Label* false_label = instr->FalseLabel(chunk_); 2245 Label* false_label = instr->FalseLabel(chunk_);
2246 Register input = ToRegister(instr->value()); 2246 Register input = ToRegister(instr->value());
2247 Register scratch1 = ToRegister(instr->temp1()); 2247 Register scratch1 = ToRegister(instr->temp1());
2248 Register scratch2 = ToRegister(instr->temp2()); 2248 Register scratch2 = ToRegister(instr->temp2());
2249 2249
2250 __ JumpIfSmi(input, false_label); 2250 __ JumpIfSmi(input, false_label);
2251 2251
2252 Register map = scratch2; 2252 Register map = scratch2;
2253 __ CompareObjectType(input, map, scratch1, JS_FUNCTION_TYPE); 2253 __ CompareObjectType(input, map, scratch1, FIRST_FUNCTION_TYPE);
2254 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE);
2254 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { 2255 if (String::Equals(isolate()->factory()->Function_string(), class_name)) {
2255 __ B(eq, true_label); 2256 __ B(hs, true_label);
2256 } else { 2257 } else {
2257 __ B(eq, false_label); 2258 __ B(hs, false_label);
2258 } 2259 }
2259 2260
2260 // Check if the constructor in the map is a function. 2261 // Check if the constructor in the map is a function.
2261 { 2262 {
2262 UseScratchRegisterScope temps(masm()); 2263 UseScratchRegisterScope temps(masm());
2263 Register instance_type = temps.AcquireX(); 2264 Register instance_type = temps.AcquireX();
2264 __ GetMapConstructor(scratch1, map, scratch2, instance_type); 2265 __ GetMapConstructor(scratch1, map, scratch2, instance_type);
2265 __ Cmp(instance_type, JS_FUNCTION_TYPE); 2266 __ Cmp(instance_type, JS_FUNCTION_TYPE);
2266 } 2267 }
2267 // Objects with a non-function constructor have class 'Object'. 2268 // Objects with a non-function constructor have class 'Object'.
(...skipping 3502 matching lines...) Expand 10 before | Expand all | Expand 10 after
5770 // Index is equal to negated out of object property index plus 1. 5771 // Index is equal to negated out of object property index plus 1.
5771 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5772 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5772 __ Ldr(result, FieldMemOperand(result, 5773 __ Ldr(result, FieldMemOperand(result,
5773 FixedArray::kHeaderSize - kPointerSize)); 5774 FixedArray::kHeaderSize - kPointerSize));
5774 __ Bind(deferred->exit()); 5775 __ Bind(deferred->exit());
5775 __ Bind(&done); 5776 __ Bind(&done);
5776 } 5777 }
5777 5778
5778 } // namespace internal 5779 } // namespace internal
5779 } // namespace v8 5780 } // namespace v8
OLDNEW
« 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