| 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 PostponeInterruptsScope postpone(isolate); | 563 PostponeInterruptsScope postpone(isolate); |
| 564 | 564 |
| 565 ASSERT(!isolate->native_context().is_null()); | 565 ASSERT(!isolate->native_context().is_null()); |
| 566 Handle<Script> script = info->script(); | 566 Handle<Script> script = info->script(); |
| 567 // TODO(svenpanne) Obscure place for this, perhaps move to OnBeforeCompile? | 567 // TODO(svenpanne) Obscure place for this, perhaps move to OnBeforeCompile? |
| 568 FixedArray* array = isolate->native_context()->embedder_data(); | 568 FixedArray* array = isolate->native_context()->embedder_data(); |
| 569 script->set_context_data(array->get(0)); | 569 script->set_context_data(array->get(0)); |
| 570 | 570 |
| 571 #ifdef ENABLE_DEBUGGER_SUPPORT | 571 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 572 if (info->is_eval()) { | 572 if (info->is_eval()) { |
| 573 script->set_compilation_type(Script::COMPILATION_TYPE_EVAL); | 573 script->set_compilation_type(v8::Script::COMPILATION_TYPE_EVAL); |
| 574 // For eval scripts add information on the function from which eval was | 574 // For eval scripts add information on the function from which eval was |
| 575 // called. | 575 // called. |
| 576 if (info->is_eval()) { | 576 if (info->is_eval()) { |
| 577 StackTraceFrameIterator it(isolate); | 577 StackTraceFrameIterator it(isolate); |
| 578 if (!it.done()) { | 578 if (!it.done()) { |
| 579 script->set_eval_from_shared(it.frame()->function()->shared()); | 579 script->set_eval_from_shared(it.frame()->function()->shared()); |
| 580 Code* code = it.frame()->LookupCode(); | 580 Code* code = it.frame()->LookupCode(); |
| 581 int offset = static_cast<int>( | 581 int offset = static_cast<int>( |
| 582 it.frame()->pc() - code->instruction_start()); | 582 it.frame()->pc() - code->instruction_start()); |
| 583 script->set_eval_from_instructions_offset(Smi::FromInt(offset)); | 583 script->set_eval_from_instructions_offset(Smi::FromInt(offset)); |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1266 // Trace if the appropriate trace flag is set and the phase name's first | 1266 // Trace if the appropriate trace flag is set and the phase name's first |
| 1267 // character is in the FLAG_trace_phase command line parameter. | 1267 // character is in the FLAG_trace_phase command line parameter. |
| 1268 bool tracing_on = info()->IsStub() ? | 1268 bool tracing_on = info()->IsStub() ? |
| 1269 FLAG_trace_hydrogen_stubs : | 1269 FLAG_trace_hydrogen_stubs : |
| 1270 FLAG_trace_hydrogen; | 1270 FLAG_trace_hydrogen; |
| 1271 return (tracing_on && | 1271 return (tracing_on && |
| 1272 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1272 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
| 1273 } | 1273 } |
| 1274 | 1274 |
| 1275 } } // namespace v8::internal | 1275 } } // namespace v8::internal |
| OLD | NEW |