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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 1552473002: Revert of [runtime] Introduce dedicated JSBoundFunction to represent bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@FunctionConstructor
Patch Set: Created 4 years, 11 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 | « src/mips/builtins-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 __ bind(&fast_case); 1465 __ bind(&fast_case);
1466 __ JumpIfSmi(function, &slow_case); 1466 __ JumpIfSmi(function, &slow_case);
1467 __ GetObjectType(function, function_map, scratch); 1467 __ GetObjectType(function, function_map, scratch);
1468 __ Branch(&slow_case, ne, scratch, Operand(JS_FUNCTION_TYPE)); 1468 __ Branch(&slow_case, ne, scratch, Operand(JS_FUNCTION_TYPE));
1469 1469
1470 // Ensure that {function} has an instance prototype. 1470 // Ensure that {function} has an instance prototype.
1471 __ lbu(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset)); 1471 __ lbu(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset));
1472 __ And(at, scratch, Operand(1 << Map::kHasNonInstancePrototype)); 1472 __ And(at, scratch, Operand(1 << Map::kHasNonInstancePrototype));
1473 __ Branch(&slow_case, ne, at, Operand(zero_reg)); 1473 __ Branch(&slow_case, ne, at, Operand(zero_reg));
1474 1474
1475 // Ensure that {function} is not bound.
1476 Register const shared_info = scratch;
1477 __ lw(shared_info,
1478 FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset));
1479 __ lbu(scratch,
1480 FieldMemOperand(shared_info, SharedFunctionInfo::kBoundByteOffset));
1481 __ And(at, scratch, Operand(1 << SharedFunctionInfo::kBoundBitWithinByte));
1482 __ Branch(&slow_case, ne, at, Operand(zero_reg));
1483
1475 // Get the "prototype" (or initial map) of the {function}. 1484 // Get the "prototype" (or initial map) of the {function}.
1476 __ lw(function_prototype, 1485 __ lw(function_prototype,
1477 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); 1486 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
1478 __ AssertNotSmi(function_prototype); 1487 __ AssertNotSmi(function_prototype);
1479 1488
1480 // Resolve the prototype if the {function} has an initial map. Afterwards the 1489 // Resolve the prototype if the {function} has an initial map. Afterwards the
1481 // {function_prototype} will be either the JSReceiver prototype object or the 1490 // {function_prototype} will be either the JSReceiver prototype object or the
1482 // hole value, which means that no instances of the {function} were created so 1491 // hole value, which means that no instances of the {function} were created so
1483 // far and hence we should return false. 1492 // far and hence we should return false.
1484 Label function_prototype_valid; 1493 Label function_prototype_valid;
(...skipping 4112 matching lines...) Expand 10 before | Expand all | Expand 10 after
5597 MemOperand(fp, 6 * kPointerSize), NULL); 5606 MemOperand(fp, 6 * kPointerSize), NULL);
5598 } 5607 }
5599 5608
5600 5609
5601 #undef __ 5610 #undef __
5602 5611
5603 } // namespace internal 5612 } // namespace internal
5604 } // namespace v8 5613 } // namespace v8
5605 5614
5606 #endif // V8_TARGET_ARCH_MIPS 5615 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698