Index: src/full-codegen.cc |
diff --git a/src/full-codegen.cc b/src/full-codegen.cc |
index 58e5e978abf2dd7b73363378ccef7d1d4e9780f6..7adb659315e942b13bfc84fe3b5f2503980b8ff8 100644 |
--- a/src/full-codegen.cc |
+++ b/src/full-codegen.cc |
@@ -820,12 +820,16 @@ int FullCodeGenerator::DeclareGlobalsFlags() { |
void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) { |
- CodeGenerator::RecordPositions(masm_, fun->start_position()); |
+ if (fun->start_position() != RelocInfo::kNoPosition) { |
+ CodeGenerator::RecordPositions(masm_, fun->start_position()); |
+ } |
} |
void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) { |
- CodeGenerator::RecordPositions(masm_, fun->end_position() - 1); |
+ if (fun->end_position() != RelocInfo::kNoPosition) { |
+ CodeGenerator::RecordPositions(masm_, fun->end_position() - 1); |
+ } |
} |
@@ -1575,11 +1579,7 @@ void FullCodeGenerator::VisitClassLiteral(ClassLiteral* lit) { |
__ Push(isolate()->factory()->the_hole_value()); |
} |
- if (lit->constructor() != NULL) { |
- VisitForStackValue(lit->constructor()); |
- } else { |
- __ Push(isolate()->factory()->undefined_value()); |
- } |
+ VisitForStackValue(lit->constructor()); |
__ Push(script()); |
__ Push(Smi::FromInt(lit->start_position())); |