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