Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e5cce7a

Browse filesBrowse files
fhinkelevanlucas
authored andcommitted
deps: cherry-pick 3a903c4 for PPC from V8 upstream
Original commit message: PPC: InstanceOfStub incorrectly interprets the hole as a prototype. Port 2aa070b Original commit message: Repair this to match what the runtime correctly does, by first checking if the function is a constructor before we access the prototype. R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com BUG= Review URL: https://codereview.chromium.org/1811013002 Cr-Commit-Position: refs/heads/master@{#34869} Fixes: #7592 for PPC PR-URL: #7638 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
1 parent e239045 commit e5cce7a
Copy full SHA for e5cce7a

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Open diff view settings
Collapse file

‎deps/v8/src/ppc/code-stubs-ppc.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/ppc/code-stubs-ppc.cc
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,8 +1409,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
14091409
__ CompareObjectType(function, function_map, scratch, JS_FUNCTION_TYPE);
14101410
__ bne(&slow_case);
14111411

1412-
// Ensure that {function} has an instance prototype.
1412+
// Go to the runtime if the function is not a constructor.
14131413
__ lbz(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset));
1414+
__ TestBit(scratch, Map::kIsConstructor, r0);
1415+
__ beq(&slow_case, cr0);
1416+
1417+
// Ensure that {function} has an instance prototype.
14141418
__ TestBit(scratch, Map::kHasNonInstancePrototype, r0);
14151419
__ bne(&slow_case, cr0);
14161420

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.