Add a bailout id just before every variable load in fullcode.
authortitzer <titzer@chromium.org>
Mon, 11 May 2015 15:56:07 +0000 (08:56 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 11 May 2015 15:56:06 +0000 (15:56 +0000)
R=jarin@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1139733002

Cr-Commit-Position: refs/heads/master@{#28344}

src/arm/full-codegen-arm.cc
src/arm64/full-codegen-arm64.cc
src/ast.h
src/ia32/full-codegen-ia32.cc
src/mips/full-codegen-mips.cc
src/mips64/full-codegen-mips64.cc
src/ppc/full-codegen-ppc.cc
src/x64/full-codegen-x64.cc
src/x87/full-codegen-x87.cc

index 35d6917b64ec38415ba042c9acd534c8bd16a9de..c000a85e00d8e5eeb3b63678db3843017cae6ece 100644 (file)
@@ -1493,6 +1493,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
   // Record position before possible IC call.
   SetSourcePosition(proxy->position());
+  PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS);
   Variable* var = proxy->var();
 
   // Three cases: global variables, lookup variables, and all other types of
index ab21d023798fb1e5aa10ba374906c5d7a3923510..8348164cb25f58770db392f8c4aa3b7687adb2aa 100644 (file)
@@ -1472,6 +1472,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
   // Record position before possible IC call.
   SetSourcePosition(proxy->position());
+  PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS);
   Variable* var = proxy->var();
 
   // Three cases: global variables, lookup variables, and all other types of
index c669756d5216efbfa032cdda11f51670440470bd..94ece122c3b933f27638ff034d089f75763d9dd3 100644 (file)
--- a/src/ast.h
+++ b/src/ast.h
@@ -1621,6 +1621,9 @@ class VariableProxy final : public Expression {
     return variable_feedback_slot_;
   }
 
+  static int num_ids() { return parent_num_ids() + 1; }
+  BailoutId BeforeId() const { return BailoutId(local_id(0)); }
+
  protected:
   VariableProxy(Zone* zone, Variable* var, int start_position,
                 int end_position);
@@ -1628,6 +1631,8 @@ class VariableProxy final : public Expression {
   VariableProxy(Zone* zone, const AstRawString* name,
                 Variable::Kind variable_kind, int start_position,
                 int end_position);
+  static int parent_num_ids() { return Expression::num_ids(); }
+  int local_id(int n) const { return base_id() + parent_num_ids() + n; }
 
   class IsThisField : public BitField8<bool, 0, 1> {};
   class IsAssignedField : public BitField8<bool, 1, 1> {};
index 234e3b3754e4545cacd18a33ca7c010f06733917..e9a887e75c651af035b540812ace3e9508f63c7d 100644 (file)
@@ -1419,6 +1419,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
   // Record position before possible IC call.
   SetSourcePosition(proxy->position());
+  PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS);
   Variable* var = proxy->var();
 
   // Three cases: global variables, lookup variables, and all other types of
index 69d0011de76d9943019e5083ec201ebda44c35f7..2ab103da433c9214ed1caa6d29abb28cc56c3d47 100644 (file)
@@ -1477,6 +1477,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
   // Record position before possible IC call.
   SetSourcePosition(proxy->position());
+  PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS);
   Variable* var = proxy->var();
 
   // Three cases: global variables, lookup variables, and all other types of
index aa39c42243fafdeff58818b931803c9867e9e0e1..bf1779867ec6211068982f5312cbd7900b1f2d42 100644 (file)
@@ -1474,6 +1474,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
   // Record position before possible IC call.
   SetSourcePosition(proxy->position());
+  PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS);
   Variable* var = proxy->var();
 
   // Three cases: global variables, lookup variables, and all other types of
index e96f7c420c2f5f5cd5cfe56fc623f2cdee1ad000..5be88fbab30dfc3264c1318724113f2f9b443b53 100644 (file)
@@ -1451,6 +1451,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
   // Record position before possible IC call.
   SetSourcePosition(proxy->position());
+  PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS);
   Variable* var = proxy->var();
 
   // Three cases: global variables, lookup variables, and all other types of
index b09d29b8dee0bfbcf4c5b46a8428f6a17267adb6..91842d3c6bab0ac5b52ce9ec7332ef2f9ba66c1f 100644 (file)
@@ -1454,6 +1454,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
   // Record position before possible IC call.
   SetSourcePosition(proxy->position());
+  PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS);
   Variable* var = proxy->var();
 
   // Three cases: global variables, lookup variables, and all other types of
index f1abd5befe21281f388a270770db9ea631466c92..6f65630382590a3f221f515437dd8c09372c345b 100644 (file)
@@ -1411,6 +1411,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
   // Record position before possible IC call.
   SetSourcePosition(proxy->position());
+  PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS);
   Variable* var = proxy->var();
 
   // Three cases: global variables, lookup variables, and all other types of