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

Side by Side Diff: src/mips64/builtins-mips64.cc

Issue 1545983002: MIPS[64]: Fix test262/built-ins/Proxy/create-target-is-not-constructor. (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 unified diff | Download patch
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after
2021 __ JumpIfSmi(a1, &non_constructor); 2021 __ JumpIfSmi(a1, &non_constructor);
2022 2022
2023 // Dispatch based on instance type. 2023 // Dispatch based on instance type.
2024 __ ld(t1, FieldMemOperand(a1, HeapObject::kMapOffset)); 2024 __ ld(t1, FieldMemOperand(a1, HeapObject::kMapOffset));
2025 __ lbu(t2, FieldMemOperand(t1, Map::kInstanceTypeOffset)); 2025 __ lbu(t2, FieldMemOperand(t1, Map::kInstanceTypeOffset));
2026 __ Jump(masm->isolate()->builtins()->ConstructFunction(), 2026 __ Jump(masm->isolate()->builtins()->ConstructFunction(),
2027 RelocInfo::CODE_TARGET, eq, t2, Operand(JS_FUNCTION_TYPE)); 2027 RelocInfo::CODE_TARGET, eq, t2, Operand(JS_FUNCTION_TYPE));
2028 2028
2029 // Check if target has a [[Construct]] internal method. 2029 // Check if target has a [[Construct]] internal method.
2030 __ lbu(t3, FieldMemOperand(t1, Map::kBitFieldOffset)); 2030 __ lbu(t3, FieldMemOperand(t1, Map::kBitFieldOffset));
2031 __ And(t3, t3, Operand(1 << Map::kIsCallable)); 2031 __ And(t3, t3, Operand(1 << Map::kIsConstructor));
2032 __ Branch(&non_constructor, eq, t3, Operand(zero_reg)); 2032 __ Branch(&non_constructor, eq, t3, Operand(zero_reg));
2033 2033
2034 // Only dispatch to proxies after checking whether they are constructors. 2034 // Only dispatch to proxies after checking whether they are constructors.
2035 __ Jump(masm->isolate()->builtins()->ConstructProxy(), RelocInfo::CODE_TARGET, 2035 __ Jump(masm->isolate()->builtins()->ConstructProxy(), RelocInfo::CODE_TARGET,
2036 eq, t2, Operand(JS_PROXY_TYPE)); 2036 eq, t2, Operand(JS_PROXY_TYPE));
2037 2037
2038 // Called Construct on an exotic Object with a [[Construct]] internal method. 2038 // Called Construct on an exotic Object with a [[Construct]] internal method.
2039 { 2039 {
2040 // Overwrite the original receiver with the (original) target. 2040 // Overwrite the original receiver with the (original) target.
2041 __ dsll(at, a0, kPointerSizeLog2); 2041 __ dsll(at, a0, kPointerSizeLog2);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 } 2209 }
2210 } 2210 }
2211 2211
2212 2212
2213 #undef __ 2213 #undef __
2214 2214
2215 } // namespace internal 2215 } // namespace internal
2216 } // namespace v8 2216 } // namespace v8
2217 2217
2218 #endif // V8_TARGET_ARCH_MIPS64 2218 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698