Commit 44418093 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

Revert "[parser] moved load property position after dot"

This reverts commit 217d654c.

Reason for revert: Changes layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/16520

Original change's description:
> [parser] moved load property position after dot
> 
> Currently LdaNamedProperty bytecode for expressions like a.b has position before dot. This CL moves this location after dot.
> It's important for later removing of Nop bytecodes in expressions like a.b() where a is local variable, property call and property load should have the same position.
> 
> R=​jgruber@chromium.org
> 
> Bug: v8:6425
> Change-Id: I528c5007de52215beba80851ab04693ecec038e2
> Reviewed-on: https://chromium-review.googlesource.com/543047
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46163}

TBR=marja@chromium.org,kozyatinskiy@chromium.org,jgruber@chromium.org

Change-Id: I94543526f39f0a20452fbce1a7bc6744cac66621
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6425
Reviewed-on: https://chromium-review.googlesource.com/544993Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46171}
parent 54e9f3e6
......@@ -3640,7 +3640,7 @@ ParserBase<Impl>::ParseMemberExpressionContinuation(ExpressionT expression,
ArrowFormalParametersUnexpectedToken();
Consume(Token::PERIOD);
int pos = peek_position();
int pos = position();
IdentifierT name = ParseIdentifierName(CHECK_OK);
expression = factory()->NewProperty(
expression, factory()->NewStringLiteral(name, pos), pos);
......
......@@ -16,7 +16,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 34 S> */ B(LdaGlobal), U8(0), U8(5),
B(Star), R(1),
/* 39 E> */ B(LdaNamedProperty), R(1), U8(1), U8(7),
/* 38 E> */ B(LdaNamedProperty), R(1), U8(1), U8(7),
B(Star), R(0),
B(CreateArrayLiteral), U8(2), U8(9), U8(17),
B(Star), R(2),
......@@ -43,7 +43,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 34 S> */ B(LdaGlobal), U8(0), U8(5),
B(Star), R(1),
/* 39 E> */ B(LdaNamedProperty), R(1), U8(1), U8(7),
/* 38 E> */ B(LdaNamedProperty), R(1), U8(1), U8(7),
B(Star), R(0),
B(LdaZero),
B(Star), R(2),
......
......@@ -805,13 +805,13 @@ bytecodes: [
/* 45 S> */ B(Return),
/* 27 S> */ B(LdaImmutableCurrentContextSlot), U8(5),
B(Star), R(4),
/* 31 E> */ B(LdaNamedProperty), R(4), U8(4), U8(5),
/* 30 E> */ B(LdaNamedProperty), R(4), U8(4), U8(5),
B(Star), R(3),
B(LdaImmutableCurrentContextSlot), U8(5),
B(Star), R(5),
B(LdaImmutableCurrentContextSlot), U8(5),
B(Star), R(6),
/* 42 E> */ B(LdaNamedProperty), R(6), U8(5), U8(7),
/* 41 E> */ B(LdaNamedProperty), R(6), U8(5), U8(7),
B(Star), R(6),
/* 31 E> */ B(CallProperty2), R(3), R(4), R(5), R(6), U8(3),
B(StaCurrentContextSlot), U8(6),
......
......@@ -52,7 +52,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 34 S> */ B(CreateRegExpLiteral), U8(0), U8(5), U8(0),
B(Star), R(1),
/* 48 E> */ B(LdaNamedProperty), R(1), U8(1), U8(6),
/* 47 E> */ B(LdaNamedProperty), R(1), U8(1), U8(6),
B(Star), R(0),
B(LdaConstant), U8(2),
B(Star), R(2),
......
......@@ -54,7 +54,7 @@ assertEquals(42, get);
assertEquals([
"a0",
"b17", "h4b17", "i2b17", // [[Has]]
"c16", "j4c16", "k2c16", // [[Get]]
"c15", "j4c15", "k2c15", // [[Get]]
"d0", "l4d11", "m2d11", // [[Set]]
"g0"
], log);
......@@ -27,7 +27,7 @@
*%(basename)s:31: TypeError: Cannot read property 'x' of undefined
undefined.x
^
^
TypeError: Cannot read property 'x' of undefined
at *%(basename)s:31:11
at *%(basename)s:31:10
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment