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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.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 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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 3190 matching lines...) Expand 10 before | Expand all | Expand 10 after
3201 __ JumpIfSmi(rax, &null); 3201 __ JumpIfSmi(rax, &null);
3202 3202
3203 // Check that the object is a JS object but take special care of JS 3203 // Check that the object is a JS object but take special care of JS
3204 // functions to make sure they have 'Function' as their class. 3204 // functions to make sure they have 'Function' as their class.
3205 // Assume that there are only two callable types, and one of them is at 3205 // Assume that there are only two callable types, and one of them is at
3206 // either end of the type range for JS object types. Saves extra comparisons. 3206 // either end of the type range for JS object types. Saves extra comparisons.
3207 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); 3207 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2);
3208 __ CmpObjectType(rax, FIRST_JS_RECEIVER_TYPE, rax); 3208 __ CmpObjectType(rax, FIRST_JS_RECEIVER_TYPE, rax);
3209 // Map is now in rax. 3209 // Map is now in rax.
3210 __ j(below, &null); 3210 __ j(below, &null);
3211 STATIC_ASSERT(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE ==
3212 FIRST_JS_RECEIVER_TYPE + 1);
3213 __ j(equal, &function);
3214 3211
3215 __ CmpInstanceType(rax, LAST_JS_RECEIVER_TYPE); 3212 __ CmpInstanceType(rax, LAST_JS_RECEIVER_TYPE);
3216 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == 3213 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE ==
3217 LAST_JS_RECEIVER_TYPE - 1); 3214 LAST_JS_RECEIVER_TYPE - 1);
3218 __ j(equal, &function); 3215 __ j(equal, &function);
3219 // Assume that there is no larger type. 3216 // Assume that there is no larger type.
3220 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); 3217 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1);
3221 3218
3222 // Check if the constructor in the map is a JS function. 3219 // Check if the constructor in the map is a JS function.
3223 __ GetMapConstructor(rax, rax, rbx); 3220 __ GetMapConstructor(rax, rax, rbx);
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
4831 Assembler::target_address_at(call_target_address, 4828 Assembler::target_address_at(call_target_address,
4832 unoptimized_code)); 4829 unoptimized_code));
4833 return OSR_AFTER_STACK_CHECK; 4830 return OSR_AFTER_STACK_CHECK;
4834 } 4831 }
4835 4832
4836 4833
4837 } // namespace internal 4834 } // namespace internal
4838 } // namespace v8 4835 } // namespace v8
4839 4836
4840 #endif // V8_TARGET_ARCH_X64 4837 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698