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

Side by Side Diff: src/mips/builtins-mips.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 4 years, 12 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 | « no previous file | src/mips64/builtins-mips64.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 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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 2020 matching lines...) Expand 10 before | Expand all | Expand 10 after
2031 __ JumpIfSmi(a1, &non_constructor); 2031 __ JumpIfSmi(a1, &non_constructor);
2032 2032
2033 // Dispatch based on instance type. 2033 // Dispatch based on instance type.
2034 __ lw(t1, FieldMemOperand(a1, HeapObject::kMapOffset)); 2034 __ lw(t1, FieldMemOperand(a1, HeapObject::kMapOffset));
2035 __ lbu(t2, FieldMemOperand(t1, Map::kInstanceTypeOffset)); 2035 __ lbu(t2, FieldMemOperand(t1, Map::kInstanceTypeOffset));
2036 __ Jump(masm->isolate()->builtins()->ConstructFunction(), 2036 __ Jump(masm->isolate()->builtins()->ConstructFunction(),
2037 RelocInfo::CODE_TARGET, eq, t2, Operand(JS_FUNCTION_TYPE)); 2037 RelocInfo::CODE_TARGET, eq, t2, Operand(JS_FUNCTION_TYPE));
2038 2038
2039 // Check if target has a [[Construct]] internal method. 2039 // Check if target has a [[Construct]] internal method.
2040 __ lbu(t3, FieldMemOperand(t1, Map::kBitFieldOffset)); 2040 __ lbu(t3, FieldMemOperand(t1, Map::kBitFieldOffset));
2041 __ And(t3, t3, Operand(1 << Map::kIsCallable)); 2041 __ And(t3, t3, Operand(1 << Map::kIsConstructor));
2042 __ Branch(&non_constructor, eq, t3, Operand(zero_reg)); 2042 __ Branch(&non_constructor, eq, t3, Operand(zero_reg));
2043 2043
2044 // Only dispatch to proxies after checking whether they are constructors. 2044 // Only dispatch to proxies after checking whether they are constructors.
2045 __ Jump(masm->isolate()->builtins()->ConstructProxy(), RelocInfo::CODE_TARGET, 2045 __ Jump(masm->isolate()->builtins()->ConstructProxy(), RelocInfo::CODE_TARGET,
2046 eq, t2, Operand(JS_PROXY_TYPE)); 2046 eq, t2, Operand(JS_PROXY_TYPE));
2047 2047
2048 // Called Construct on an exotic Object with a [[Construct]] internal method. 2048 // Called Construct on an exotic Object with a [[Construct]] internal method.
2049 { 2049 {
2050 // Overwrite the original receiver with the (original) target. 2050 // Overwrite the original receiver with the (original) target.
2051 __ sll(at, a0, kPointerSizeLog2); 2051 __ sll(at, a0, kPointerSizeLog2);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2219 } 2219 }
2220 } 2220 }
2221 2221
2222 2222
2223 #undef __ 2223 #undef __
2224 2224
2225 } // namespace internal 2225 } // namespace internal
2226 } // namespace v8 2226 } // namespace v8
2227 2227
2228 #endif // V8_TARGET_ARCH_MIPS 2228 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698