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/full-codegen/mips64/full-codegen-mips64.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 3320 matching lines...) Expand 10 before | Expand all | Expand 10 after
3331 __ JumpIfSmi(v0, &null); 3331 __ JumpIfSmi(v0, &null);
3332 3332
3333 // Check that the object is a JS object but take special care of JS 3333 // Check that the object is a JS object but take special care of JS
3334 // functions to make sure they have 'Function' as their class. 3334 // functions to make sure they have 'Function' as their class.
3335 // Assume that there are only two callable types, and one of them is at 3335 // Assume that there are only two callable types, and one of them is at
3336 // either end of the type range for JS object types. Saves extra comparisons. 3336 // either end of the type range for JS object types. Saves extra comparisons.
3337 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); 3337 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2);
3338 __ GetObjectType(v0, v0, a1); // Map is now in v0. 3338 __ GetObjectType(v0, v0, a1); // Map is now in v0.
3339 __ Branch(&null, lt, a1, Operand(FIRST_JS_RECEIVER_TYPE)); 3339 __ Branch(&null, lt, a1, Operand(FIRST_JS_RECEIVER_TYPE));
3340 3340
3341 STATIC_ASSERT(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE ==
3342 FIRST_JS_RECEIVER_TYPE + 1);
3343 __ Branch(&function, eq, a1, Operand(FIRST_JS_RECEIVER_TYPE));
3344
3345 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == 3341 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE ==
3346 LAST_JS_RECEIVER_TYPE - 1); 3342 LAST_JS_RECEIVER_TYPE - 1);
3347 __ Branch(&function, eq, a1, Operand(LAST_JS_RECEIVER_TYPE)); 3343 __ Branch(&function, eq, a1, Operand(LAST_JS_RECEIVER_TYPE));
3348 // Assume that there is no larger type. 3344 // Assume that there is no larger type.
3349 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); 3345 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1);
3350 3346
3351 // Check if the constructor in the map is a JS function. 3347 // Check if the constructor in the map is a JS function.
3352 Register instance_type = a2; 3348 Register instance_type = a2;
3353 __ GetMapConstructor(v0, v0, a1, instance_type); 3349 __ GetMapConstructor(v0, v0, a1, instance_type);
3354 __ Branch(&non_function_constructor, ne, instance_type, 3350 __ Branch(&non_function_constructor, ne, instance_type,
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
4927 reinterpret_cast<uint64_t>( 4923 reinterpret_cast<uint64_t>(
4928 isolate->builtins()->OsrAfterStackCheck()->entry())); 4924 isolate->builtins()->OsrAfterStackCheck()->entry()));
4929 return OSR_AFTER_STACK_CHECK; 4925 return OSR_AFTER_STACK_CHECK;
4930 } 4926 }
4931 4927
4932 4928
4933 } // namespace internal 4929 } // namespace internal
4934 } // namespace v8 4930 } // namespace v8
4935 4931
4936 #endif // V8_TARGET_ARCH_MIPS64 4932 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698