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 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1674 ScriptOrigin origin(file_name); | 1674 ScriptOrigin origin(file_name); |
1675 return Compile(source, &origin, 0, script_data); | 1675 return Compile(source, &origin, 0, script_data); |
1676 } | 1676 } |
1677 | 1677 |
1678 | 1678 |
1679 Local<Value> Script::Run() { | 1679 Local<Value> Script::Run() { |
1680 i::Isolate* isolate = i::Isolate::Current(); | 1680 i::Isolate* isolate = i::Isolate::Current(); |
1681 ON_BAILOUT(isolate, "v8::Script::Run()", return Local<Value>()); | 1681 ON_BAILOUT(isolate, "v8::Script::Run()", return Local<Value>()); |
1682 LOG_API(isolate, "Script::Run"); | 1682 LOG_API(isolate, "Script::Run"); |
1683 ENTER_V8(isolate); | 1683 ENTER_V8(isolate); |
| 1684 i::Logger::TimerEventScope timer_scope(isolate->logger(), "V8.ScriptRun"); |
1684 i::Object* raw_result = NULL; | 1685 i::Object* raw_result = NULL; |
1685 { | 1686 { |
1686 i::HandleScope scope(isolate); | 1687 i::HandleScope scope(isolate); |
1687 i::Handle<i::Object> obj = Utils::OpenHandle(this); | 1688 i::Handle<i::Object> obj = Utils::OpenHandle(this); |
1688 i::Handle<i::JSFunction> fun; | 1689 i::Handle<i::JSFunction> fun; |
1689 if (obj->IsSharedFunctionInfo()) { | 1690 if (obj->IsSharedFunctionInfo()) { |
1690 i::Handle<i::SharedFunctionInfo> | 1691 i::Handle<i::SharedFunctionInfo> |
1691 function_info(i::SharedFunctionInfo::cast(*obj), isolate); | 1692 function_info(i::SharedFunctionInfo::cast(*obj), isolate); |
1692 fun = isolate->factory()->NewFunctionFromSharedFunctionInfo( | 1693 fun = isolate->factory()->NewFunctionFromSharedFunctionInfo( |
1693 function_info, isolate->global_context()); | 1694 function_info, isolate->global_context()); |
(...skipping 4968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6662 | 6663 |
6663 v->VisitPointers(blocks_.first(), first_block_limit_); | 6664 v->VisitPointers(blocks_.first(), first_block_limit_); |
6664 | 6665 |
6665 for (int i = 1; i < blocks_.length(); i++) { | 6666 for (int i = 1; i < blocks_.length(); i++) { |
6666 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 6667 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); |
6667 } | 6668 } |
6668 } | 6669 } |
6669 | 6670 |
6670 | 6671 |
6671 } } // namespace v8::internal | 6672 } } // namespace v8::internal |
OLD | NEW |