OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 #ifdef ENABLE_DEBUGGER_SUPPORT | 172 #ifdef ENABLE_DEBUGGER_SUPPORT |
173 bool is_json = (validate == Compiler::VALIDATE_JSON); | 173 bool is_json = (validate == Compiler::VALIDATE_JSON); |
174 if (is_eval || is_json) { | 174 if (is_eval || is_json) { |
175 script->set_compilation_type( | 175 script->set_compilation_type( |
176 is_json ? Smi::FromInt(Script::COMPILATION_TYPE_JSON) : | 176 is_json ? Smi::FromInt(Script::COMPILATION_TYPE_JSON) : |
177 Smi::FromInt(Script::COMPILATION_TYPE_EVAL)); | 177 Smi::FromInt(Script::COMPILATION_TYPE_EVAL)); |
178 // For eval scripts add information on the function from which eval was | 178 // For eval scripts add information on the function from which eval was |
179 // called. | 179 // called. |
180 if (is_eval) { | 180 if (is_eval) { |
181 JavaScriptFrameIterator it; | 181 JavaScriptFrameIterator it; |
182 if (it.frame()->function()->IsJSFunction()) | |
183 script->set_eval_from_shared( | 182 script->set_eval_from_shared( |
184 JSFunction::cast(it.frame()->function())->shared()); | 183 JSFunction::cast(it.frame()->function())->shared()); |
185 int offset = static_cast<int>( | 184 int offset = static_cast<int>( |
186 it.frame()->pc() - it.frame()->code()->instruction_start()); | 185 it.frame()->pc() - it.frame()->code()->instruction_start()); |
187 script->set_eval_from_instructions_offset(Smi::FromInt(offset)); | 186 script->set_eval_from_instructions_offset(Smi::FromInt(offset)); |
188 } | 187 } |
189 } | 188 } |
190 | 189 |
191 // Notify debugger | 190 // Notify debugger |
192 Debugger::OnBeforeCompile(script); | 191 Debugger::OnBeforeCompile(script); |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 | 1119 |
1121 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { | 1120 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { |
1122 BAILOUT("ThisFunction"); | 1121 BAILOUT("ThisFunction"); |
1123 } | 1122 } |
1124 | 1123 |
1125 #undef BAILOUT | 1124 #undef BAILOUT |
1126 #undef CHECK_BAILOUT | 1125 #undef CHECK_BAILOUT |
1127 | 1126 |
1128 | 1127 |
1129 } } // namespace v8::internal | 1128 } } // namespace v8::internal |
OLD | NEW |