| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without | 
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are | 
| 4 // met: | 4 // met: | 
| 5 // | 5 // | 
| 6 //     * Redistributions of source code must retain the above copyright | 6 //     * Redistributions of source code must retain the above copyright | 
| 7 //       notice, this list of conditions and the following disclaimer. | 7 //       notice, this list of conditions and the following disclaimer. | 
| 8 //     * Redistributions in binary form must reproduce the above | 8 //     * Redistributions in binary form must reproduce the above | 
| 9 //       copyright notice, this list of conditions and the following | 9 //       copyright notice, this list of conditions and the following | 
| 10 //       disclaimer in the documentation and/or other materials provided | 10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 250     if (processor.result_assigned()) { | 250     if (processor.result_assigned()) { | 
| 251       ASSERT(function->end_position() != RelocInfo::kNoPosition); | 251       ASSERT(function->end_position() != RelocInfo::kNoPosition); | 
| 252       // Set the position of the assignment statement one character past the | 252       // Set the position of the assignment statement one character past the | 
| 253       // source code, such that it definitely is not in the source code range | 253       // source code, such that it definitely is not in the source code range | 
| 254       // of an immediate inner scope. For example in | 254       // of an immediate inner scope. For example in | 
| 255       //   eval('with ({x:1}) x = 1'); | 255       //   eval('with ({x:1}) x = 1'); | 
| 256       // the end position of the function generated for executing the eval code | 256       // the end position of the function generated for executing the eval code | 
| 257       // coincides with the end of the with scope which is the position of '1'. | 257       // coincides with the end of the with scope which is the position of '1'. | 
| 258       int position = function->end_position(); | 258       int position = function->end_position(); | 
| 259       VariableProxy* result_proxy = processor.factory()->NewVariableProxy( | 259       VariableProxy* result_proxy = processor.factory()->NewVariableProxy( | 
| 260           result->name(), false, position); | 260           result->name(), false, Interface::NewValue(), position); | 
| 261       result_proxy->BindTo(result); | 261       result_proxy->BindTo(result); | 
| 262       Statement* result_statement = | 262       Statement* result_statement = | 
| 263           processor.factory()->NewReturnStatement(result_proxy); | 263           processor.factory()->NewReturnStatement(result_proxy); | 
| 264       result_statement->set_statement_pos(position); | 264       result_statement->set_statement_pos(position); | 
| 265       body->Add(result_statement, info->zone()); | 265       body->Add(result_statement, info->zone()); | 
| 266     } | 266     } | 
| 267   } | 267   } | 
| 268 | 268 | 
| 269   return true; | 269   return true; | 
| 270 } | 270 } | 
| 271 | 271 | 
| 272 | 272 | 
| 273 } }  // namespace v8::internal | 273 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|