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

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

Issue 1517673002: Fix Object.prototype.toString.call(proxy) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add test 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 unified diff | Download patch
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 2245 matching lines...) Expand 10 before | Expand all | Expand 10 after
2256 Register scratch1 = ToRegister(instr->temp1()); 2256 Register scratch1 = ToRegister(instr->temp1());
2257 Register scratch2 = ToRegister(instr->temp2()); 2257 Register scratch2 = ToRegister(instr->temp2());
2258 2258
2259 __ JumpIfSmi(input, false_label); 2259 __ JumpIfSmi(input, false_label);
2260 2260
2261 Register map = scratch2; 2261 Register map = scratch2;
2262 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { 2262 if (String::Equals(isolate()->factory()->Function_string(), class_name)) {
2263 // Assuming the following assertions, we can use the same compares to test 2263 // Assuming the following assertions, we can use the same compares to test
2264 // for both being a function type and being in the object type range. 2264 // for both being a function type and being in the object type range.
2265 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); 2265 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2);
2266 STATIC_ASSERT(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE ==
2267 FIRST_JS_RECEIVER_TYPE + 1);
2268 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == 2266 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE ==
2269 LAST_JS_RECEIVER_TYPE - 1); 2267 LAST_JS_RECEIVER_TYPE - 1);
2270 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); 2268 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
2271 2269
2272 // We expect CompareObjectType to load the object instance type in scratch1. 2270 // We expect CompareObjectType to load the object instance type in scratch1.
2273 __ CompareObjectType(input, map, scratch1, FIRST_JS_RECEIVER_TYPE); 2271 __ CompareObjectType(input, map, scratch1, FIRST_JS_RECEIVER_TYPE);
2274 __ B(lt, false_label); 2272 __ B(lt, false_label);
2275 __ B(eq, true_label);
2276 __ Cmp(scratch1, LAST_JS_RECEIVER_TYPE); 2273 __ Cmp(scratch1, LAST_JS_RECEIVER_TYPE);
2277 __ B(eq, true_label); 2274 __ B(eq, true_label);
2278 } else { 2275 } else {
2279 __ IsObjectJSObjectType(input, map, scratch1, false_label); 2276 __ IsObjectJSObjectType(input, map, scratch1, false_label);
2280 } 2277 }
2281 2278
2282 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. 2279 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range.
2283 // Check if the constructor in the map is a function. 2280 // Check if the constructor in the map is a function.
2284 { 2281 {
2285 UseScratchRegisterScope temps(masm()); 2282 UseScratchRegisterScope temps(masm());
(...skipping 3533 matching lines...) Expand 10 before | Expand all | Expand 10 after
5819 Handle<ScopeInfo> scope_info = instr->scope_info(); 5816 Handle<ScopeInfo> scope_info = instr->scope_info();
5820 __ Push(scope_info); 5817 __ Push(scope_info);
5821 __ Push(ToRegister(instr->function())); 5818 __ Push(ToRegister(instr->function()));
5822 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5819 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5823 RecordSafepoint(Safepoint::kNoLazyDeopt); 5820 RecordSafepoint(Safepoint::kNoLazyDeopt);
5824 } 5821 }
5825 5822
5826 5823
5827 } // namespace internal 5824 } // namespace internal
5828 } // namespace v8 5825 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698