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

Revert "(Reland) [parser] moved load property position after dot"

This reverts commit 5b44ba0e.

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

Original change's description:
> (Reland) [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
> TBR=marja@chromium.org
> 
> Bug: v8:6425
> Change-Id: I05c21ca5e018da9c432c6bc963c7a96799336d1c
> Reviewed-on: https://chromium-review.googlesource.com/562879
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46484}

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

Change-Id: If9d5fa5f46ed10a407559e9cf10d2a6a54dbe163
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6425
Reviewed-on: https://chromium-review.googlesource.com/564418Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46491}
parent d1e7159f
......@@ -3639,7 +3639,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(6),
B(Star), R(1),
/* 39 E> */ B(LdaNamedProperty), R(1), U8(1), U8(8),
/* 38 E> */ B(LdaNamedProperty), R(1), U8(1), U8(8),
B(Star), R(0),
B(CreateArrayLiteral), U8(2), U8(10), U8(17),
B(Star), R(2),
......@@ -43,7 +43,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 34 S> */ B(LdaGlobal), U8(0), U8(6),
B(Star), R(1),
/* 39 E> */ B(LdaNamedProperty), R(1), U8(1), U8(8),
/* 38 E> */ B(LdaNamedProperty), R(1), U8(1), U8(8),
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(6),
/* 30 E> */ B(LdaNamedProperty), R(4), U8(4), U8(6),
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(8),
/* 41 E> */ B(LdaNamedProperty), R(6), U8(5), U8(8),
B(Star), R(6),
/* 31 E> */ B(CallProperty2), R(3), R(4), R(5), R(6), U8(4),
B(StaCurrentContextSlot), U8(6),
......
......@@ -52,7 +52,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 34 S> */ B(CreateRegExpLiteral), U8(0), U8(6), U8(0),
B(Star), R(1),
/* 48 E> */ B(LdaNamedProperty), R(1), U8(1), U8(7),
/* 47 E> */ B(LdaNamedProperty), R(1), U8(1), U8(7),
B(Star), R(0),
B(LdaConstant), U8(2),
B(Star), R(2),
......
......@@ -54,7 +54,7 @@ assertEquals(42, get);
assertEquals([
"a0",
"b10", "h4b17", "i2b17", // [[Has]]
"c10", "j4c16", "k2c16", // [[Get]]
"c10", "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